scikit-learn/doc/modules/classes.rst

1529 lines
34 KiB
ReStructuredText
Raw Normal View History

.. _api_ref:
=============
API Reference
=============
2010-09-01 20:46:46 +08:00
This is the class and function reference of scikit-learn. Please refer to
2011-11-29 23:29:49 +08:00
the :ref:`full user guide <user_guide>` for further details, as the class and
function raw specifications may not be enough to give full guidelines on their
uses.
For reference on concepts repeated across the API, see :ref:`glossary`.
2011-11-29 23:29:49 +08:00
2013-07-23 22:53:23 +08:00
:mod:`sklearn.base`: Base classes and utility functions
=======================================================
.. automodule:: sklearn.base
:no-members:
:no-inherited-members:
Base classes
------------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
base.BaseEstimator
2017-10-19 15:28:58 +08:00
base.BiclusterMixin
base.ClassifierMixin
base.ClusterMixin
2017-10-19 15:28:58 +08:00
base.DensityMixin
base.RegressorMixin
base.TransformerMixin
Functions
---------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
base.clone
base.is_classifier
base.is_regressor
config_context
get_config
set_config
show_versions
.. _calibration_ref:
:mod:`sklearn.calibration`: Probability Calibration
===================================================
.. automodule:: sklearn.calibration
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`calibration` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
calibration.CalibratedClassifierCV
.. autosummary::
:toctree: generated/
:template: function.rst
calibration.calibration_curve
2011-11-29 23:29:49 +08:00
.. _cluster_ref:
2010-09-28 20:43:56 +08:00
:mod:`sklearn.cluster`: Clustering
==================================
2011-11-11 18:41:57 +08:00
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.cluster
:no-members:
:no-inherited-members:
2010-09-28 20:43:56 +08:00
**User guide:** See the :ref:`clustering` section for further details.
Classes
-------
2011-11-29 23:29:49 +08:00
.. currentmodule:: sklearn
2011-11-29 23:29:49 +08:00
.. autosummary::
:toctree: generated/
:template: class.rst
2011-12-21 19:55:27 +08:00
cluster.AffinityPropagation
cluster.AgglomerativeClustering
2014-11-11 01:40:12 +08:00
cluster.Birch
2011-12-21 19:55:27 +08:00
cluster.DBSCAN
OPTICS (#11547) * OPTICS clustering algorithm Equivalent results to DBSCAN, but allows execution on arbitrarily large datasets. After initial construction, allows multiple 'scans' to quickly extract DBSCAN clusters at variable epsilon distances * Create plot_optics Shows example usage of OPTICS to extract clustering structure * pep8 fixes Mainly issues in long lines, long comments * fixed conditional to be pep8 * updated to match sklearn API OPTICS object, with fit method. Documentation updates. extract method * removed extra files * plotting example updated, small changes new plot example that matches the updated API updated n_cluster attribute with reruns of extract removed scaling factor on first ‘fit’ run * updated OPTICS.labels to OPTICS.labels_ should pass unit test now? * additional labels_ changes * added stability warning Scales eps to give stable results from first input distance. Extraction above scaled eps is not allowed; extraction below scaled eps but greater than input distance prints stability warning but still will run clustering extraction. All distances below initial input distance are stable; no warning printed * Noise fix; updated example plot Fixed noise points from being initialized as type ‘core point’ Fixed initialization for first ‘fit’ call Decoupled eps and eps_prime (deep copy) Matched plot example to same random state as dbscan Added second plot to show ‘extract’ usage * Changed to match Sklearn API eps is not modified in init; kwargs fix * Forcing 2 parameters Why do I have to do this? * Conforming to API Fit now returns self; test fix for unit test fail in ball tree (asarray problem) * Fixing plot example labels to labels_ * Fixed issue with sparse matrices * Another attempt at fixing the sparse matrix error Temporary fix until balltree can be updated to deal with sparse matrices. * Better checking of sparse arrays Using ‘check_array’ * General cleanup Removed extraneous lines and comments (old commented out code has been removed) * Added unit tests for extract function Added the unit tests in test_optics for fit, extract, and declaration. Should bring coverage to ~100%. Additionally, fixed a small bug that cropped up in the extract function during testing. * Attempting for near 100% coverage Removed unused imports, added to get warning. * Fixed error in unit tests * Trimmed extraneous 'if-else' check see title * forcing to check for a warning. Result should be 100% coverage * Updates to doc strings All public methods now have doc strings; forcing a rebuild of OPTICS so that build tests pass (last round failed due to external module) * Style / pep8 changes 99% pep8 now… line 138 isn’t, but reads better with the long variable names * Added Narrative Documentation Includes general description, discussion of algorithm output, and comparison with DBSCAN. References and implementation notes are included * Vectorized nneighbors lookups Following suggestion from jnothman for doing nneighbors queries enmass. Added OPTICS to cluster init * fixing init build error * reverting init * All code now vectorized …at least all code that can be ;) Some general pruning and cleanup as well * Style changes Now 100% pep8 * Changing parameter style matching DBSCAN * Extraction change; Authors update —initialize all points as ‘not core’ (fixes bug when plotting at epsPrime larger than eps) —added Sean Freeman to authors list * Changed eps scaling to 5x instead of 10x 10x scaling is too conservative…eps scaling at 5x is perfectly stable, and much faster as well. * Fixing unit test Should be ‘None’ for this; initialization previously at 1 for ‘is_core’ was incorrect * Actually fixing unit test Null comparison doesn’t work, using size * Making ordering_ and other attributes public renamed core_samples to core_sample_indices_ (as in DBSCAN). Used attribute naming conventions (trailing _ character), and made ordering_, reachability_, and core_dists_ public. * Updates for Documentation includes attribute strings for now public attributes * Pep8 cleanup Minor pep8 and pyflakes fixes * updating plot example to match new attribute name * CamelCase fixes conforming to sklearn API on CamelCase * adding hierarchical extraction function Added hierarchical extraction from #2043 #2043 is BSD licensed and hasn’t had any activity for 10 months, so this seems pretty kosher; authors are cited in the code * added hierarchical switch to extract Additional style and documentation changes as well * cluster order bug fix ensured that ordered list is always same length as input data * removed hierarchical cluster extraction Code from FredrikAppelros is totally unable to handle noise— as currently written every point is assigned to a cluster, except the first point of that cluster. May include later as a third method * initial import of automatic cluster extraction code Adding the excellent (and working) automatic cluster extraction code from Amy X. Zhang. Some minor formatting changes on import to conform to pep8 * wrapper for 'auto' extraction additional fixes to style (camelCase, etc.), comments; made all helper functions private * test and example updates Much better example data to showcase ‘auto’ extraction. Unit tests now test both extraction methods. Set ‘auto’ as default, as it doesn’t require any parameters and gives a better result. Pruned references to hierarchical clustering * fixing unit coverage; pruning unused functions probably could still get a better unit test for ‘auto’ clustering… * Added 'filter' fuction Allows density-based filtering. Useful for cases where only a ‘noise’/‘no noise’ classification is desired. Function does not require fitting prior to running, although it can be run after a fit if desired * Vectorizing auto_cluster generalizes input to multiple dimensions as well… * updated filter function * fixing test error setting minPts to < data size returns None (with error message) * removing exception handling in favor of conditional check * Updated unit tests Coverage to 90%. PEP8 fixes * Additional unit test Now at 94%; auto extract method is very hard to test… this new unit test adds a more robust dataset to trigger more branches for testing. Some of the remaining conditionals are pretty rare … :-/ * Fix unit test bug / python 3 compat None type comparison problem… * Fixed annoying deprecation warning for 1d array in BallTree PEP8 Fixes * More PEP8 and remove print statements fromt est * 70 to 80% faster, fixed distance metrics Modified to remove extraneous sorts, nneighbors query, and reduced pairwise distance calculations to the upper triangle of a distance matrix (instead of the full matrix). It appears that in ‘full’ scans (i.e., when epsilon is set to inf, or the width of the data set), OPTICS now actually outperforms DBSCAN… also, should be easy to run distance calculations in parallel now for large datasets, with proper heuristics. * Fixing unit test failure * Exposed auto_cluster parameters as public documentation and API update so that users can tweek the auto method * Fixed def with missing ':' * Fix bugs from api change... make sure that arguments are being called correctly with the new extract_auto() method * pep8 / pyflakes changes * Updated example / plot Correctly generates figure with subplots for DBSCAN / OPTICS comparison * Tuning plot example / pep8 change * Bug fix for commit 0b4cbdd (enforce stable sort) the returned index from “sp.argmin(setofobjects.reachability_[n_pr])” assumes that entires are stably sorted by distance from query point (i.e., that ties in the argmin return the closest point to the input point). Still overall faster compared to the pre 0b4cbdd version, since we’re filtering processed points before sorting by distance… and also only calculating distances for non-processed points, instead of all within the epsilon query. * Code review fixes (style) Fixes coding style (test comments, camel case, author list, relative imports, etc). Included a new unit test and .npy file to explicitly test reachability distances (test coverage at 99%). * fixing new unit test can’t import reach_values.npy in current directory….just placed testing values in script directly (~200 lines for 1500 testing values) * refactored min_heap to c extension reduced optics file by about 100 lines of code… new c extension for speedup (needs further optimization…6-10X speedup still possible) * minor fixes.. * small cython optimizations * cython fixes * Add foo.txt * Remove foo.txt * fix compilation error * last optimizations cython/numpy MinHeap is only called once…so it’s faster to do a simple linear scan here. The np.argmin() function does *almost* the exact same thing, but the custom quick scan function is needed for cases where reachability distances are tied (and the next point is selected based on which of the points tied in reachability are closest to the querying point). OPTICS is now faster than DBSCAN for medium-to-large number of input points, and has better worst case run time (eps=inf). * fix pyflakes errors; change default eps value * _ * API changes from agramfort Removed ‘filter method’, changed print statements to exceptions and warnings as needed, remove ‘processed’ flag and replaced with fit_check method, changed array copies to parameters, updated unit tests, changed inline documentation to match proper doc string formatting, made private class private. Probably some other changes too… * fixed core samples bug * added fit_predict conforming to scipy api * updates to variable names; update plot * refactor to remove balltree specific code * major refactor finished decoupling balltree; lots of changes * fixed bugs; test all pass again :-) * fixed weird cython bug …not at all sure why pairwise_distances doesn’t automatically return np.float arrays. Makes no sense to me. I could understand cases in which the metric call returns int’s (i.e., city block)… but why it would return float.32 instead of float.64 seems super odd. * major refactor deleted extract and auto_extract methods; added optics function; added extract_dbscan method; added extract_dbscan and extract_optics functions; updated unit tests; renamed `eps` to `max_bounds`; flake8 corrections; added types: int —> labels, bool —> is_core, enforced X to be ‘float’ (fixes cython type errors) * Updated Documentation! Updated plot with reachability plot, as well as documentation :) * fix flake8 error * added optics to cluster comparison Don't like the figure since it doesn't use black for noise, but added OPTICS for consistency * Updated comparison plot to transpose ...kinda kludgy fix for the transpose * small fix * flake8 error * reverting transpose of cluster comparison (seperate PR #9739) * fixes from agramfort's review public/private changes, numpydocstring fixes, a few pep8 fixes that flake8 didn't flag for some reason... * fix for error message unit test should pass now * force cluster_id's to start at 0 * Fix sp. error and flake8 warning(s) * Updated documentation responses to reviews * Removed extraneous files also fixed small typo * fixing lgtm alert * changes from jnothman small fixes for docs, plots, and tests * Fixes from jnothman's review Reorded parameters, updated documentation, removed unneeded else statement, changes to varible names. * Fixing flake8 error * Removed neighbors / balltree inheritance Also decouples n_jobs -- can set n_jobs for just the kneighbors lookup, while keeping pairwise lookups to single job * Made nbrs private and moved initiation to fit() also renamed core_dists to core_distances. * fixed non-standard characters * Response to TomDLT review narrative changes to tests. Normalized reachability distances for significant_min parameter. Cleaned up plots; small changes to documentation with optics_.py * Fixed labeling bug also minor documentation updates * update unit test since labels are 0 indexed, max of labels is (1 - total number of clusters). We can't take len(set(clusters)) because of noise (will be 4, not 3). * Simple fixes per jnothman Fixed float division, condensed variable names to be shorter, renamed bools to True and False, removed un-needed code block. Still need to add tests for cluster tree extraction :-( * Auto-cluster tests coverage should be complete now; fixed minor bug; removed un-needed check. * fixing test error * removed python loop also fixed documentation link * Fixing test error * Fix typo in unit test entry was supposed to be '1.0' not '10'; the test is supposed to posit 3 clusters, 2 of which are too small and are merged. Old version posited 4 clusters, two of which were merged as intended, and two of which were discarded (cluster merging requires one of the clusters to be large enough to be an independent cluster; with 4 instead of three, this case did not happen for either of the first two clusters). * documentation updates * Post-merge doctest fix merge conflict in clustering.rst in previous commit; this push updates the doctest values to current correct values, and resolves the conflict * DBSCAN / OPTICS invariant test Restructured documentation. Small unit test fixes. Added test to ensure clustering metrics between OPTICS dbscan_extract and DBSCAN are within 2% of each other. * Update _auto_cluster docstring renamed reachability_ordering --> ordering for consistency * changes fro jnothman changes unit tests to check for specific error message (instead of 'a' error); minor updates to documentation. This also fixes a bug in the extract_dbscan function whereby some core points were erroneously marked as periphery... this is fixed by reverting to a previous extraction code block that initalizes all points as core and then demotes noise and periphery points during the extract scan. Parameterized unit test. * fix spelling error in tests * contingency_matrix test New invarient test between optics and dbscan * small unit test updates per jnothman * unit test typo fix * extract dbscan updates Vectorized extract dbscan function to see if would improve performance of periphery point labeling; it did not, but the function is vectorized. Changed unit test with min_samples=1 to min_samples=3, as at min_samples=1 the test isn't meaningful (no noise is possible, all points are marked core). Parameterized parity test. Changed parity test to assert ~5% or better mismatch, instead of 5 points (this is needed for larger clusters, as the starting point mismatch effect scales with cluster size). * updated documentation comparing OPTICS/DBSCAN * DOC: phrasing and whats_new * MISC: small mem footprint in OPTICS
2018-07-16 19:10:42 +08:00
cluster.OPTICS
cluster.FeatureAgglomeration
2011-11-29 23:29:49 +08:00
cluster.KMeans
cluster.MiniBatchKMeans
cluster.MeanShift
cluster.SpectralClustering
Functions
---------
.. autosummary::
:toctree: generated/
:template: function.rst
cluster.affinity_propagation
cluster.dbscan
OPTICS (#11547) * OPTICS clustering algorithm Equivalent results to DBSCAN, but allows execution on arbitrarily large datasets. After initial construction, allows multiple 'scans' to quickly extract DBSCAN clusters at variable epsilon distances * Create plot_optics Shows example usage of OPTICS to extract clustering structure * pep8 fixes Mainly issues in long lines, long comments * fixed conditional to be pep8 * updated to match sklearn API OPTICS object, with fit method. Documentation updates. extract method * removed extra files * plotting example updated, small changes new plot example that matches the updated API updated n_cluster attribute with reruns of extract removed scaling factor on first ‘fit’ run * updated OPTICS.labels to OPTICS.labels_ should pass unit test now? * additional labels_ changes * added stability warning Scales eps to give stable results from first input distance. Extraction above scaled eps is not allowed; extraction below scaled eps but greater than input distance prints stability warning but still will run clustering extraction. All distances below initial input distance are stable; no warning printed * Noise fix; updated example plot Fixed noise points from being initialized as type ‘core point’ Fixed initialization for first ‘fit’ call Decoupled eps and eps_prime (deep copy) Matched plot example to same random state as dbscan Added second plot to show ‘extract’ usage * Changed to match Sklearn API eps is not modified in init; kwargs fix * Forcing 2 parameters Why do I have to do this? * Conforming to API Fit now returns self; test fix for unit test fail in ball tree (asarray problem) * Fixing plot example labels to labels_ * Fixed issue with sparse matrices * Another attempt at fixing the sparse matrix error Temporary fix until balltree can be updated to deal with sparse matrices. * Better checking of sparse arrays Using ‘check_array’ * General cleanup Removed extraneous lines and comments (old commented out code has been removed) * Added unit tests for extract function Added the unit tests in test_optics for fit, extract, and declaration. Should bring coverage to ~100%. Additionally, fixed a small bug that cropped up in the extract function during testing. * Attempting for near 100% coverage Removed unused imports, added to get warning. * Fixed error in unit tests * Trimmed extraneous 'if-else' check see title * forcing to check for a warning. Result should be 100% coverage * Updates to doc strings All public methods now have doc strings; forcing a rebuild of OPTICS so that build tests pass (last round failed due to external module) * Style / pep8 changes 99% pep8 now… line 138 isn’t, but reads better with the long variable names * Added Narrative Documentation Includes general description, discussion of algorithm output, and comparison with DBSCAN. References and implementation notes are included * Vectorized nneighbors lookups Following suggestion from jnothman for doing nneighbors queries enmass. Added OPTICS to cluster init * fixing init build error * reverting init * All code now vectorized …at least all code that can be ;) Some general pruning and cleanup as well * Style changes Now 100% pep8 * Changing parameter style matching DBSCAN * Extraction change; Authors update —initialize all points as ‘not core’ (fixes bug when plotting at epsPrime larger than eps) —added Sean Freeman to authors list * Changed eps scaling to 5x instead of 10x 10x scaling is too conservative…eps scaling at 5x is perfectly stable, and much faster as well. * Fixing unit test Should be ‘None’ for this; initialization previously at 1 for ‘is_core’ was incorrect * Actually fixing unit test Null comparison doesn’t work, using size * Making ordering_ and other attributes public renamed core_samples to core_sample_indices_ (as in DBSCAN). Used attribute naming conventions (trailing _ character), and made ordering_, reachability_, and core_dists_ public. * Updates for Documentation includes attribute strings for now public attributes * Pep8 cleanup Minor pep8 and pyflakes fixes * updating plot example to match new attribute name * CamelCase fixes conforming to sklearn API on CamelCase * adding hierarchical extraction function Added hierarchical extraction from #2043 #2043 is BSD licensed and hasn’t had any activity for 10 months, so this seems pretty kosher; authors are cited in the code * added hierarchical switch to extract Additional style and documentation changes as well * cluster order bug fix ensured that ordered list is always same length as input data * removed hierarchical cluster extraction Code from FredrikAppelros is totally unable to handle noise— as currently written every point is assigned to a cluster, except the first point of that cluster. May include later as a third method * initial import of automatic cluster extraction code Adding the excellent (and working) automatic cluster extraction code from Amy X. Zhang. Some minor formatting changes on import to conform to pep8 * wrapper for 'auto' extraction additional fixes to style (camelCase, etc.), comments; made all helper functions private * test and example updates Much better example data to showcase ‘auto’ extraction. Unit tests now test both extraction methods. Set ‘auto’ as default, as it doesn’t require any parameters and gives a better result. Pruned references to hierarchical clustering * fixing unit coverage; pruning unused functions probably could still get a better unit test for ‘auto’ clustering… * Added 'filter' fuction Allows density-based filtering. Useful for cases where only a ‘noise’/‘no noise’ classification is desired. Function does not require fitting prior to running, although it can be run after a fit if desired * Vectorizing auto_cluster generalizes input to multiple dimensions as well… * updated filter function * fixing test error setting minPts to < data size returns None (with error message) * removing exception handling in favor of conditional check * Updated unit tests Coverage to 90%. PEP8 fixes * Additional unit test Now at 94%; auto extract method is very hard to test… this new unit test adds a more robust dataset to trigger more branches for testing. Some of the remaining conditionals are pretty rare … :-/ * Fix unit test bug / python 3 compat None type comparison problem… * Fixed annoying deprecation warning for 1d array in BallTree PEP8 Fixes * More PEP8 and remove print statements fromt est * 70 to 80% faster, fixed distance metrics Modified to remove extraneous sorts, nneighbors query, and reduced pairwise distance calculations to the upper triangle of a distance matrix (instead of the full matrix). It appears that in ‘full’ scans (i.e., when epsilon is set to inf, or the width of the data set), OPTICS now actually outperforms DBSCAN… also, should be easy to run distance calculations in parallel now for large datasets, with proper heuristics. * Fixing unit test failure * Exposed auto_cluster parameters as public documentation and API update so that users can tweek the auto method * Fixed def with missing ':' * Fix bugs from api change... make sure that arguments are being called correctly with the new extract_auto() method * pep8 / pyflakes changes * Updated example / plot Correctly generates figure with subplots for DBSCAN / OPTICS comparison * Tuning plot example / pep8 change * Bug fix for commit 0b4cbdd (enforce stable sort) the returned index from “sp.argmin(setofobjects.reachability_[n_pr])” assumes that entires are stably sorted by distance from query point (i.e., that ties in the argmin return the closest point to the input point). Still overall faster compared to the pre 0b4cbdd version, since we’re filtering processed points before sorting by distance… and also only calculating distances for non-processed points, instead of all within the epsilon query. * Code review fixes (style) Fixes coding style (test comments, camel case, author list, relative imports, etc). Included a new unit test and .npy file to explicitly test reachability distances (test coverage at 99%). * fixing new unit test can’t import reach_values.npy in current directory….just placed testing values in script directly (~200 lines for 1500 testing values) * refactored min_heap to c extension reduced optics file by about 100 lines of code… new c extension for speedup (needs further optimization…6-10X speedup still possible) * minor fixes.. * small cython optimizations * cython fixes * Add foo.txt * Remove foo.txt * fix compilation error * last optimizations cython/numpy MinHeap is only called once…so it’s faster to do a simple linear scan here. The np.argmin() function does *almost* the exact same thing, but the custom quick scan function is needed for cases where reachability distances are tied (and the next point is selected based on which of the points tied in reachability are closest to the querying point). OPTICS is now faster than DBSCAN for medium-to-large number of input points, and has better worst case run time (eps=inf). * fix pyflakes errors; change default eps value * _ * API changes from agramfort Removed ‘filter method’, changed print statements to exceptions and warnings as needed, remove ‘processed’ flag and replaced with fit_check method, changed array copies to parameters, updated unit tests, changed inline documentation to match proper doc string formatting, made private class private. Probably some other changes too… * fixed core samples bug * added fit_predict conforming to scipy api * updates to variable names; update plot * refactor to remove balltree specific code * major refactor finished decoupling balltree; lots of changes * fixed bugs; test all pass again :-) * fixed weird cython bug …not at all sure why pairwise_distances doesn’t automatically return np.float arrays. Makes no sense to me. I could understand cases in which the metric call returns int’s (i.e., city block)… but why it would return float.32 instead of float.64 seems super odd. * major refactor deleted extract and auto_extract methods; added optics function; added extract_dbscan method; added extract_dbscan and extract_optics functions; updated unit tests; renamed `eps` to `max_bounds`; flake8 corrections; added types: int —> labels, bool —> is_core, enforced X to be ‘float’ (fixes cython type errors) * Updated Documentation! Updated plot with reachability plot, as well as documentation :) * fix flake8 error * added optics to cluster comparison Don't like the figure since it doesn't use black for noise, but added OPTICS for consistency * Updated comparison plot to transpose ...kinda kludgy fix for the transpose * small fix * flake8 error * reverting transpose of cluster comparison (seperate PR #9739) * fixes from agramfort's review public/private changes, numpydocstring fixes, a few pep8 fixes that flake8 didn't flag for some reason... * fix for error message unit test should pass now * force cluster_id's to start at 0 * Fix sp. error and flake8 warning(s) * Updated documentation responses to reviews * Removed extraneous files also fixed small typo * fixing lgtm alert * changes from jnothman small fixes for docs, plots, and tests * Fixes from jnothman's review Reorded parameters, updated documentation, removed unneeded else statement, changes to varible names. * Fixing flake8 error * Removed neighbors / balltree inheritance Also decouples n_jobs -- can set n_jobs for just the kneighbors lookup, while keeping pairwise lookups to single job * Made nbrs private and moved initiation to fit() also renamed core_dists to core_distances. * fixed non-standard characters * Response to TomDLT review narrative changes to tests. Normalized reachability distances for significant_min parameter. Cleaned up plots; small changes to documentation with optics_.py * Fixed labeling bug also minor documentation updates * update unit test since labels are 0 indexed, max of labels is (1 - total number of clusters). We can't take len(set(clusters)) because of noise (will be 4, not 3). * Simple fixes per jnothman Fixed float division, condensed variable names to be shorter, renamed bools to True and False, removed un-needed code block. Still need to add tests for cluster tree extraction :-( * Auto-cluster tests coverage should be complete now; fixed minor bug; removed un-needed check. * fixing test error * removed python loop also fixed documentation link * Fixing test error * Fix typo in unit test entry was supposed to be '1.0' not '10'; the test is supposed to posit 3 clusters, 2 of which are too small and are merged. Old version posited 4 clusters, two of which were merged as intended, and two of which were discarded (cluster merging requires one of the clusters to be large enough to be an independent cluster; with 4 instead of three, this case did not happen for either of the first two clusters). * documentation updates * Post-merge doctest fix merge conflict in clustering.rst in previous commit; this push updates the doctest values to current correct values, and resolves the conflict * DBSCAN / OPTICS invariant test Restructured documentation. Small unit test fixes. Added test to ensure clustering metrics between OPTICS dbscan_extract and DBSCAN are within 2% of each other. * Update _auto_cluster docstring renamed reachability_ordering --> ordering for consistency * changes fro jnothman changes unit tests to check for specific error message (instead of 'a' error); minor updates to documentation. This also fixes a bug in the extract_dbscan function whereby some core points were erroneously marked as periphery... this is fixed by reverting to a previous extraction code block that initalizes all points as core and then demotes noise and periphery points during the extract scan. Parameterized unit test. * fix spelling error in tests * contingency_matrix test New invarient test between optics and dbscan * small unit test updates per jnothman * unit test typo fix * extract dbscan updates Vectorized extract dbscan function to see if would improve performance of periphery point labeling; it did not, but the function is vectorized. Changed unit test with min_samples=1 to min_samples=3, as at min_samples=1 the test isn't meaningful (no noise is possible, all points are marked core). Parameterized parity test. Changed parity test to assert ~5% or better mismatch, instead of 5 points (this is needed for larger clusters, as the starting point mismatch effect scales with cluster size). * updated documentation comparing OPTICS/DBSCAN * DOC: phrasing and whats_new * MISC: small mem footprint in OPTICS
2018-07-16 19:10:42 +08:00
cluster.optics
cluster.estimate_bandwidth
cluster.k_means
cluster.mean_shift
cluster.spectral_clustering
cluster.ward_tree
2011-11-29 23:29:49 +08:00
.. _bicluster_ref:
:mod:`sklearn.cluster.bicluster`: Biclustering
2013-07-28 00:16:36 +08:00
==============================================
.. automodule:: sklearn.cluster.bicluster
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`biclustering` section for further details.
Classes
-------
.. currentmodule:: sklearn.cluster.bicluster
.. autosummary::
:toctree: generated/
:template: class.rst
SpectralBiclustering
SpectralCoclustering
.. _compose_ref:
:mod:`sklearn.compose`: Composite Estimators
============================================
.. automodule:: sklearn.compose
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`combining_estimators` section for further
details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated
:template: class.rst
compose.ColumnTransformer
compose.TransformedTargetRegressor
.. autosummary::
:toctree: generated/
:template: function.rst
compose.make_column_transformer
2011-11-29 23:29:49 +08:00
.. _covariance_ref:
:mod:`sklearn.covariance`: Covariance Estimators
================================================
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.covariance
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`covariance` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
2010-09-01 22:05:51 +08:00
:template: class.rst
2011-11-29 23:29:49 +08:00
covariance.EmpiricalCovariance
covariance.EllipticEnvelope
covariance.GraphicalLasso
covariance.GraphicalLassoCV
covariance.LedoitWolf
covariance.MinCovDet
covariance.OAS
covariance.ShrunkCovariance
2011-04-26 16:30:52 +08:00
.. autosummary::
:toctree: generated/
:template: function.rst
2011-11-29 23:29:49 +08:00
covariance.empirical_covariance
covariance.graphical_lasso
2011-11-29 23:29:49 +08:00
covariance.ledoit_wolf
covariance.oas
covariance.shrunk_covariance
2011-04-26 16:30:52 +08:00
.. _cross_decomposition_ref:
2011-04-26 16:30:52 +08:00
:mod:`sklearn.cross_decomposition`: Cross decomposition
=======================================================
2010-09-01 20:46:46 +08:00
.. automodule:: sklearn.cross_decomposition
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`cross_decomposition` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
2010-09-28 20:43:56 +08:00
:template: class.rst
cross_decomposition.CCA
cross_decomposition.PLSCanonical
cross_decomposition.PLSRegression
cross_decomposition.PLSSVD
2010-09-02 20:18:30 +08:00
2011-11-29 23:29:49 +08:00
.. _datasets_ref:
:mod:`sklearn.datasets`: Datasets
=================================
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.datasets
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`datasets` section for further details.
Loaders
-------
2011-11-29 23:29:49 +08:00
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
datasets.clear_data_home
datasets.dump_svmlight_file
datasets.fetch_20newsgroups
datasets.fetch_20newsgroups_vectorized
datasets.fetch_california_housing
datasets.fetch_covtype
datasets.fetch_kddcup99
datasets.fetch_lfw_pairs
datasets.fetch_lfw_people
datasets.fetch_olivetti_faces
2018-08-15 15:21:20 +08:00
datasets.fetch_openml
datasets.fetch_rcv1
datasets.fetch_species_distributions
datasets.get_data_home
2011-11-29 23:29:49 +08:00
datasets.load_boston
datasets.load_breast_cancer
2011-11-29 23:29:49 +08:00
datasets.load_diabetes
datasets.load_digits
datasets.load_files
2011-11-29 23:29:49 +08:00
datasets.load_iris
datasets.load_linnerud
datasets.load_sample_image
datasets.load_sample_images
datasets.load_svmlight_file
datasets.load_svmlight_files
datasets.load_wine
2011-11-29 23:29:49 +08:00
Samples generator
-----------------
2011-11-29 23:29:49 +08:00
.. currentmodule:: sklearn
.. autosummary::
2011-11-29 23:29:49 +08:00
:toctree: generated/
:template: function.rst
datasets.make_biclusters
2011-11-29 23:29:49 +08:00
datasets.make_blobs
datasets.make_checkerboard
datasets.make_circles
datasets.make_classification
2011-11-29 23:29:49 +08:00
datasets.make_friedman1
datasets.make_friedman2
datasets.make_friedman3
2013-07-25 20:33:12 +08:00
datasets.make_gaussian_quantiles
2012-03-31 22:40:31 +08:00
datasets.make_hastie_10_2
2011-11-29 23:29:49 +08:00
datasets.make_low_rank_matrix
datasets.make_moons
datasets.make_multilabel_classification
datasets.make_regression
datasets.make_s_curve
2011-11-29 23:29:49 +08:00
datasets.make_sparse_coded_signal
datasets.make_sparse_spd_matrix
2011-11-29 23:29:49 +08:00
datasets.make_sparse_uncorrelated
datasets.make_spd_matrix
datasets.make_swiss_roll
2011-11-29 23:29:49 +08:00
.. _decomposition_ref:
:mod:`sklearn.decomposition`: Matrix Decomposition
==================================================
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.decomposition
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`decompositions` section for further details.
2011-09-04 02:54:12 +08:00
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
decomposition.DictionaryLearning
decomposition.FactorAnalysis
2011-11-29 23:29:49 +08:00
decomposition.FastICA
decomposition.IncrementalPCA
decomposition.KernelPCA
decomposition.LatentDirichletAllocation
decomposition.MiniBatchDictionaryLearning
decomposition.MiniBatchSparsePCA
2011-11-29 23:29:49 +08:00
decomposition.NMF
decomposition.PCA
2011-11-29 23:29:49 +08:00
decomposition.SparsePCA
decomposition.SparseCoder
decomposition.TruncatedSVD
.. autosummary::
:toctree: generated/
:template: function.rst
2011-11-29 23:29:49 +08:00
decomposition.dict_learning
decomposition.dict_learning_online
decomposition.fastica
2011-11-29 23:29:49 +08:00
decomposition.sparse_encode
.. _lda_ref:
:mod:`sklearn.discriminant_analysis`: Discriminant Analysis
===========================================================
.. automodule:: sklearn.discriminant_analysis
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`lda_qda` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated
:template: class.rst
discriminant_analysis.LinearDiscriminantAnalysis
discriminant_analysis.QuadraticDiscriminantAnalysis
2012-11-19 22:02:48 +08:00
.. _dummy_ref:
:mod:`sklearn.dummy`: Dummy estimators
======================================
.. automodule:: sklearn.dummy
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`model_evaluation` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
dummy.DummyClassifier
dummy.DummyRegressor
.. autosummary::
:toctree: generated/
:template: function.rst
2011-11-29 23:29:49 +08:00
.. _ensemble_ref:
:mod:`sklearn.ensemble`: Ensemble Methods
=========================================
.. automodule:: sklearn.ensemble
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`ensemble` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
2012-12-18 23:19:49 +08:00
ensemble.AdaBoostClassifier
ensemble.AdaBoostRegressor
2013-07-23 18:59:32 +08:00
ensemble.BaggingClassifier
ensemble.BaggingRegressor
ensemble.ExtraTreesClassifier
ensemble.ExtraTreesRegressor
ensemble.GradientBoostingClassifier
ensemble.GradientBoostingRegressor
iforest example + benchmark explanation make some private functions + fix public API IForest using BaseForest base class for trees debug + plot_iforest classic anomaly detection datasets and benchmark small modif BaseBagging inheritance shuffle dataset before benchmarking BaseBagging inheritance remove class label 4 from shuttle dataset pep8 + rm shuttle.csv bench_IsolationForest.png + doc decision_function add tests remove comments fetching kddcup99 and shuttle datasets fetching kddcup99 and shuttle datasets pep8 fetching kddcup99 and shuttle datasets pep8 new files iforest.py and test_iforest.py sc alternative to pandas (but very slow) in kddcup99.py faster parser sc pep8 + cleanup + simplification example outlier detection clean and correct idem random_state added percent10=True in benchmark mc remove shuttle + minor changes sc undo modif on forest.py and recompile cython on _tree.c fix travis cosmit change bagging to fix travis Revert "change bagging to fix travis" This reverts commit 30ea500eb818c7a2c6ea5c3d63e75c6935aa3a35. add max_samples_ in BaseBagging.fit to fix travis mc API : don't add fit param but use a private _fit + update tests + examples to avoid warning adapt to the new structure of _tree.pyx cosmit add performance test for iforest add _tree.c _utils.c _criterion.c TST : pass on tests remove test relax roc-auc to fix AppVeyor add test on toy samples Handle depth averaging at python level plot example: rm html add png load_kddcup99 -> fetch_kddcup99 + doc Take into account arjoly comments sh -> shuffle add decision_path code from #5487 to bench Take into account arjoly comments Revert "add decision_path code from #5487 to bench" This reverts commit 46ad44ab487f4fd2728d927cbe09000330e8663e. fix bug with max_samples != int
2015-01-26 23:05:27 +08:00
ensemble.IsolationForest
2013-07-23 18:59:32 +08:00
ensemble.RandomForestClassifier
ensemble.RandomForestRegressor
ensemble.RandomTreesEmbedding
ensemble.VotingClassifier
.. autosummary::
:toctree: generated/
:template: function.rst
partial dependence
------------------
.. automodule:: sklearn.ensemble.partial_dependence
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
ensemble.partial_dependence.partial_dependence
ensemble.partial_dependence.plot_partial_dependence
.. _exceptions_ref:
:mod:`sklearn.exceptions`: Exceptions and warnings
==================================================
.. automodule:: sklearn.exceptions
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class_without_init.rst
exceptions.ChangedBehaviorWarning
exceptions.ConvergenceWarning
exceptions.DataConversionWarning
exceptions.DataDimensionalityWarning
exceptions.EfficiencyWarning
exceptions.FitFailedWarning
exceptions.NotFittedError
exceptions.NonBLASDotWarning
exceptions.UndefinedMetricWarning
2011-11-29 23:29:49 +08:00
.. _feature_extraction_ref:
2010-10-07 15:42:52 +08:00
:mod:`sklearn.feature_extraction`: Feature Extraction
=====================================================
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.feature_extraction
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`feature_extraction` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
feature_extraction.DictVectorizer
feature_extraction.FeatureHasher
2011-11-29 23:29:49 +08:00
From images
-----------
2011-11-11 18:41:57 +08:00
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.feature_extraction.image
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
2010-09-28 20:43:56 +08:00
.. autosummary::
:toctree: generated/
2011-11-29 23:29:49 +08:00
:template: function.rst
2010-09-28 20:43:56 +08:00
2011-11-29 23:29:49 +08:00
feature_extraction.image.extract_patches_2d
feature_extraction.image.grid_to_graph
feature_extraction.image.img_to_graph
2011-11-29 23:29:49 +08:00
feature_extraction.image.reconstruct_from_patches_2d
2011-11-29 23:29:49 +08:00
:template: class.rst
2011-11-29 23:29:49 +08:00
feature_extraction.image.PatchExtractor
2010-09-28 20:43:56 +08:00
.. _text_feature_extraction_ref:
2011-11-29 23:29:49 +08:00
From text
---------
2011-11-11 18:41:57 +08:00
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.feature_extraction.text
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
2010-09-28 20:43:56 +08:00
.. autosummary::
:toctree: generated/
:template: class.rst
2011-11-29 23:29:49 +08:00
feature_extraction.text.CountVectorizer
2012-12-23 21:43:48 +08:00
feature_extraction.text.HashingVectorizer
2011-11-29 23:29:49 +08:00
feature_extraction.text.TfidfTransformer
feature_extraction.text.TfidfVectorizer
2010-10-01 21:06:45 +08:00
2010-09-28 20:43:56 +08:00
.. _feature_selection_ref:
:mod:`sklearn.feature_selection`: Feature Selection
===================================================
.. automodule:: sklearn.feature_selection
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`feature_selection` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
feature_selection.GenericUnivariateSelect
feature_selection.SelectPercentile
feature_selection.SelectKBest
feature_selection.SelectFpr
feature_selection.SelectFdr
2015-09-23 05:05:16 +08:00
feature_selection.SelectFromModel
feature_selection.SelectFwe
feature_selection.RFE
feature_selection.RFECV
feature_selection.VarianceThreshold
.. autosummary::
:toctree: generated/
:template: function.rst
feature_selection.chi2
feature_selection.f_classif
feature_selection.f_regression
feature_selection.mutual_info_classif
feature_selection.mutual_info_regression
2011-11-29 23:29:49 +08:00
.. _gaussian_process_ref:
:mod:`sklearn.gaussian_process`: Gaussian Processes
===================================================
2011-11-11 18:41:57 +08:00
.. automodule:: sklearn.gaussian_process
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`gaussian_process` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
gaussian_process.GaussianProcessClassifier
gaussian_process.GaussianProcessRegressor
Kernels:
.. autosummary::
:toctree: generated/
:template: class_with_call.rst
gaussian_process.kernels.CompoundKernel
gaussian_process.kernels.ConstantKernel
gaussian_process.kernels.DotProduct
gaussian_process.kernels.ExpSineSquared
gaussian_process.kernels.Exponentiation
gaussian_process.kernels.Hyperparameter
2015-08-19 22:37:58 +08:00
gaussian_process.kernels.Kernel
gaussian_process.kernels.Matern
gaussian_process.kernels.PairwiseKernel
gaussian_process.kernels.Product
gaussian_process.kernels.RBF
gaussian_process.kernels.RationalQuadratic
gaussian_process.kernels.Sum
gaussian_process.kernels.WhiteKernel
.. _isotonic_ref:
:mod:`sklearn.isotonic`: Isotonic regression
============================================
.. automodule:: sklearn.isotonic
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`isotonic` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
isotonic.IsotonicRegression
.. autosummary::
:toctree: generated
:template: function.rst
2014-05-24 20:55:21 +08:00
isotonic.check_increasing
isotonic.isotonic_regression
2014-05-24 20:55:21 +08:00
.. _impute_ref:
:mod:`sklearn.impute`: Impute
=============================
.. automodule:: sklearn.impute
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`Impute` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
impute.SimpleImputer
impute.MissingIndicator
2018-07-18 03:45:36 +08:00
.. _kernel_approximation_ref:
:mod:`sklearn.kernel_approximation` Kernel Approximation
========================================================
.. automodule:: sklearn.kernel_approximation
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`kernel_approximation` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
kernel_approximation.AdditiveChi2Sampler
kernel_approximation.Nystroem
kernel_approximation.RBFSampler
kernel_approximation.SkewedChi2Sampler
2015-01-18 17:47:09 +08:00
.. _kernel_ridge_ref:
:mod:`sklearn.kernel_ridge` Kernel Ridge Regression
2015-01-18 17:47:09 +08:00
========================================================
.. automodule:: sklearn.kernel_ridge
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`kernel_ridge` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
kernel_ridge.KernelRidge
2011-11-29 23:29:49 +08:00
.. _linear_model_ref:
:mod:`sklearn.linear_model`: Generalized Linear Models
======================================================
.. automodule:: sklearn.linear_model
:no-members:
:no-inherited-members:
2011-11-29 23:29:49 +08:00
2011-11-30 03:58:20 +08:00
**User guide:** See the :ref:`linear_model` section for further details.
2011-11-29 23:29:49 +08:00
.. currentmodule:: sklearn
2010-09-28 20:43:56 +08:00
.. autosummary::
:toctree: generated/
:template: class.rst
linear_model.ARDRegression
linear_model.BayesianRidge
2011-11-29 23:29:49 +08:00
linear_model.ElasticNet
linear_model.ElasticNetCV
linear_model.HuberRegressor
2011-11-29 23:29:49 +08:00
linear_model.Lars
linear_model.LarsCV
linear_model.Lasso
linear_model.LassoCV
linear_model.LassoLars
2011-11-29 23:29:49 +08:00
linear_model.LassoLarsCV
linear_model.LassoLarsIC
linear_model.LinearRegression
2011-11-29 23:29:49 +08:00
linear_model.LogisticRegression
2014-07-23 00:19:04 +08:00
linear_model.LogisticRegressionCV
linear_model.MultiTaskLasso
linear_model.MultiTaskElasticNet
linear_model.MultiTaskLassoCV
linear_model.MultiTaskElasticNetCV
2011-11-29 23:29:49 +08:00
linear_model.OrthogonalMatchingPursuit
2013-07-26 15:50:30 +08:00
linear_model.OrthogonalMatchingPursuitCV
linear_model.PassiveAggressiveClassifier
linear_model.PassiveAggressiveRegressor
2012-01-29 01:53:19 +08:00
linear_model.Perceptron
linear_model.RANSACRegressor
linear_model.Ridge
linear_model.RidgeClassifier
linear_model.RidgeClassifierCV
linear_model.RidgeCV
linear_model.SGDClassifier
linear_model.SGDRegressor
linear_model.TheilSenRegressor
2011-11-29 23:29:49 +08:00
.. autosummary::
:toctree: generated/
:template: function.rst
linear_model.enet_path
2011-11-29 23:29:49 +08:00
linear_model.lars_path
linear_model.lasso_path
2011-11-29 23:29:49 +08:00
linear_model.orthogonal_mp
linear_model.orthogonal_mp_gram
linear_model.ridge_regression
2011-11-29 23:29:49 +08:00
.. _manifold_ref:
:mod:`sklearn.manifold`: Manifold Learning
==========================================
.. automodule:: sklearn.manifold
:no-members:
:no-inherited-members:
2011-11-29 23:29:49 +08:00
2011-11-30 03:58:20 +08:00
**User guide:** See the :ref:`manifold` section for further details.
2011-11-29 23:29:49 +08:00
.. currentmodule:: sklearn
2011-11-29 23:29:49 +08:00
.. autosummary::
:toctree: generated
:template: class.rst
manifold.Isomap
manifold.LocallyLinearEmbedding
2012-05-30 14:32:36 +08:00
manifold.MDS
2012-11-19 15:15:46 +08:00
manifold.SpectralEmbedding
2014-02-13 05:47:34 +08:00
manifold.TSNE
2011-11-29 23:29:49 +08:00
.. autosummary::
:toctree: generated
:template: function.rst
manifold.locally_linear_embedding
manifold.smacof
manifold.spectral_embedding
2011-11-29 23:29:49 +08:00
2010-09-28 20:43:56 +08:00
2011-11-29 23:29:49 +08:00
.. _metrics_ref:
2010-09-28 20:43:56 +08:00
:mod:`sklearn.metrics`: Metrics
===============================
2011-03-01 01:18:37 +08:00
See the :ref:`model_evaluation` section and the :ref:`metrics` section of the
user guide for further details.
.. automodule:: sklearn.metrics
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
2011-03-01 01:18:37 +08:00
Model Selection Interface
-------------------------
See the :ref:`scoring_parameter` section of the user guide for further
details.
2012-12-19 16:36:12 +08:00
.. autosummary::
:toctree: generated/
:template: function.rst
2012-12-19 16:36:12 +08:00
metrics.check_scoring
metrics.get_scorer
metrics.make_scorer
2012-12-19 16:36:12 +08:00
Classification metrics
----------------------
See the :ref:`classification_metrics` section of the user guide for further
details.
2011-03-01 01:18:37 +08:00
.. autosummary::
:toctree: generated/
:template: function.rst
metrics.accuracy_score
2011-03-01 01:18:37 +08:00
metrics.auc
metrics.average_precision_score
metrics.balanced_accuracy_score
metrics.brier_score_loss
2011-03-01 01:18:37 +08:00
metrics.classification_report
2016-05-23 10:09:51 +08:00
metrics.cohen_kappa_score
metrics.confusion_matrix
metrics.f1_score
metrics.fbeta_score
metrics.hamming_loss
metrics.hinge_loss
metrics.jaccard_similarity_score
metrics.log_loss
metrics.matthews_corrcoef
metrics.multilabel_confusion_matrix
2011-03-01 01:18:37 +08:00
metrics.precision_recall_curve
metrics.precision_recall_fscore_support
metrics.precision_score
metrics.recall_score
metrics.roc_auc_score
metrics.roc_curve
metrics.zero_one_loss
Regression metrics
------------------
See the :ref:`regression_metrics` section of the user guide for further
details.
.. autosummary::
:toctree: generated/
:template: function.rst
metrics.explained_variance_score
metrics.max_error
2013-01-02 23:42:31 +08:00
metrics.mean_absolute_error
metrics.mean_squared_error
metrics.mean_squared_log_error
metrics.median_absolute_error
2013-01-02 23:42:31 +08:00
metrics.r2_score
Multilabel ranking metrics
--------------------------
See the :ref:`multilabel_ranking_metrics` section of the user guide for further
details.
.. autosummary::
:toctree: generated/
:template: function.rst
metrics.coverage_error
metrics.label_ranking_average_precision_score
metrics.label_ranking_loss
Clustering metrics
------------------
2013-01-04 01:10:37 +08:00
See the :ref:`clustering_evaluation` section of the user guide for further
details.
2011-11-11 18:41:57 +08:00
.. automodule:: sklearn.metrics.cluster
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
2011-12-22 01:12:50 +08:00
metrics.adjusted_mutual_info_score
2012-04-17 00:10:50 +08:00
metrics.adjusted_rand_score
metrics.calinski_harabasz_score
metrics.davies_bouldin_score
2012-04-17 00:10:50 +08:00
metrics.completeness_score
metrics.cluster.contingency_matrix
metrics.fowlkes_mallows_score
2011-05-15 21:36:12 +08:00
metrics.homogeneity_completeness_v_measure
metrics.homogeneity_score
metrics.mutual_info_score
2012-04-17 00:10:50 +08:00
metrics.normalized_mutual_info_score
metrics.silhouette_score
metrics.silhouette_samples
2012-04-17 00:10:50 +08:00
metrics.v_measure_score
2011-03-01 01:18:37 +08:00
Biclustering metrics
--------------------
See the :ref:`biclustering_evaluation` section of the user guide for
further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
metrics.consensus_score
Pairwise metrics
----------------
See the :ref:`metrics` section of the user guide for further details.
.. automodule:: sklearn.metrics.pairwise
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
metrics.pairwise.additive_chi2_kernel
metrics.pairwise.chi2_kernel
metrics.pairwise.cosine_similarity
metrics.pairwise.cosine_distances
metrics.pairwise.distance_metrics
metrics.pairwise.euclidean_distances
metrics.pairwise.kernel_metrics
metrics.pairwise.laplacian_kernel
metrics.pairwise.linear_kernel
metrics.pairwise.manhattan_distances
metrics.pairwise.pairwise_kernels
metrics.pairwise.polynomial_kernel
metrics.pairwise.rbf_kernel
metrics.pairwise.sigmoid_kernel
metrics.pairwise.paired_euclidean_distances
metrics.pairwise.paired_manhattan_distances
metrics.pairwise.paired_cosine_distances
metrics.pairwise.paired_distances
metrics.pairwise_distances
metrics.pairwise_distances_argmin
metrics.pairwise_distances_argmin_min
metrics.pairwise_distances_chunked
2016-05-23 10:09:51 +08:00
2011-11-11 18:41:57 +08:00
2011-11-29 23:29:49 +08:00
.. _mixture_ref:
:mod:`sklearn.mixture`: Gaussian Mixture Models
===============================================
2011-11-11 18:41:57 +08:00
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.mixture
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`mixture` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
mixture.BayesianGaussianMixture
mixture.GaussianMixture
.. _modelselection_ref:
:mod:`sklearn.model_selection`: Model Selection
===============================================
.. automodule:: sklearn.model_selection
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`cross_validation`, :ref:`grid_search` and
:ref:`learning_curve` sections for further details.
Splitter Classes
----------------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
model_selection.GroupKFold
model_selection.GroupShuffleSplit
model_selection.KFold
model_selection.LeaveOneGroupOut
model_selection.LeavePGroupsOut
model_selection.LeaveOneOut
model_selection.LeavePOut
model_selection.PredefinedSplit
model_selection.RepeatedKFold
model_selection.RepeatedStratifiedKFold
model_selection.ShuffleSplit
model_selection.StratifiedKFold
model_selection.StratifiedShuffleSplit
model_selection.TimeSeriesSplit
Splitter Functions
------------------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
model_selection.check_cv
model_selection.train_test_split
Hyper-parameter optimizers
--------------------------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
model_selection.GridSearchCV
model_selection.ParameterGrid
model_selection.ParameterSampler
model_selection.RandomizedSearchCV
.. autosummary::
:toctree: generated/
:template: function.rst
model_selection.fit_grid_point
Model validation
----------------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
model_selection.cross_validate
model_selection.cross_val_predict
model_selection.cross_val_score
model_selection.learning_curve
model_selection.permutation_test_score
model_selection.validation_curve
2010-09-09 23:43:40 +08:00
2011-12-21 23:40:32 +08:00
.. _multiclass_ref:
:mod:`sklearn.multiclass`: Multiclass and multilabel classification
===================================================================
.. automodule:: sklearn.multiclass
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`multiclass` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated
:template: class.rst
multiclass.OneVsRestClassifier
multiclass.OneVsOneClassifier
multiclass.OutputCodeClassifier
.. _multioutput_ref:
:mod:`sklearn.multioutput`: Multioutput regression and classification
=====================================================================
.. automodule:: sklearn.multioutput
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`multiclass` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated
:template: class.rst
multioutput.ClassifierChain
multioutput.MultiOutputRegressor
multioutput.MultiOutputClassifier
multioutput.RegressorChain
2011-11-29 23:29:49 +08:00
.. _naive_bayes_ref:
:mod:`sklearn.naive_bayes`: Naive Bayes
=======================================
2011-11-11 18:41:57 +08:00
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.naive_bayes
:no-members:
:no-inherited-members:
2011-12-19 18:40:41 +08:00
**User guide:** See the :ref:`naive_bayes` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
naive_bayes.BernoulliNB
2011-11-29 23:29:49 +08:00
naive_bayes.GaussianNB
naive_bayes.MultinomialNB
naive_bayes.ComplementNB
2011-11-29 23:29:49 +08:00
.. _neighbors_ref:
:mod:`sklearn.neighbors`: Nearest Neighbors
===========================================
2011-11-11 18:41:57 +08:00
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.neighbors
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`neighbors` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
2011-11-29 23:29:49 +08:00
neighbors.BallTree
neighbors.DistanceMetric
neighbors.KDTree
2013-07-06 23:44:13 +08:00
neighbors.KernelDensity
neighbors.KNeighborsClassifier
neighbors.KNeighborsRegressor
[MRG+2] LOF algorithm (Anomaly Detection) (#5279) * LOF algorithm add tests and example fix DepreciationWarning by reshape(1,-1) one-sample data LOF with inheritance lof and lof2 return same score fix bugs fix bugs optimized and cosmit rm lof2 cosmit rm MixinLOF + fit_predict fix travis - optimize pairwise_distance like in KNeighborsMixin.kneighbors add comparison example + doc LOF -> LocalOutlierFactor cosmit change LOF API: -fit(X).predict() and fit(X).decision_function() do prediction on X without considering samples as their own neighbors (ie without considering X as a new dataset as does fit(X).predict(X)) -rm fit_predict() method -add a contamination parameter st predict returns a binary value like other anomaly detection algos cosmit doc + debug example correction doc pass on doc + examples pep8 + fix warnings first attempt at fixing API issues minor changes takes into account tguillemot advice -remove pairwise_distance calculation as to heavy in memory -add benchmarks cosmit minor changes + deals with duplicates fix depreciation warnings * factorize the two for loops * take into account @albertthomas88 review and cosmit * fix doc * alex review + rebase * make predict private add outlier_factor_ attribute and update tests * make fit_predict take y argument * fix benchmarks file * update examples * make decision_function public (rm X=None default) * fix travis * take into account tguillemot review + remove useless k_distance function * fix broken links :meth:`kneighbors` * cosmit * whatsnew * amueller review + remove _local_outlier_factor method * add n_neighbors_ parameter the effective nb neighbors we use * make decision_function private and negative_outlier_factor attribute
2016-10-25 23:53:51 +08:00
neighbors.LocalOutlierFactor
neighbors.RadiusNeighborsClassifier
neighbors.RadiusNeighborsRegressor
neighbors.NearestCentroid
neighbors.NearestNeighbors
2011-09-21 18:06:53 +08:00
.. autosummary::
:toctree: generated/
:template: function.rst
2011-11-29 23:29:49 +08:00
neighbors.kneighbors_graph
neighbors.radius_neighbors_graph
2010-10-06 17:45:01 +08:00
2013-02-03 01:07:37 +08:00
.. _neural_network_ref:
2013-02-03 01:07:37 +08:00
:mod:`sklearn.neural_network`: Neural network models
=====================================================
2013-02-03 01:07:37 +08:00
.. automodule:: sklearn.neural_network
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`neural_networks_supervised` and :ref:`neural_networks_unsupervised` sections for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
2013-02-03 01:07:37 +08:00
neural_network.BernoulliRBM
2015-06-06 01:36:36 +08:00
neural_network.MLPClassifier
neural_network.MLPRegressor
2011-11-29 23:29:49 +08:00
.. _pipeline_ref:
:mod:`sklearn.pipeline`: Pipeline
=================================
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.pipeline
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
2010-10-06 17:45:01 +08:00
.. autosummary::
:toctree: generated/
:template: class.rst
pipeline.FeatureUnion
pipeline.Pipeline
2011-11-29 23:29:49 +08:00
.. autosummary::
:toctree: generated/
:template: function.rst
pipeline.make_pipeline
pipeline.make_union
2010-11-26 23:53:03 +08:00
2011-11-29 23:29:49 +08:00
.. _preprocessing_ref:
2010-10-06 17:45:01 +08:00
:mod:`sklearn.preprocessing`: Preprocessing and Normalization
=============================================================
2011-11-11 18:41:57 +08:00
.. automodule:: sklearn.preprocessing
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`preprocessing` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
preprocessing.Binarizer
preprocessing.FunctionTransformer
2017-07-12 16:20:14 +08:00
preprocessing.KBinsDiscretizer
preprocessing.KernelCenterer
preprocessing.LabelBinarizer
preprocessing.LabelEncoder
preprocessing.MultiLabelBinarizer
2015-07-02 17:33:47 +08:00
preprocessing.MaxAbsScaler
preprocessing.MinMaxScaler
preprocessing.Normalizer
2012-10-26 04:07:02 +08:00
preprocessing.OneHotEncoder
preprocessing.OrdinalEncoder
2014-01-24 06:16:05 +08:00
preprocessing.PolynomialFeatures
preprocessing.PowerTransformer
[MRG+1] QuantileTransformer (#8363) * resurrect quantile scaler * move the code in the pre-processing module * first draft * Add tests. * Fix bug in QuantileNormalizer. * Add quantile_normalizer. * Implement pickling * create a specific function for dense transform * Create a fit function for the dense case * Create a toy examples * First draft with sparse matrices * remove useless functions and non-negative sparse compatibility * fix slice call * Fix tests of QuantileNormalizer. * Fix estimator compatibility * List of functions became tuple of functions * Check X consistency at transform and inverse transform time * fix doc * Add negative ValueError tests for QuantileNormalizer. * Fix cosmetics * Fix compatibility numpy <= 1.8 * Add n_features tests and correct ValueError. * PEP8 * fix fill_value for early scipy compatibility * simplify sampling * Fix tests. * removing last pring * Change choice for permutation * cosmetics * fix remove remaining choice * DOC * Fix inconsistencies * pep8 * Add checker for init parameters. * hack bounds and make a test * FIX/TST bounds are provided by the fitting and not X at transform * PEP8 * FIX/TST axis should be <= 1 * PEP8 * ENH Add parameter ignore_implicit_zeros * ENH match output distribution * ENH clip the data to avoid infinity due to output PDF * FIX ENH restraint to uniform and norm * [MRG] ENH Add example comparing the distribution of all scaling preprocessor (#2) * ENH Add example comparing the distribution of all scaling preprocessor * Remove Jupyter notebook convert * FIX/ENH Select feat before not after; Plot interquantile data range for all * Add heatmap legend * Remove comment maybe? * Move doc from robust_scaling to plot_all_scaling; Need to update doc * Update the doc * Better aesthetics; Better spacing and plot colormap only at end * Shameless author re-ordering ;P * Use env python for she-bang * TST Validity of output_pdf * EXA Use OrderedDict; Make it easier to add more transformations * FIX PEP8 and replace scipy.stats by str in example * FIX remove useless import * COSMET change variable names * FIX change output_pdf occurence to output_distribution * FIX partial fixies from comments * COMIT change class name and code structure * COSMIT change direction to inverse * FIX factorize transform in _transform_col * PEP8 * FIX change the magic 10 * FIX add interp1d to fixes * FIX/TST allow negative entries when ignore_implicit_zeros is True * FIX use np.interp instead of sp.interpolate.interp1d * FIX/TST fix tests * DOC start checking doc * TST add test to check the behaviour of interp numpy * TST/EHN Add the possibility to add noise to compute quantile * FIX factorize quantile computation * FIX fixes issues * PEP8 * FIX/DOC correct doc * TST/DOC improve doc and add random state * EXA add examples to illustrate the use of smoothing_noise * FIX/DOC fix some grammar * DOC fix example * DOC/EXA make plot titles more succint * EXA improve explanation * EXA improve the docstring * DOC add a bit more documentation * FIX advance review * TST add subsampling test * DOC/TST better example for the docstring * DOC add ellipsis to docstring * FIX address olivier comments * FIX remove random_state in sparse.rand * FIX spelling doc * FIX cite example in user guide and docstring * FIX olivier comments * EHN improve the example comparing all the pre-processing methods * FIX/DOC remove title * FIX change the scaling of the figure * FIX plotting layout * FIX ratio w/h * Reorder and reword the plot_all_scaling example * Fix aspect ratio and better explanations in the plot_all_scaling.py example * Fix broken link and remove useless sentence * FIX fix couples of spelling * FIX comments joel * FIX/DOC address documentation comments * FIX address comments joel * FIX inline sparse and dense transform * PEP8 * TST/DOC temporary skipping test * FIX raise an error if n_quantiles > subsample * FIX wording in smoothing_noise example * EXA Denis comments * FIX rephrasing * FIX make smoothing_noise to be a boolearn and change doc * FIX address comments * FIX verbose the doc slightly more * PEP8/DOC * ENH: 2-ways interpolation to avoid smoothing_noise Simplifies also the code, examples, and documentation
2017-06-10 07:15:46 +08:00
preprocessing.QuantileTransformer
preprocessing.RobustScaler
preprocessing.StandardScaler
.. autosummary::
:toctree: generated/
:template: function.rst
2012-11-22 01:59:52 +08:00
preprocessing.add_dummy_feature
preprocessing.binarize
preprocessing.label_binarize
2015-07-02 17:33:47 +08:00
preprocessing.maxabs_scale
preprocessing.minmax_scale
2012-11-22 01:59:52 +08:00
preprocessing.normalize
[MRG+1] QuantileTransformer (#8363) * resurrect quantile scaler * move the code in the pre-processing module * first draft * Add tests. * Fix bug in QuantileNormalizer. * Add quantile_normalizer. * Implement pickling * create a specific function for dense transform * Create a fit function for the dense case * Create a toy examples * First draft with sparse matrices * remove useless functions and non-negative sparse compatibility * fix slice call * Fix tests of QuantileNormalizer. * Fix estimator compatibility * List of functions became tuple of functions * Check X consistency at transform and inverse transform time * fix doc * Add negative ValueError tests for QuantileNormalizer. * Fix cosmetics * Fix compatibility numpy <= 1.8 * Add n_features tests and correct ValueError. * PEP8 * fix fill_value for early scipy compatibility * simplify sampling * Fix tests. * removing last pring * Change choice for permutation * cosmetics * fix remove remaining choice * DOC * Fix inconsistencies * pep8 * Add checker for init parameters. * hack bounds and make a test * FIX/TST bounds are provided by the fitting and not X at transform * PEP8 * FIX/TST axis should be <= 1 * PEP8 * ENH Add parameter ignore_implicit_zeros * ENH match output distribution * ENH clip the data to avoid infinity due to output PDF * FIX ENH restraint to uniform and norm * [MRG] ENH Add example comparing the distribution of all scaling preprocessor (#2) * ENH Add example comparing the distribution of all scaling preprocessor * Remove Jupyter notebook convert * FIX/ENH Select feat before not after; Plot interquantile data range for all * Add heatmap legend * Remove comment maybe? * Move doc from robust_scaling to plot_all_scaling; Need to update doc * Update the doc * Better aesthetics; Better spacing and plot colormap only at end * Shameless author re-ordering ;P * Use env python for she-bang * TST Validity of output_pdf * EXA Use OrderedDict; Make it easier to add more transformations * FIX PEP8 and replace scipy.stats by str in example * FIX remove useless import * COSMET change variable names * FIX change output_pdf occurence to output_distribution * FIX partial fixies from comments * COMIT change class name and code structure * COSMIT change direction to inverse * FIX factorize transform in _transform_col * PEP8 * FIX change the magic 10 * FIX add interp1d to fixes * FIX/TST allow negative entries when ignore_implicit_zeros is True * FIX use np.interp instead of sp.interpolate.interp1d * FIX/TST fix tests * DOC start checking doc * TST add test to check the behaviour of interp numpy * TST/EHN Add the possibility to add noise to compute quantile * FIX factorize quantile computation * FIX fixes issues * PEP8 * FIX/DOC correct doc * TST/DOC improve doc and add random state * EXA add examples to illustrate the use of smoothing_noise * FIX/DOC fix some grammar * DOC fix example * DOC/EXA make plot titles more succint * EXA improve explanation * EXA improve the docstring * DOC add a bit more documentation * FIX advance review * TST add subsampling test * DOC/TST better example for the docstring * DOC add ellipsis to docstring * FIX address olivier comments * FIX remove random_state in sparse.rand * FIX spelling doc * FIX cite example in user guide and docstring * FIX olivier comments * EHN improve the example comparing all the pre-processing methods * FIX/DOC remove title * FIX change the scaling of the figure * FIX plotting layout * FIX ratio w/h * Reorder and reword the plot_all_scaling example * Fix aspect ratio and better explanations in the plot_all_scaling.py example * Fix broken link and remove useless sentence * FIX fix couples of spelling * FIX comments joel * FIX/DOC address documentation comments * FIX address comments joel * FIX inline sparse and dense transform * PEP8 * TST/DOC temporary skipping test * FIX raise an error if n_quantiles > subsample * FIX wording in smoothing_noise example * EXA Denis comments * FIX rephrasing * FIX make smoothing_noise to be a boolearn and change doc * FIX address comments * FIX verbose the doc slightly more * PEP8/DOC * ENH: 2-ways interpolation to avoid smoothing_noise Simplifies also the code, examples, and documentation
2017-06-10 07:15:46 +08:00
preprocessing.quantile_transform
2015-07-02 17:33:47 +08:00
preprocessing.robust_scale
2012-11-22 01:59:52 +08:00
preprocessing.scale
preprocessing.power_transform
.. _random_projection_ref:
:mod:`sklearn.random_projection`: Random projection
===================================================
.. automodule:: sklearn.random_projection
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`random_projection` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
random_projection.GaussianRandomProjection
random_projection.SparseRandomProjection
.. autosummary::
:toctree: generated/
2018-06-04 21:33:54 +08:00
:template: function.rst
random_projection.johnson_lindenstrauss_min_dim
.. _semi_supervised_ref:
:mod:`sklearn.semi_supervised` Semi-Supervised Learning
========================================================
.. automodule:: sklearn.semi_supervised
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`semi_supervised` section for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
semi_supervised.LabelPropagation
semi_supervised.LabelSpreading
2011-11-29 23:29:49 +08:00
.. _svm_ref:
2011-11-11 18:41:57 +08:00
:mod:`sklearn.svm`: Support Vector Machines
===========================================
.. automodule:: sklearn.svm
:no-members:
:no-inherited-members:
2011-11-11 18:41:57 +08:00
2011-11-30 03:58:20 +08:00
**User guide:** See the :ref:`svm` section for further details.
Estimators
----------
2011-11-29 23:29:49 +08:00
.. currentmodule:: sklearn
.. autosummary::
2011-11-29 23:29:49 +08:00
:toctree: generated/
:template: class.rst
2011-11-29 23:29:49 +08:00
svm.LinearSVC
svm.LinearSVR
svm.NuSVC
2011-11-29 23:29:49 +08:00
svm.NuSVR
svm.OneClassSVM
svm.SVC
svm.SVR
2011-11-29 23:29:49 +08:00
.. autosummary::
:toctree: generated/
:template: function.rst
2011-11-29 23:29:49 +08:00
svm.l1_min_c
2011-11-11 18:41:57 +08:00
2011-11-29 23:29:49 +08:00
Low-level methods
-----------------
.. autosummary::
2011-11-29 23:29:49 +08:00
:toctree: generated
:template: function.rst
svm.libsvm.cross_validation
2011-11-29 23:29:49 +08:00
svm.libsvm.decision_function
svm.libsvm.fit
2011-11-29 23:29:49 +08:00
svm.libsvm.predict
svm.libsvm.predict_proba
2011-11-29 23:29:49 +08:00
.. _tree_ref:
2010-10-06 17:45:01 +08:00
:mod:`sklearn.tree`: Decision Trees
===================================
2011-11-29 23:29:49 +08:00
.. automodule:: sklearn.tree
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`tree` section for further details.
.. currentmodule:: sklearn
2010-10-06 17:45:01 +08:00
.. autosummary::
:toctree: generated/
:template: class.rst
2011-11-29 23:29:49 +08:00
tree.DecisionTreeClassifier
tree.DecisionTreeRegressor
tree.ExtraTreeClassifier
tree.ExtraTreeRegressor
.. autosummary::
:toctree: generated/
:template: function.rst
tree.export_graphviz
tree.plot_tree
2011-11-29 23:29:49 +08:00
2011-11-29 23:29:49 +08:00
.. _utils_ref:
:mod:`sklearn.utils`: Utilities
===============================
.. automodule:: sklearn.utils
:no-members:
:no-inherited-members:
2011-12-20 17:59:17 +08:00
**Developer guide:** See the :ref:`developers-utils` page for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
utils.testing.mock_mldata_urlopen
.. autosummary::
:toctree: generated/
:template: function.rst
2011-03-09 22:10:57 +08:00
utils.arrayfuncs.cholesky_delete
utils.arrayfuncs.min_pos
2017-06-08 21:31:26 +08:00
utils.as_float_array
utils.assert_all_finite
2017-06-08 21:31:26 +08:00
utils.check_X_y
utils.check_array
utils.check_consistent_length
utils.check_random_state
2017-06-08 21:31:26 +08:00
utils.class_weight.compute_class_weight
utils.class_weight.compute_sample_weight
utils.deprecated
utils.estimator_checks.check_estimator
2017-06-08 21:31:26 +08:00
utils.extmath.safe_sparse_dot
utils.extmath.randomized_range_finder
utils.extmath.randomized_svd
utils.extmath.fast_logdet
utils.extmath.density
utils.extmath.weighted_mode
utils.gen_even_slices
utils.graph.single_source_shortest_path_length
utils.graph_shortest_path.graph_shortest_path
utils.indexable
utils.metaestimators.if_delegate_has_method
utils.multiclass.type_of_target
utils.multiclass.is_multilabel
utils.multiclass.unique_labels
utils.murmurhash3_32
utils.resample
2017-06-08 21:31:26 +08:00
utils.safe_indexing
utils.safe_mask
utils.safe_sqr
utils.shuffle
2017-06-08 21:31:26 +08:00
utils.sparsefuncs.incr_mean_variance_axis
utils.sparsefuncs.inplace_column_scale
utils.sparsefuncs.inplace_row_scale
utils.sparsefuncs.inplace_swap_row
utils.sparsefuncs.inplace_swap_column
utils.sparsefuncs.mean_variance_axis
utils.sparsefuncs.inplace_csr_column_scale
utils.sparsefuncs_fast.inplace_csr_row_normalize_l1
utils.sparsefuncs_fast.inplace_csr_row_normalize_l2
utils.random.sample_without_replacement
2017-06-08 21:31:26 +08:00
utils.validation.check_is_fitted
utils.validation.check_memory
2017-06-08 21:31:26 +08:00
utils.validation.check_symmetric
utils.validation.column_or_1d
utils.validation.has_fit_parameter
utils.testing.assert_in
utils.testing.assert_not_in
utils.testing.assert_raise_message
utils.testing.all_estimators
Utilities from joblib:
.. autosummary::
:toctree: generated/
:template: function.rst
utils.parallel_backend
utils.register_parallel_backend
Recently deprecated
===================
To be removed in 0.23
---------------------
.. autosummary::
:toctree: generated/
:template: deprecated_class.rst
utils.Memory
utils.Parallel
.. autosummary::
:toctree: generated/
:template: deprecated_function.rst
utils.cpu_count
utils.delayed
metrics.calinski_harabaz_score
linear_model.logistic_regression_path
To be removed in 0.22
---------------------
.. autosummary::
:toctree: generated/
:template: deprecated_class.rst
covariance.GraphLasso
covariance.GraphLassoCV
preprocessing.Imputer
.. autosummary::
:toctree: generated/
:template: deprecated_function.rst
covariance.graph_lasso
datasets.fetch_mldata
datasets.mldata_filename