Skip to content

Commit c979293

Browse files
docs: Build documentation triggered by 381550c
1 parent 381550c commit c979293

File tree

14 files changed

+126
-121
lines changed

14 files changed

+126
-121
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/latest/_downloads/9825adffd8a0e006b517b57261e52107/plot_03_cross_validate.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"outputs": [],
1717
"source": [
18-
"import subprocess\n\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\n\nfrom sklearn import datasets, linear_model\nfrom sklearn import svm\nfrom sklearn.model_selection import cross_validate as sklearn_cross_validate\n\nfrom skore import load\nimport skore.cross_validate"
18+
"import subprocess\n\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\n\nfrom sklearn import datasets, linear_model\nfrom sklearn import svm\nfrom sklearn.model_selection import cross_validate as sklearn_cross_validate\n\nimport skore"
1919
]
2020
},
2121
{
@@ -44,7 +44,7 @@
4444
},
4545
"outputs": [],
4646
"source": [
47-
"my_project_gs = load(\"my_project_cv.skore\")"
47+
"my_project_gs = skore.load(\"my_project_cv.skore\")"
4848
]
4949
},
5050
{
@@ -62,7 +62,7 @@
6262
},
6363
"outputs": [],
6464
"source": [
65-
"X, y = datasets.load_iris(return_X_y=True)\nclf = svm.SVC(kernel='linear', C=1, random_state=0)"
65+
"X, y = datasets.load_iris(return_X_y=True)\nclf = svm.SVC(kernel=\"linear\", C=1, random_state=0)"
6666
]
6767
},
6868
{
@@ -80,7 +80,7 @@
8080
},
8181
"outputs": [],
8282
"source": [
83-
"cv_results = sklearn_cross_validate(clf, X, y, cv=5)\ncv_results['test_score']"
83+
"cv_results = sklearn_cross_validate(clf, X, y, cv=5)\ncv_results[\"test_score\"]"
8484
]
8585
},
8686
{
@@ -98,7 +98,7 @@
9898
},
9999
"outputs": [],
100100
"source": [
101-
"scores = sklearn_cross_validate(\n clf, X, y, cv=5,\n scoring=['accuracy', 'precision_macro'],\n)\nprint(scores['test_accuracy'])\nprint(scores['test_precision_macro'])"
101+
"scores = sklearn_cross_validate(\n clf,\n X,\n y,\n cv=5,\n scoring=[\"accuracy\", \"precision_macro\"],\n)\nprint(scores[\"test_accuracy\"])\nprint(scores[\"test_precision_macro\"])"
102102
]
103103
},
104104
{

docs/latest/_downloads/b53d88bff5e11c5ed50d2a0f66cc5fb1/plot_03_cross_validate.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
ML/DS projects.
1111
"""
1212

13-
1413
# %%
1514
import subprocess
1615

@@ -21,8 +20,7 @@
2120
from sklearn import svm
2221
from sklearn.model_selection import cross_validate as sklearn_cross_validate
2322

24-
from skore import load
25-
import skore.cross_validate
23+
import skore
2624

2725

2826
# %%
@@ -39,7 +37,7 @@
3937

4038

4139
# %%
42-
my_project_gs = load("my_project_cv.skore")
40+
my_project_gs = skore.load("my_project_cv.skore")
4341

4442
# %%
4543
# Cross-validation in scikit-learn
@@ -61,25 +59,28 @@
6159

6260
# %%
6361
X, y = datasets.load_iris(return_X_y=True)
64-
clf = svm.SVC(kernel='linear', C=1, random_state=0)
62+
clf = svm.SVC(kernel="linear", C=1, random_state=0)
6563

6664
# %%
6765
# Single metric evaluation using ``cross_validate``:
6866

6967
# %%
7068
cv_results = sklearn_cross_validate(clf, X, y, cv=5)
71-
cv_results['test_score']
69+
cv_results["test_score"]
7270

7371
# %%
7472
# Multiple metric evaluation using ``cross_validate``:
7573

7674
# %%
7775
scores = sklearn_cross_validate(
78-
clf, X, y, cv=5,
79-
scoring=['accuracy', 'precision_macro'],
76+
clf,
77+
X,
78+
y,
79+
cv=5,
80+
scoring=["accuracy", "precision_macro"],
8081
)
81-
print(scores['test_accuracy'])
82-
print(scores['test_precision_macro'])
82+
print(scores["test_accuracy"])
83+
print(scores["test_precision_macro"])
8384

8485
# %%
8586
# In scikit-learn, why do we recommend using ``cross_validate`` over ``cross_val_score``?
Binary file not shown.

docs/latest/_sources/auto_examples/plot_01_getting_started.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ project, such as grid search or cross-validation results.
792792

793793
.. rst-class:: sphx-glr-timing
794794

795-
**Total running time of the script:** (0 minutes 6.924 seconds)
795+
**Total running time of the script:** (0 minutes 7.259 seconds)
796796

797797

798798
.. _sphx_glr_download_auto_examples_plot_01_getting_started.py:

docs/latest/_sources/auto_examples/plot_02_overview_skore_ui.rst.txt

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,9 @@ Numpy array:
459459
.. code-block:: none
460460
461461
462-
array([[-1.35373974, 0.23013285, -0.21272882],
463-
[ 1.60946869, -0.12528379, -0.01554795],
464-
[-1.07571799, -1.32837446, 1.01232954]])
462+
array([[-0.46000552, -0.88204074, -2.56690302],
463+
[ 0.02101194, 0.81484799, -0.4595374 ],
464+
[ 0.38646844, -0.53958006, -0.97968473]])
465465
466466
467467
@@ -513,43 +513,43 @@ Pandas data frame:
513513
<tbody>
514514
<tr>
515515
<th>0</th>
516-
<td>-0.455804</td>
517-
<td>-0.577020</td>
518-
<td>-0.056895</td>
519-
<td>1.694401</td>
520-
<td>0.554412</td>
516+
<td>0.706108</td>
517+
<td>-0.444957</td>
518+
<td>0.518134</td>
519+
<td>0.102208</td>
520+
<td>-0.172436</td>
521521
</tr>
522522
<tr>
523523
<th>1</th>
524-
<td>0.215798</td>
525-
<td>-1.919659</td>
526-
<td>-0.180821</td>
527-
<td>-1.383658</td>
528-
<td>0.320623</td>
524+
<td>-0.867566</td>
525+
<td>0.369605</td>
526+
<td>-0.396423</td>
527+
<td>-0.005231</td>
528+
<td>-0.560875</td>
529529
</tr>
530530
<tr>
531531
<th>2</th>
532-
<td>-0.419148</td>
533-
<td>-1.325382</td>
534-
<td>0.953337</td>
535-
<td>-0.526009</td>
536-
<td>1.735644</td>
532+
<td>0.374918</td>
533+
<td>-0.304119</td>
534+
<td>0.058169</td>
535+
<td>0.828861</td>
536+
<td>1.302512</td>
537537
</tr>
538538
<tr>
539539
<th>3</th>
540-
<td>-2.192932</td>
541-
<td>-0.964590</td>
542-
<td>-0.265942</td>
543-
<td>-0.825370</td>
544-
<td>0.748187</td>
540+
<td>-0.607682</td>
541+
<td>-1.101300</td>
542+
<td>0.493301</td>
543+
<td>0.214144</td>
544+
<td>0.596417</td>
545545
</tr>
546546
<tr>
547547
<th>4</th>
548-
<td>-0.841158</td>
549-
<td>2.310570</td>
550-
<td>-0.224974</td>
551-
<td>0.775593</td>
552-
<td>-0.944139</td>
548+
<td>-1.330183</td>
549+
<td>0.580809</td>
550+
<td>-0.416686</td>
551+
<td>0.788476</td>
552+
<td>0.320062</td>
553553
</tr>
554554
</tbody>
555555
</table>
@@ -2026,7 +2026,7 @@ Moreover, you can store fitted scikit-learn pipelines:
20262026

20272027
.. rst-class:: sphx-glr-timing
20282028

2029-
**Total running time of the script:** (0 minutes 1.525 seconds)
2029+
**Total running time of the script:** (0 minutes 1.462 seconds)
20302030

20312031

20322032
.. _sphx_glr_download_auto_examples_plot_02_overview_skore_ui.py:

docs/latest/_sources/auto_examples/plot_03_cross_validate.rst.txt

Lines changed: 35 additions & 33 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)