Skip to content

Commit

Permalink
docs: Some updates to the documentation (#1249)
Browse files Browse the repository at this point in the history
Fix #1246 and more:
- Update the quick start and getting started guide to focus more on the
`EstimatorReport` than the skore project
- Making the documentation even clearer
  • Loading branch information
sylvaincom authored Feb 4, 2025
1 parent b85b797 commit f4b85cc
Show file tree
Hide file tree
Showing 10 changed files with 202 additions and 211 deletions.
3 changes: 2 additions & 1 deletion examples/getting_started/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Getting started
---------------

Overall and gentle introduction to skore.
We recommend starting with these examples that provide an overall and gentle
introduction to skore.
57 changes: 32 additions & 25 deletions examples/getting_started/plot_quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,9 @@
"""

# %%
# From your Python code, create and load a skore :class:`~skore.Project`:

# %%
import skore

# sphinx_gallery_start_ignore
import os
import tempfile
from pathlib import Path

temp_dir = tempfile.TemporaryDirectory()
temp_dir_path = Path(temp_dir.name)
os.chdir(temp_dir_path)
# sphinx_gallery_end_ignore
my_project = skore.Project("my_project")

# %%
# This will create a skore project directory named ``my_project.skore`` in your
# current working directory.

# %%
# Machine learning evaluation and diagnostics
# ===========================================
#
# Evaluate your model using skore's :class:`~skore.CrossValidationReport`:

# %%
Expand All @@ -42,8 +24,8 @@
cv_report = CrossValidationReport(clf, X, y)

# %%
# Display the help tree to see all the insights that are available to you (given that
# you are doing binary classification):
# Display the help tree to see all the insights that are available to you (skore
# detected that you are doing binary classification):

# %%
cv_report.help()
Expand All @@ -66,7 +48,32 @@
plt.tight_layout()

# %%
# Store the results in the skore project for safe-keeping:
# Skore project: storing some items
# =================================

# %%
# From your Python code, create and load a skore :class:`~skore.Project`:

# %%
import skore

# sphinx_gallery_start_ignore
import os
import tempfile
from pathlib import Path

temp_dir = tempfile.TemporaryDirectory()
temp_dir_path = Path(temp_dir.name)
os.chdir(temp_dir_path)
# sphinx_gallery_end_ignore
my_project = skore.Project("my_project")

# %%
# This will create a skore project directory named ``my_project.skore`` in your
# current working directory.

# %%
# Store some previous results in the skore project for safe-keeping:

# %%
my_project.put("df_cv_report_metrics", df_cv_report_metrics)
Expand All @@ -77,10 +84,10 @@

# %%
df_get = my_project.get("df_cv_report_metrics")
df_get
# sphinx_gallery_start_ignore
temp_dir.cleanup()
# sphinx_gallery_end_ignore
df_get

# %%
# .. admonition:: What's next?
Expand Down
Loading

0 comments on commit f4b85cc

Please sign in to comment.