Skip to content

Commit 278165f

Browse files
committed
Pushing the docs to dev/ for branch: master, commit faa940608befaeca99db501609c6db796739f30f
1 parent e8d4715 commit 278165f

File tree

1,082 files changed

+3232
-3232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,082 files changed

+3232
-3232
lines changed
-3 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.

dev/_downloads/plot_compare_reduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
},
5252
"outputs": [],
5353
"source": [
54-
"from tempfile import mkdtemp\nfrom shutil import rmtree\nfrom joblib import Memory\n\n# Create a temporary folder to store the transformers of the pipeline\ncachedir = mkdtemp()\nmemory = Memory(___location=cachedir, verbose=10)\ncached_pipe = Pipeline([('reduce_dim', PCA()),\n ('classify', LinearSVC(dual=False, max_iter=10000))],\n memory=memory)\n\n# This time, a cached pipeline will be used within the grid search\ngrid = GridSearchCV(cached_pipe, cv=5, n_jobs=1, param_grid=param_grid)\ndigits = load_digits()\ngrid.fit(digits.data, digits.target)\n\n# Delete the temporary cache before exiting\nrmtree(cachedir)"
54+
"from joblib import Memory\nfrom shutil import rmtree\n\n# Create a temporary folder to store the transformers of the pipeline\n___location = 'cachedir'\nmemory = Memory(___location=___location, verbose=10)\ncached_pipe = Pipeline([('reduce_dim', PCA()),\n ('classify', LinearSVC(dual=False, max_iter=10000))],\n memory=memory)\n\n# This time, a cached pipeline will be used within the grid search\ngrid = GridSearchCV(cached_pipe, cv=5, n_jobs=1, param_grid=param_grid)\ndigits = load_digits()\ngrid.fit(digits.data, digits.target)\n\n# Delete the temporary cache before exiting\nmemory.clear(warn=False)\nrmtree(___location)"
5555
]
5656
},
5757
{

dev/_downloads/plot_compare_reduction.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,12 @@
102102
# cache. Hence, use the ``memory`` constructor parameter when the fitting
103103
# of a transformer is costly.
104104

105-
from tempfile import mkdtemp
106-
from shutil import rmtree
107105
from joblib import Memory
106+
from shutil import rmtree
108107

109108
# Create a temporary folder to store the transformers of the pipeline
110-
cachedir = mkdtemp()
111-
memory = Memory(___location=cachedir, verbose=10)
109+
___location = 'cachedir'
110+
memory = Memory(___location=___location, verbose=10)
112111
cached_pipe = Pipeline([('reduce_dim', PCA()),
113112
('classify', LinearSVC(dual=False, max_iter=10000))],
114113
memory=memory)
@@ -119,7 +118,8 @@
119118
grid.fit(digits.data, digits.target)
120119

121120
# Delete the temporary cache before exiting
122-
rmtree(cachedir)
121+
memory.clear(warn=False)
122+
rmtree(___location)
123123

124124
###############################################################################
125125
# The ``PCA`` fitting is only computed at the evaluation of the first

dev/_downloads/scikit-learn-docs.pdf

19.9 KB
Binary file not shown.

dev/_images/iris.png

0 Bytes
82 Bytes
82 Bytes
611 Bytes
611 Bytes

0 commit comments

Comments
 (0)