scikit-doc 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scikit_doc/__init__.py +328 -0
- scikit_doc/data/NOTEBOOK_EXAMPLES.md +3355 -0
- scikit_doc/data/SKLEARN_ROOT_HELP_1_6_1.txt +412 -0
- scikit_doc/data/USER_GUIDE.md +1088 -0
- scikit_doc/data/WORKED_EXAMPLES.md +4038 -0
- scikit_doc/data/examples.json +1864 -0
- scikit_doc/examples/customer_preprocessing.py +34 -0
- scikit_doc/examples/data_inspection.py +45 -0
- scikit_doc/examples/feature_selection.py +37 -0
- scikit_doc/examples/flight_features.py +49 -0
- scikit_doc/examples/house_cleaning.py +64 -0
- scikit_doc/examples/model_search.py +60 -0
- scikit_doc/examples/pca_ridgecv.py +22 -0
- scikit_doc/examples/regression_models.py +32 -0
- scikit_doc-0.1.0.dist-info/METADATA +21 -0
- scikit_doc-0.1.0.dist-info/RECORD +19 -0
- scikit_doc-0.1.0.dist-info/WHEEL +5 -0
- scikit_doc-0.1.0.dist-info/licenses/LICENSE +21 -0
- scikit_doc-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
Help on package sklearn:
|
|
2
|
+
|
|
3
|
+
NAME
|
|
4
|
+
sklearn - Configure global settings and get information about the working environment.
|
|
5
|
+
|
|
6
|
+
PACKAGE CONTENTS
|
|
7
|
+
__check_build (package)
|
|
8
|
+
_build_utils (package)
|
|
9
|
+
_built_with_meson
|
|
10
|
+
_config
|
|
11
|
+
_distributor_init
|
|
12
|
+
_isotonic
|
|
13
|
+
_loss (package)
|
|
14
|
+
_min_dependencies
|
|
15
|
+
base
|
|
16
|
+
calibration
|
|
17
|
+
cluster (package)
|
|
18
|
+
compose (package)
|
|
19
|
+
conftest
|
|
20
|
+
covariance (package)
|
|
21
|
+
cross_decomposition (package)
|
|
22
|
+
datasets (package)
|
|
23
|
+
decomposition (package)
|
|
24
|
+
discriminant_analysis
|
|
25
|
+
dummy
|
|
26
|
+
ensemble (package)
|
|
27
|
+
exceptions
|
|
28
|
+
experimental (package)
|
|
29
|
+
externals (package)
|
|
30
|
+
feature_extraction (package)
|
|
31
|
+
feature_selection (package)
|
|
32
|
+
frozen (package)
|
|
33
|
+
gaussian_process (package)
|
|
34
|
+
impute (package)
|
|
35
|
+
inspection (package)
|
|
36
|
+
isotonic
|
|
37
|
+
kernel_approximation
|
|
38
|
+
kernel_ridge
|
|
39
|
+
linear_model (package)
|
|
40
|
+
manifold (package)
|
|
41
|
+
metrics (package)
|
|
42
|
+
mixture (package)
|
|
43
|
+
model_selection (package)
|
|
44
|
+
multiclass
|
|
45
|
+
multioutput
|
|
46
|
+
naive_bayes
|
|
47
|
+
neighbors (package)
|
|
48
|
+
neural_network (package)
|
|
49
|
+
pipeline
|
|
50
|
+
preprocessing (package)
|
|
51
|
+
random_projection
|
|
52
|
+
semi_supervised (package)
|
|
53
|
+
svm (package)
|
|
54
|
+
tests (package)
|
|
55
|
+
tree (package)
|
|
56
|
+
utils (package)
|
|
57
|
+
|
|
58
|
+
FUNCTIONS
|
|
59
|
+
clone(estimator, *, safe=True)
|
|
60
|
+
Construct a new unfitted estimator with the same parameters.
|
|
61
|
+
|
|
62
|
+
Clone does a deep copy of the model in an estimator
|
|
63
|
+
without actually copying attached data. It returns a new estimator
|
|
64
|
+
with the same parameters that has not been fitted on any data.
|
|
65
|
+
|
|
66
|
+
.. versionchanged:: 1.3
|
|
67
|
+
Delegates to `estimator.__sklearn_clone__` if the method exists.
|
|
68
|
+
|
|
69
|
+
Parameters
|
|
70
|
+
----------
|
|
71
|
+
estimator : {list, tuple, set} of estimator instance or a single estimator instance
|
|
72
|
+
The estimator or group of estimators to be cloned.
|
|
73
|
+
safe : bool, default=True
|
|
74
|
+
If safe is False, clone will fall back to a deep copy on objects
|
|
75
|
+
that are not estimators. Ignored if `estimator.__sklearn_clone__`
|
|
76
|
+
exists.
|
|
77
|
+
|
|
78
|
+
Returns
|
|
79
|
+
-------
|
|
80
|
+
estimator : object
|
|
81
|
+
The deep copy of the input, an estimator if input is an estimator.
|
|
82
|
+
|
|
83
|
+
Notes
|
|
84
|
+
-----
|
|
85
|
+
If the estimator's `random_state` parameter is an integer (or if the
|
|
86
|
+
estimator doesn't have a `random_state` parameter), an *exact clone* is
|
|
87
|
+
returned: the clone and the original estimator will give the exact same
|
|
88
|
+
results. Otherwise, *statistical clone* is returned: the clone might
|
|
89
|
+
return different results from the original estimator. More details can be
|
|
90
|
+
found in :ref:`randomness`.
|
|
91
|
+
|
|
92
|
+
Examples
|
|
93
|
+
--------
|
|
94
|
+
>>> from sklearn.base import clone
|
|
95
|
+
>>> from sklearn.linear_model import LogisticRegression
|
|
96
|
+
>>> X = [[-1, 0], [0, 1], [0, -1], [1, 0]]
|
|
97
|
+
>>> y = [0, 0, 1, 1]
|
|
98
|
+
>>> classifier = LogisticRegression().fit(X, y)
|
|
99
|
+
>>> cloned_classifier = clone(classifier)
|
|
100
|
+
>>> hasattr(classifier, "classes_")
|
|
101
|
+
True
|
|
102
|
+
>>> hasattr(cloned_classifier, "classes_")
|
|
103
|
+
False
|
|
104
|
+
>>> classifier is cloned_classifier
|
|
105
|
+
False
|
|
106
|
+
|
|
107
|
+
config_context(
|
|
108
|
+
*,
|
|
109
|
+
assume_finite=None,
|
|
110
|
+
working_memory=None,
|
|
111
|
+
print_changed_only=None,
|
|
112
|
+
display=None,
|
|
113
|
+
pairwise_dist_chunk_size=None,
|
|
114
|
+
enable_cython_pairwise_dist=None,
|
|
115
|
+
array_api_dispatch=None,
|
|
116
|
+
transform_output=None,
|
|
117
|
+
enable_metadata_routing=None,
|
|
118
|
+
skip_parameter_validation=None
|
|
119
|
+
)
|
|
120
|
+
Context manager for global scikit-learn configuration.
|
|
121
|
+
|
|
122
|
+
Parameters
|
|
123
|
+
----------
|
|
124
|
+
assume_finite : bool, default=None
|
|
125
|
+
If True, validation for finiteness will be skipped,
|
|
126
|
+
saving time, but leading to potential crashes. If
|
|
127
|
+
False, validation for finiteness will be performed,
|
|
128
|
+
avoiding error. If None, the existing value won't change.
|
|
129
|
+
The default value is False.
|
|
130
|
+
|
|
131
|
+
working_memory : int, default=None
|
|
132
|
+
If set, scikit-learn will attempt to limit the size of temporary arrays
|
|
133
|
+
to this number of MiB (per job when parallelised), often saving both
|
|
134
|
+
computation time and memory on expensive operations that can be
|
|
135
|
+
performed in chunks. If None, the existing value won't change.
|
|
136
|
+
The default value is 1024.
|
|
137
|
+
|
|
138
|
+
print_changed_only : bool, default=None
|
|
139
|
+
If True, only the parameters that were set to non-default
|
|
140
|
+
values will be printed when printing an estimator. For example,
|
|
141
|
+
``print(SVC())`` while True will only print 'SVC()', but would print
|
|
142
|
+
'SVC(C=1.0, cache_size=200, ...)' with all the non-changed parameters
|
|
143
|
+
when False. If None, the existing value won't change.
|
|
144
|
+
The default value is True.
|
|
145
|
+
|
|
146
|
+
.. versionchanged:: 0.23
|
|
147
|
+
Default changed from False to True.
|
|
148
|
+
|
|
149
|
+
display : {'text', 'diagram'}, default=None
|
|
150
|
+
If 'diagram', estimators will be displayed as a diagram in a Jupyter
|
|
151
|
+
lab or notebook context. If 'text', estimators will be displayed as
|
|
152
|
+
text. If None, the existing value won't change.
|
|
153
|
+
The default value is 'diagram'.
|
|
154
|
+
|
|
155
|
+
.. versionadded:: 0.23
|
|
156
|
+
|
|
157
|
+
pairwise_dist_chunk_size : int, default=None
|
|
158
|
+
The number of row vectors per chunk for the accelerated pairwise-
|
|
159
|
+
distances reduction backend. Default is 256 (suitable for most of
|
|
160
|
+
modern laptops' caches and architectures).
|
|
161
|
+
|
|
162
|
+
Intended for easier benchmarking and testing of scikit-learn internals.
|
|
163
|
+
End users are not expected to benefit from customizing this configuration
|
|
164
|
+
setting.
|
|
165
|
+
|
|
166
|
+
.. versionadded:: 1.1
|
|
167
|
+
|
|
168
|
+
enable_cython_pairwise_dist : bool, default=None
|
|
169
|
+
Use the accelerated pairwise-distances reduction backend when
|
|
170
|
+
possible. Global default: True.
|
|
171
|
+
|
|
172
|
+
Intended for easier benchmarking and testing of scikit-learn internals.
|
|
173
|
+
End users are not expected to benefit from customizing this configuration
|
|
174
|
+
setting.
|
|
175
|
+
|
|
176
|
+
.. versionadded:: 1.1
|
|
177
|
+
|
|
178
|
+
array_api_dispatch : bool, default=None
|
|
179
|
+
Use Array API dispatching when inputs follow the Array API standard.
|
|
180
|
+
Default is False.
|
|
181
|
+
|
|
182
|
+
See the :ref:`User Guide <array_api>` for more details.
|
|
183
|
+
|
|
184
|
+
.. versionadded:: 1.2
|
|
185
|
+
|
|
186
|
+
transform_output : str, default=None
|
|
187
|
+
Configure output of `transform` and `fit_transform`.
|
|
188
|
+
|
|
189
|
+
See :ref:`sphx_glr_auto_examples_miscellaneous_plot_set_output.py`
|
|
190
|
+
for an example on how to use the API.
|
|
191
|
+
|
|
192
|
+
- `"default"`: Default output format of a transformer
|
|
193
|
+
- `"pandas"`: DataFrame output
|
|
194
|
+
- `"polars"`: Polars output
|
|
195
|
+
- `None`: Transform configuration is unchanged
|
|
196
|
+
|
|
197
|
+
.. versionadded:: 1.2
|
|
198
|
+
.. versionadded:: 1.4
|
|
199
|
+
`"polars"` option was added.
|
|
200
|
+
|
|
201
|
+
enable_metadata_routing : bool, default=None
|
|
202
|
+
Enable metadata routing. By default this feature is disabled.
|
|
203
|
+
|
|
204
|
+
Refer to :ref:`metadata routing user guide <metadata_routing>` for more
|
|
205
|
+
details.
|
|
206
|
+
|
|
207
|
+
- `True`: Metadata routing is enabled
|
|
208
|
+
- `False`: Metadata routing is disabled, use the old syntax.
|
|
209
|
+
- `None`: Configuration is unchanged
|
|
210
|
+
|
|
211
|
+
.. versionadded:: 1.3
|
|
212
|
+
|
|
213
|
+
skip_parameter_validation : bool, default=None
|
|
214
|
+
If `True`, disable the validation of the hyper-parameters' types and values in
|
|
215
|
+
the fit method of estimators and for arguments passed to public helper
|
|
216
|
+
functions. It can save time in some situations but can lead to low level
|
|
217
|
+
crashes and exceptions with confusing error messages.
|
|
218
|
+
|
|
219
|
+
Note that for data parameters, such as `X` and `y`, only type validation is
|
|
220
|
+
skipped but validation with `check_array` will continue to run.
|
|
221
|
+
|
|
222
|
+
.. versionadded:: 1.3
|
|
223
|
+
|
|
224
|
+
Yields
|
|
225
|
+
------
|
|
226
|
+
None.
|
|
227
|
+
|
|
228
|
+
See Also
|
|
229
|
+
--------
|
|
230
|
+
set_config : Set global scikit-learn configuration.
|
|
231
|
+
get_config : Retrieve current values of the global configuration.
|
|
232
|
+
|
|
233
|
+
Notes
|
|
234
|
+
-----
|
|
235
|
+
All settings, not just those presently modified, will be returned to
|
|
236
|
+
their previous values when the context manager is exited.
|
|
237
|
+
|
|
238
|
+
Examples
|
|
239
|
+
--------
|
|
240
|
+
>>> import sklearn
|
|
241
|
+
>>> from sklearn.utils.validation import assert_all_finite
|
|
242
|
+
>>> with sklearn.config_context(assume_finite=True):
|
|
243
|
+
... assert_all_finite([float('nan')])
|
|
244
|
+
>>> with sklearn.config_context(assume_finite=True):
|
|
245
|
+
... with sklearn.config_context(assume_finite=False):
|
|
246
|
+
... assert_all_finite([float('nan')])
|
|
247
|
+
Traceback (most recent call last):
|
|
248
|
+
...
|
|
249
|
+
ValueError: Input contains NaN...
|
|
250
|
+
|
|
251
|
+
get_config()
|
|
252
|
+
Retrieve current values for configuration set by :func:`set_config`.
|
|
253
|
+
|
|
254
|
+
Returns
|
|
255
|
+
-------
|
|
256
|
+
config : dict
|
|
257
|
+
Keys are parameter names that can be passed to :func:`set_config`.
|
|
258
|
+
|
|
259
|
+
See Also
|
|
260
|
+
--------
|
|
261
|
+
config_context : Context manager for global scikit-learn configuration.
|
|
262
|
+
set_config : Set global scikit-learn configuration.
|
|
263
|
+
|
|
264
|
+
Examples
|
|
265
|
+
--------
|
|
266
|
+
>>> import sklearn
|
|
267
|
+
>>> config = sklearn.get_config()
|
|
268
|
+
>>> config.keys()
|
|
269
|
+
dict_keys([...])
|
|
270
|
+
|
|
271
|
+
set_config(
|
|
272
|
+
assume_finite=None,
|
|
273
|
+
working_memory=None,
|
|
274
|
+
print_changed_only=None,
|
|
275
|
+
display=None,
|
|
276
|
+
pairwise_dist_chunk_size=None,
|
|
277
|
+
enable_cython_pairwise_dist=None,
|
|
278
|
+
array_api_dispatch=None,
|
|
279
|
+
transform_output=None,
|
|
280
|
+
enable_metadata_routing=None,
|
|
281
|
+
skip_parameter_validation=None
|
|
282
|
+
)
|
|
283
|
+
Set global scikit-learn configuration.
|
|
284
|
+
|
|
285
|
+
.. versionadded:: 0.19
|
|
286
|
+
|
|
287
|
+
Parameters
|
|
288
|
+
----------
|
|
289
|
+
assume_finite : bool, default=None
|
|
290
|
+
If True, validation for finiteness will be skipped,
|
|
291
|
+
saving time, but leading to potential crashes. If
|
|
292
|
+
False, validation for finiteness will be performed,
|
|
293
|
+
avoiding error. Global default: False.
|
|
294
|
+
|
|
295
|
+
.. versionadded:: 0.19
|
|
296
|
+
|
|
297
|
+
working_memory : int, default=None
|
|
298
|
+
If set, scikit-learn will attempt to limit the size of temporary arrays
|
|
299
|
+
to this number of MiB (per job when parallelised), often saving both
|
|
300
|
+
computation time and memory on expensive operations that can be
|
|
301
|
+
performed in chunks. Global default: 1024.
|
|
302
|
+
|
|
303
|
+
.. versionadded:: 0.20
|
|
304
|
+
|
|
305
|
+
print_changed_only : bool, default=None
|
|
306
|
+
If True, only the parameters that were set to non-default
|
|
307
|
+
values will be printed when printing an estimator. For example,
|
|
308
|
+
``print(SVC())`` while True will only print 'SVC()' while the default
|
|
309
|
+
behaviour would be to print 'SVC(C=1.0, cache_size=200, ...)' with
|
|
310
|
+
all the non-changed parameters.
|
|
311
|
+
|
|
312
|
+
.. versionadded:: 0.21
|
|
313
|
+
|
|
314
|
+
display : {'text', 'diagram'}, default=None
|
|
315
|
+
If 'diagram', estimators will be displayed as a diagram in a Jupyter
|
|
316
|
+
lab or notebook context. If 'text', estimators will be displayed as
|
|
317
|
+
text. Default is 'diagram'.
|
|
318
|
+
|
|
319
|
+
.. versionadded:: 0.23
|
|
320
|
+
|
|
321
|
+
pairwise_dist_chunk_size : int, default=None
|
|
322
|
+
The number of row vectors per chunk for the accelerated pairwise-
|
|
323
|
+
distances reduction backend. Default is 256 (suitable for most of
|
|
324
|
+
modern laptops' caches and architectures).
|
|
325
|
+
|
|
326
|
+
Intended for easier benchmarking and testing of scikit-learn internals.
|
|
327
|
+
End users are not expected to benefit from customizing this configuration
|
|
328
|
+
setting.
|
|
329
|
+
|
|
330
|
+
.. versionadded:: 1.1
|
|
331
|
+
|
|
332
|
+
enable_cython_pairwise_dist : bool, default=None
|
|
333
|
+
Use the accelerated pairwise-distances reduction backend when
|
|
334
|
+
possible. Global default: True.
|
|
335
|
+
|
|
336
|
+
Intended for easier benchmarking and testing of scikit-learn internals.
|
|
337
|
+
End users are not expected to benefit from customizing this configuration
|
|
338
|
+
setting.
|
|
339
|
+
|
|
340
|
+
.. versionadded:: 1.1
|
|
341
|
+
|
|
342
|
+
array_api_dispatch : bool, default=None
|
|
343
|
+
Use Array API dispatching when inputs follow the Array API standard.
|
|
344
|
+
Default is False.
|
|
345
|
+
|
|
346
|
+
See the :ref:`User Guide <array_api>` for more details.
|
|
347
|
+
|
|
348
|
+
.. versionadded:: 1.2
|
|
349
|
+
|
|
350
|
+
transform_output : str, default=None
|
|
351
|
+
Configure output of `transform` and `fit_transform`.
|
|
352
|
+
|
|
353
|
+
See :ref:`sphx_glr_auto_examples_miscellaneous_plot_set_output.py`
|
|
354
|
+
for an example on how to use the API.
|
|
355
|
+
|
|
356
|
+
- `"default"`: Default output format of a transformer
|
|
357
|
+
- `"pandas"`: DataFrame output
|
|
358
|
+
- `"polars"`: Polars output
|
|
359
|
+
- `None`: Transform configuration is unchanged
|
|
360
|
+
|
|
361
|
+
.. versionadded:: 1.2
|
|
362
|
+
.. versionadded:: 1.4
|
|
363
|
+
`"polars"` option was added.
|
|
364
|
+
|
|
365
|
+
enable_metadata_routing : bool, default=None
|
|
366
|
+
Enable metadata routing. By default this feature is disabled.
|
|
367
|
+
|
|
368
|
+
Refer to :ref:`metadata routing user guide <metadata_routing>` for more
|
|
369
|
+
details.
|
|
370
|
+
|
|
371
|
+
- `True`: Metadata routing is enabled
|
|
372
|
+
- `False`: Metadata routing is disabled, use the old syntax.
|
|
373
|
+
- `None`: Configuration is unchanged
|
|
374
|
+
|
|
375
|
+
.. versionadded:: 1.3
|
|
376
|
+
|
|
377
|
+
skip_parameter_validation : bool, default=None
|
|
378
|
+
If `True`, disable the validation of the hyper-parameters' types and values in
|
|
379
|
+
the fit method of estimators and for arguments passed to public helper
|
|
380
|
+
functions. It can save time in some situations but can lead to low level
|
|
381
|
+
crashes and exceptions with confusing error messages.
|
|
382
|
+
|
|
383
|
+
Note that for data parameters, such as `X` and `y`, only type validation is
|
|
384
|
+
skipped but validation with `check_array` will continue to run.
|
|
385
|
+
|
|
386
|
+
.. versionadded:: 1.3
|
|
387
|
+
|
|
388
|
+
See Also
|
|
389
|
+
--------
|
|
390
|
+
config_context : Context manager for global scikit-learn configuration.
|
|
391
|
+
get_config : Retrieve current values of the global configuration.
|
|
392
|
+
|
|
393
|
+
Examples
|
|
394
|
+
--------
|
|
395
|
+
>>> from sklearn import set_config
|
|
396
|
+
>>> set_config(display='diagram') # doctest: +SKIP
|
|
397
|
+
|
|
398
|
+
show_versions()
|
|
399
|
+
Print useful debugging information"
|
|
400
|
+
|
|
401
|
+
.. versionadded:: 0.20
|
|
402
|
+
|
|
403
|
+
Examples
|
|
404
|
+
--------
|
|
405
|
+
>>> from sklearn import show_versions
|
|
406
|
+
>>> show_versions() # doctest: +SKIP
|
|
407
|
+
|
|
408
|
+
VERSION
|
|
409
|
+
1.6.1
|
|
410
|
+
|
|
411
|
+
FILE
|
|
412
|
+
/usr/local/lib/python3.13/dist-packages/sklearn/__init__.py
|