scikit-learn/doc/modules/classes.rst

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

1671 lines
37 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::
:nosignatures:
: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
feature_selection.SelectorMixin
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` and :ref:`biclustering` sections 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
cluster.FeatureAgglomeration
2011-11-29 23:29:49 +08:00
cluster.KMeans
cluster.MiniBatchKMeans
cluster.MeanShift
2019-08-09 17:31:45 +08:00
cluster.OPTICS
2011-11-29 23:29:49 +08:00
cluster.SpectralClustering
cluster.SpectralBiclustering
cluster.SpectralCoclustering
2011-11-29 23:29:49 +08:00
Functions
---------
.. autosummary::
:toctree: generated/
:template: function.rst
cluster.affinity_propagation
2019-03-04 20:34:47 +08:00
cluster.cluster_optics_dbscan
cluster.cluster_optics_xi
2019-03-04 20:34:47 +08:00
cluster.compute_optics_graph
cluster.dbscan
cluster.estimate_bandwidth
cluster.k_means
cluster.kmeans_plusplus
cluster.mean_shift
cluster.spectral_clustering
cluster.ward_tree
2011-11-29 23:29:49 +08:00
.. _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
compose.make_column_selector
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
decomposition.non_negative_factorization
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.StackingClassifier
ensemble.StackingRegressor
ensemble.VotingClassifier
2019-04-10 19:27:17 +08:00
ensemble.VotingRegressor
ensemble.HistGradientBoostingRegressor
ensemble.HistGradientBoostingClassifier
.. autosummary::
:toctree: generated/
:template: function.rst
.. _exceptions_ref:
:mod:`sklearn.exceptions`: Exceptions and warnings
==================================================
.. automodule:: sklearn.exceptions
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
exceptions.ConvergenceWarning
exceptions.DataConversionWarning
exceptions.DataDimensionalityWarning
exceptions.EfficiencyWarning
exceptions.FitFailedWarning
exceptions.NotFittedError
exceptions.UndefinedMetricWarning
:mod:`sklearn.experimental`: Experimental
=========================================
.. automodule:: sklearn.experimental
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
experimental.enable_hist_gradient_boosting
experimental.enable_iterative_imputer
experimental.enable_halving_search_cv
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.SequentialFeatureSelector
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.r_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
.. _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.IterativeImputer
impute.MissingIndicator
2019-09-04 07:08:59 +08:00
impute.KNNImputer
.. _inspection_ref:
:mod:`sklearn.inspection`: Inspection
=====================================
.. automodule:: sklearn.inspection
:no-members:
:no-inherited-members:
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
inspection.partial_dependence
[MRG] Adds Permutation Importance (#13146) * ENH Adds files * ENH Adds permutation importance * RFC Better names * STY Flake8 * ENH: Adds inspect module * DOC Adds pre_dispatch * DOC Adds permutation importance example * Trigger CI * BLD Adds inspect to configuration * RFC Update to only inspect fitted model * RFC Removes parameters * ENH: Adds pandas support * STY Flake8 * DOC Adds new permutation importance example * ENH Renames module to model_inspection * DOC Fix links * DOC Fixes image link * DOC Fixes image link * DOC Spelling * DOC * TST Fix keyword * Rework RF Imp vs Perm Imp example (#4) * WIP * WIP * WIP * DOC Adds multcollinear features example * WIP * DOC: Clean up docs * TST Adds tests for strings * STY Indent correction * WIP * ENH Uses check_X_y * TST Adds test with strings * STY Fix * TST Adds column transformer to test * CLN Address comments * CLN Removes import * TST Adds test with nan * CLN Removes import * ENH Parallel * DOC comments * ENH Better handling of pandas * ENH Clear checking of pandas dataframe * STY Formatting * ENH Copies in parallel helper * DOC Adds comments * BUG Fix copying * BUG Fix for pandas * BUG Fix for pandas * REV * BLD Trigger CI * BUG Fix * BUG Fix * TST Does this work * BUG Fixes test * BUG Fixes test * BUG Fix * BUG Fix * BUG Fix * STY Fix * TST Fix * TST Fix segfault * CLN Address comments * CLN Address comments * ENH Returns a bunch * STY Flake8 * CLN Renames bunch key * DOC Updates api * DOC Updates api * TST Adds permutation test with linear_regression * DOC update * DOC Fix label cutoff * CLN Address comments * TST Adds test for random_state effect * DOC Adds permutation importance * DOC Adds ogrisel suggestion * DOC Address guillaumes comments * DOC Address andreas comments * DOC Update
2019-07-18 01:16:00 +08:00
inspection.permutation_importance
2014-05-24 20:55:21 +08:00
Plotting
--------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
inspection.DecisionBoundaryDisplay
inspection.PartialDependenceDisplay
.. autosummary::
:toctree: generated/
:template: function.rst
inspection.plot_partial_dependence
.. _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
isotonic.check_increasing
isotonic.isotonic_regression
.. _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.PolynomialCountSketch
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`: 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
The following subsections are only rough guidelines: the same estimator can
fall into multiple categories, depending on its parameters.
.. currentmodule:: sklearn
Linear classifiers
------------------
.. autosummary::
:toctree: generated/
:template: class.rst
linear_model.LogisticRegression
linear_model.LogisticRegressionCV
linear_model.PassiveAggressiveClassifier
linear_model.Perceptron
linear_model.RidgeClassifier
linear_model.RidgeClassifierCV
linear_model.SGDClassifier
linear_model.SGDOneClassSVM
Classical linear regressors
---------------------------
.. autosummary::
:toctree: generated/
:template: class.rst
linear_model.LinearRegression
linear_model.Ridge
linear_model.RidgeCV
linear_model.SGDRegressor
Regressors with variable selection
----------------------------------
The following estimators have built-in variable selection fitting
procedures, but any estimator using a L1 or elastic-net penalty also
performs variable selection: typically :class:`~linear_model.SGDRegressor`
or :class:`~sklearn.linear_model.SGDClassifier` with an appropriate penalty.
2010-09-28 20:43:56 +08:00
.. autosummary::
:toctree: generated/
:template: class.rst
2011-11-29 23:29:49 +08:00
linear_model.ElasticNet
linear_model.ElasticNetCV
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.OrthogonalMatchingPursuit
2013-07-26 15:50:30 +08:00
linear_model.OrthogonalMatchingPursuitCV
Bayesian regressors
-------------------
.. autosummary::
:toctree: generated/
:template: class.rst
linear_model.ARDRegression
linear_model.BayesianRidge
Multi-task linear regressors with variable selection
----------------------------------------------------
These estimators fit multiple regression problems (or tasks) jointly, while
inducing sparse coefficients. While the inferred coefficients may differ
between the tasks, they are constrained to agree on the features that are
selected (non-zero coefficients).
.. autosummary::
:toctree: generated/
:template: class.rst
linear_model.MultiTaskElasticNet
linear_model.MultiTaskElasticNetCV
linear_model.MultiTaskLasso
linear_model.MultiTaskLassoCV
Outlier-robust regressors
-------------------------
Any estimator using the Huber loss would also be robust to outliers, e.g.
:class:`~linear_model.SGDRegressor` with ``loss='huber'``.
.. autosummary::
:toctree: generated/
:template: class.rst
linear_model.HuberRegressor
linear_model.QuantileRegressor
linear_model.RANSACRegressor
linear_model.TheilSenRegressor
2011-11-29 23:29:49 +08:00
Generalized linear models (GLM) for regression
----------------------------------------------
These models allow for response variables to have error distributions other
than a normal distribution:
.. autosummary::
:toctree: generated/
:template: class.rst
linear_model.PoissonRegressor
linear_model.TweedieRegressor
linear_model.GammaRegressor
Miscellaneous
-------------
2011-11-29 23:29:49 +08:00
.. autosummary::
:toctree: generated/
:template: function.rst
linear_model.PassiveAggressiveRegressor
linear_model.enet_path
2011-11-29 23:29:49 +08:00
linear_model.lars_path
linear_model.lars_path_gram
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
manifold.trustworthiness
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.get_scorer_names
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.dcg_score
metrics.det_curve
metrics.f1_score
metrics.fbeta_score
metrics.hamming_loss
metrics.hinge_loss
metrics.jaccard_score
metrics.log_loss
metrics.matthews_corrcoef
metrics.multilabel_confusion_matrix
metrics.ndcg_score
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.top_k_accuracy_score
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
metrics.mean_absolute_percentage_error
2013-01-02 23:42:31 +08:00
metrics.r2_score
metrics.mean_poisson_deviance
metrics.mean_gamma_deviance
metrics.mean_tweedie_deviance
2021-09-05 05:17:03 +08:00
metrics.d2_tweedie_score
metrics.mean_pinball_loss
2013-01-02 23:42:31 +08:00
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.cluster.pair_confusion_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.rand_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
Distance metrics
----------------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
metrics.DistanceMetric
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.haversine_distances
metrics.pairwise.kernel_metrics
metrics.pairwise.laplacian_kernel
metrics.pairwise.linear_kernel
metrics.pairwise.manhattan_distances
2019-09-04 07:08:59 +08:00
metrics.pairwise.nan_euclidean_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
Plotting
--------
See the :ref:`visualizations` section of the user guide for further details.
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
metrics.plot_confusion_matrix
metrics.plot_det_curve
metrics.plot_precision_recall_curve
metrics.plot_roc_curve
.. autosummary::
:toctree: generated/
:template: class.rst
metrics.ConfusionMatrixDisplay
metrics.DetCurveDisplay
metrics.PrecisionRecallDisplay
metrics.RocCurveDisplay
calibration.CalibrationDisplay
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
Stratified Group KFold implementation (#18649) * Initial implementation * Forgot to add to second __add__ list * Update split method parameter doc * Added example; changed default test_size to 0.1; added to author list * StratifiedGroupKFold impl and other improvements * Add class to __all__ spec * Remove random_state when no shuffle * Tighter formatting * Update the implementation of StratifiedGroupKFold * Add StratifiedGroupKFold to __init__ * Add y checks to StartifiedGroupKFold * Raise error if n_splits > max num samples in class * Warn if n_splits > mn num samples in class * Add SGKfold to general repr test * Add SGKFold to 2d_y test case * Add SGKfold to value erros test case Parameters are the same as for StratifiedKFold to ensure similar behavior given n_groups == n_samples * Add SGKFold to StratifiedKFold test cases The idea is to ensure similar behavior when groups are trivial (n_groups == n_samples) * Add SGKFold to reproducibility test case * Add SGKFold to GroupKFold test case * Add SGKFold to nested cv test case * Add SGKFold to random_state with shuffle=False test case * Add SGKFold to constant splits test case * Fix repr test case * Fix formatting issues * Add samples to a fold with least num samples Required to produce balanced size folds when the distribution of y is more or less the same * Remove GroupShuffleSplit impl * Add notes to StratifiedGroupKFold * Fix doctest * Added stratified group kfold tests * Better variable naming * Add section to documentation * Remove leftover StratifiedGroupShuffleSplit import * Add changelist and reference to original kernel * Better naming for least populated class check * Better expression for number of labels * Remove use of Counter We already have this data in output of np.unique * Add tests for homogeneous groups * Add StratifiedGroupKFold test against GroupKFold * Add changes to changelist in docstring * Add StratifiedGroupKFold to classes.rst * Fix description of StratifiedGroupKFold * Move license notice out of docstring * Disambiguate labels to classes in doc * Add changelog entry * Fix changelog author entry * Fix StratifiedGroupKFold docstring * Better variable names * Remove defaultdict in favor of numpy indexing * Extracted best_fold search into a separate method * Make use of numpy broadcasting instead of for loop * Encode groups and use arrays instead of dicts * Use numpy sort instead of python * Clarify shuffling behavior of StratifiedGroupKF in docs * Switch name from label_idx to class_idx * Remove accidentally leftover comment * Fix np.sort keyword to support numpy < 1.15 * Fix typo in docstring * Add StratifiedGroupKFold to visualization doc * Add visualization for uneven group as an example * Fix image numbers to match updated example * Add author * Add SGKF visualization to docs * Add comments for groups in stratified CV tests Co-authored-by: Leandro Hermida <hermidal@cs.umd.edu> Co-authored-by: marrodion <rodion_martynov@epam.com>
2021-03-20 18:57:42 +08:00
model_selection.StratifiedGroupKFold
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:
Hyper-parameter optimizers
--------------------------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: class.rst
model_selection.GridSearchCV
FEA Successive halving for faster parameter search (#13900) * More flexible grid search interface * added info dict parameter * Put back removed test * renamed info into more_results * Passed grroups as well since we need n_to use get_n_splits(X, y, groups) * port * pep8 * dabl -> sklearn * add _required_parameters * skipping check in rst file if pandas not installed * Update sklearn/model_selection/_search_successive_halving.py Co-Authored-By: Joel Nothman <joel.nothman@gmail.com> * renamed into GridHalvingSearchCV and RandomHalvingSearchCV * Addressed thomas' comments * repr * removed passing group as a parameter to evaluate_candidates * Joels comments * pep8 * reorganized user user guide * renaming * update user guide * remove groups support + pass fit_params * parameter renaming * pep8 * r_i -> resource_iter * fixed r_i issues * examples + removed use of word budget * Added inpute checking tests * added cv_resutlts_ user guide * minor title change * fixed doc layout * Addressed some comments * properly pass down fit_params * change default value of force_exhaust_resources and update doc * should fix doc * Used check_fit_params * Update section about min_resources and number of candidates * Clarified ratio section * Use ~ to refer to classes * fixed doc checks * Apply suggestions from code review Co-authored-by: Joel Nothman <joel.nothman@gmail.com> * Addressed easy comments from Joel * missed some * updated docstring of run_search * Used f strings instead of format * remove candidate duplication checks * fix example * Addressed easy comments * rotate ticks labels * Added discussion in the intro as suggested by Joel * Split examples into sections * minor changes * remove force_exhaust_budget and introduce min_resources=exhaust * some minor validation * Added a n_resources_ attribute * update examples * Addressed comments * passing CV instead of X,y * minor revert for handling fit_params * updated docs * fix len * whatsnew * Add test for sampling when all_list * minor change to top-k * Force CV splits to be consistent across calls * reorder parameters * reduced diff * added tests for top_k * put back doc for groups * not sure what went wrong * put import at its place * some comment * Addressed comments * Added tests for cv_results_ and base estimator inputs * pep8 * avoid monkeypatching * rename df * use Joel's suggestions for testing masks * Made it experimental * Should fix docs * whats new entry * Apply suggestions from code review Co-authored-by: Andreas Mueller <t3kcit@gmail.com> * Addressed comments to docs * Addressed comments in examples * minor doc update * minor renaming in UG * forgot some * some sad note about splitter statefulness :'( * Addressed comments * ratio -> factor Co-authored-by: Joel Nothman <joel.nothman@gmail.com> Co-authored-by: Andreas Mueller <t3kcit@gmail.com>
2020-09-09 23:12:35 +08:00
model_selection.HalvingGridSearchCV
model_selection.ParameterGrid
model_selection.ParameterSampler
model_selection.RandomizedSearchCV
FEA Successive halving for faster parameter search (#13900) * More flexible grid search interface * added info dict parameter * Put back removed test * renamed info into more_results * Passed grroups as well since we need n_to use get_n_splits(X, y, groups) * port * pep8 * dabl -> sklearn * add _required_parameters * skipping check in rst file if pandas not installed * Update sklearn/model_selection/_search_successive_halving.py Co-Authored-By: Joel Nothman <joel.nothman@gmail.com> * renamed into GridHalvingSearchCV and RandomHalvingSearchCV * Addressed thomas' comments * repr * removed passing group as a parameter to evaluate_candidates * Joels comments * pep8 * reorganized user user guide * renaming * update user guide * remove groups support + pass fit_params * parameter renaming * pep8 * r_i -> resource_iter * fixed r_i issues * examples + removed use of word budget * Added inpute checking tests * added cv_resutlts_ user guide * minor title change * fixed doc layout * Addressed some comments * properly pass down fit_params * change default value of force_exhaust_resources and update doc * should fix doc * Used check_fit_params * Update section about min_resources and number of candidates * Clarified ratio section * Use ~ to refer to classes * fixed doc checks * Apply suggestions from code review Co-authored-by: Joel Nothman <joel.nothman@gmail.com> * Addressed easy comments from Joel * missed some * updated docstring of run_search * Used f strings instead of format * remove candidate duplication checks * fix example * Addressed easy comments * rotate ticks labels * Added discussion in the intro as suggested by Joel * Split examples into sections * minor changes * remove force_exhaust_budget and introduce min_resources=exhaust * some minor validation * Added a n_resources_ attribute * update examples * Addressed comments * passing CV instead of X,y * minor revert for handling fit_params * updated docs * fix len * whatsnew * Add test for sampling when all_list * minor change to top-k * Force CV splits to be consistent across calls * reorder parameters * reduced diff * added tests for top_k * put back doc for groups * not sure what went wrong * put import at its place * some comment * Addressed comments * Added tests for cv_results_ and base estimator inputs * pep8 * avoid monkeypatching * rename df * use Joel's suggestions for testing masks * Made it experimental * Should fix docs * whats new entry * Apply suggestions from code review Co-authored-by: Andreas Mueller <t3kcit@gmail.com> * Addressed comments to docs * Addressed comments in examples * minor doc update * minor renaming in UG * forgot some * some sad note about splitter statefulness :'( * Addressed comments * ratio -> factor Co-authored-by: Joel Nothman <joel.nothman@gmail.com> Co-authored-by: Andreas Mueller <t3kcit@gmail.com>
2020-09-09 23:12:35 +08:00
model_selection.HalvingRandomSearchCV
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 classification
====================================================
2011-12-21 23:40:32 +08:00
.. automodule:: sklearn.multiclass
:no-members:
:no-inherited-members:
**User guide:** See the :ref:`multiclass_classification` section for further details.
2011-12-21 23:40:32 +08:00
.. 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:`multilabel_classification`,
:ref:`multiclass_multioutput_classification`, and
:ref:`multioutput_regression` sections 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
naive_bayes.CategoricalNB
naive_bayes.ComplementNB
2011-11-29 23:29:49 +08:00
naive_bayes.GaussianNB
naive_bayes.MultinomialNB
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.KDTree
2013-07-06 23:44:13 +08:00
neighbors.KernelDensity
neighbors.KNeighborsClassifier
neighbors.KNeighborsRegressor
neighbors.KNeighborsTransformer
[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.RadiusNeighborsTransformer
neighbors.NearestCentroid
neighbors.NearestNeighbors
neighbors.NeighborhoodComponentsAnalysis
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:
**User guide:** See the :ref:`combining_estimators` section for further
details.
.. 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
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
2021-01-24 17:53:27 +08:00
preprocessing.SplineTransformer
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
semi_supervised.SelfTrainingClassifier
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
.. _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.export_text
2011-11-29 23:29:49 +08:00
Plotting
--------
.. currentmodule:: sklearn
.. autosummary::
:toctree: generated/
:template: function.rst
tree.plot_tree
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.Bunch
.. autosummary::
:toctree: generated/
:template: function.rst
2011-03-09 22:10:57 +08:00
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_scalar
2017-06-08 21:31:26 +08:00
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
utils.estimator_checks.parametrize_with_checks
utils.estimator_html_repr
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_batches
utils.gen_even_slices
utils.graph.single_source_shortest_path_length
utils.indexable
utils.metaestimators.available_if
utils.multiclass.type_of_target
utils.multiclass.is_multilabel
utils.multiclass.unique_labels
utils.murmurhash3_32
utils.resample
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.all_estimators
Utilities from joblib:
.. autosummary::
:toctree: generated/
:template: function.rst
utils.parallel_backend
utils.register_parallel_backend
Recently deprecated
===================
To be removed in 1.3
--------------------
.. autosummary::
:toctree: generated/
:template: function.rst
utils.metaestimators.if_delegate_has_method