scikit-learn API reference
400 public APIs from scikit-learn (scikit-learn/scikit-learn) — 241 classes, 72 functions, 87 methods. Signatures extracted by static analysis of the actual source.
Repository: scikit-learn/scikit-learn
| Kind | Count |
|---|---|
| Classes | 241 |
| Functions | 72 |
| Methods | 87 |
API list
func
sklearn._config.get_config()Retrieve the current scikit-learn configuration.
class
sklearn._loss.link.BaseLinkAbstract base class for differentiable, invertible link functions.
method
sklearn._loss.link.BaseLink.link(y_pred)Compute the link function g(y_pred).
class
sklearn._loss.link.HalfLogitLinkHalf the logit link function g(x)=1/2 * logit(x).
class
sklearn._loss.link.IdentityLinkThe identity link function g(x)=x.
class
sklearn._loss.link.LogLinkThe log link function g(x)=log(x).
class
sklearn._loss.link.LogitLinkThe logit link function g(x)=logit(x).
class
sklearn._loss.link.MultinomialLogitThe symmetric multinomial logit function.
class
sklearn._loss.loss.AbsoluteErrorAbsolute error with identity link, for regression.
class
sklearn._loss.loss.BaseLossBase class for a loss function of 1-dimensional targets.
class
sklearn._loss.loss.HalfGammaLossHalf Gamma deviance loss with log-link, for regression.
class
sklearn._loss.loss.HalfPoissonLossHalf Poisson deviance loss with log-link, for regression.
class
sklearn._loss.loss.HalfSquaredErrorHalf squared error with identity link, for regression.
class
sklearn._loss.loss.HalfTweedieLossHalf Tweedie deviance loss with log-link, for regression.
class
sklearn._loss.loss.HuberLossHuber loss, for regression.
class
sklearn._loss.loss.PinballLossQuantile loss aka pinball loss, for regression.
class
sklearn.base.BaseEstimatorBase class for all estimators in scikit-learn.
method
sklearn.base.BaseEstimator.get_params(deep=True)Get parameters for this estimator.
method
sklearn.base.BaseEstimator.set_params(**params)Set the parameters of this estimator.
class
sklearn.base.BiclusterMixinMixin class for all bicluster estimators in scikit-learn.
method
sklearn.base.BiclusterMixin.get_shape(i)Shape of the `i`'th bicluster.
class
sklearn.base.ClassifierMixinMixin class for all classifiers in scikit-learn.
class
sklearn.base.ClusterMixinMixin class for all cluster estimators in scikit-learn.
class
sklearn.base.DensityMixinMixin class for all density estimators in scikit-learn.
class
sklearn.base.MetaEstimatorMixinMixin class for all meta estimators in scikit-learn.
class
sklearn.base.MultiOutputMixinMixin to mark estimators that support multioutput.
class
sklearn.base.OneToOneFeatureMixinProvides `get_feature_names_out` for simple transformers.
class
sklearn.base.RegressorMixinMixin class for all regression estimators in scikit-learn.
class
sklearn.base.TransformerMixinMixin class for all transformers in scikit-learn.
class
sklearn.callback._callback_context.CallbackContextTask level context for the callbacks.
class
sklearn.callback._progressbar.RichTaskA task, i.e.
class
sklearn.callback._scoring_monitor.ScoringMonitorLogLog for one run of a scoring monitor.
class
sklearn.callback._transport.ListenerHandleA picklable reference to a main-process listener.
class
sklearn.cluster._affinity_propagation.AffinityPropagationPerform Affinity Propagation Clustering of data.
class
sklearn.cluster._agglomerative.AgglomerativeClusteringAgglomerative Clustering.
class
sklearn.cluster._agglomerative.FeatureAgglomerationAgglomerate features.
class
sklearn.cluster._bicluster.BaseSpectralBase class for spectral biclustering.
method
sklearn.cluster._bicluster.BaseSpectral.fit(X, y=None)Create a biclustering for X.
class
sklearn.cluster._bicluster.SpectralBiclusteringSpectral biclustering (Kluger, 2003) [1]_.
class
sklearn.cluster._birch.BirchImplements the BIRCH clustering algorithm.
method
sklearn.cluster._birch.Birch.fit(X, y=None)Build a CF Tree for the input data.
method
sklearn.cluster._birch.Birch.partial_fit(X=None, y=None)Online learning.
class
sklearn.cluster._bisect_k_means.BisectingKMeansBisecting K-Means clustering.
class
sklearn.cluster._kmeans.KMeansK-Means clustering.
method
sklearn.cluster._kmeans.KMeans.fit(X, y=None, sample_weight=None)Compute k-means clustering.
class
sklearn.cluster._kmeans.MiniBatchKMeansMini-Batch K-Means clustering.
class
sklearn.cluster._mean_shift.MeanShiftMean shift clustering using a flat kernel.
method
sklearn.cluster._mean_shift.MeanShift.fit(X, y=None)Perform clustering.
func
sklearn.cluster._mean_shift.get_bin_seeds(X, bin_size, min_bin_freq=1)Find seeds for mean_shift.
class
sklearn.cluster._optics.OPTICSEstimate clustering structure from vector array.
method
sklearn.cluster._optics.OPTICS.fit(X, y=None)Perform OPTICS clustering.
class
sklearn.compose._target.TransformedTargetRegressorMeta-estimator to regress on a transformed target.
class
sklearn.covariance._empirical_covariance.EmpiricalCovarianceMaximum likelihood covariance estimator.
class
sklearn.covariance._shrunk_covariance.LedoitWolfLedoitWolf Estimator.
class
sklearn.covariance._shrunk_covariance.OASOracle Approximating Shrinkage Estimator.
class
sklearn.covariance._shrunk_covariance.ShrunkCovarianceCovariance estimator with shrinkage.
class
sklearn.cross_decomposition._pls.PLSCanonicalPartial Least Squares transformer and regressor.
class
sklearn.cross_decomposition._pls.PLSRegressionPLS regression.
method
sklearn.cross_decomposition._pls.PLSRegression.fit(X, y)Fit model to data.
class
sklearn.cross_decomposition._pls.PLSSVDPartial Least Square SVD.
method
sklearn.cross_decomposition._pls.PLSSVD.fit(X, y)Fit model to data.
func
sklearn.datasets._base.get_data_home(data_home=None) -> strReturn the path of the scikit-learn data directory.
class
sklearn.decomposition._dict_learning.DictionaryLearningDictionary learning.
class
sklearn.decomposition._dict_learning.MiniBatchDictionaryLearningMini-batch dictionary learning.
class
sklearn.decomposition._dict_learning.SparseCoderSparse coding.
class
sklearn.decomposition._factor_analysis.FactorAnalysisFactor Analysis (FA).
class
sklearn.decomposition._incremental_pca.IncrementalPCAIncremental principal components analysis (IPCA).
class
sklearn.decomposition._kernel_pca.KernelPCAKernel Principal component analysis (KPCA).
method
sklearn.decomposition._kernel_pca.KernelPCA.fit(X, y=None)Fit the model from data in X.
method
sklearn.decomposition._kernel_pca.KernelPCA.transform(X)Transform X.
class
sklearn.decomposition._nmf.MiniBatchNMFMini-Batch Non-Negative Matrix Factorization (NMF).
class
sklearn.decomposition._nmf.NMFNon-Negative Matrix Factorization (NMF).
func
sklearn.decomposition._nmf.trace_dot(X, Y)Trace of np.dot(X, Y.T).
class
sklearn.decomposition._pca.PCAPrincipal component analysis (PCA).
method
sklearn.decomposition._pca.PCA.fit(X, y=None)Fit the model with X.
class
sklearn.decomposition._sparse_pca.MiniBatchSparsePCAMini-batch Sparse Principal Components Analysis.
class
sklearn.decomposition._sparse_pca.SparsePCASparse Principal Components Analysis (SparsePCA).
class
sklearn.discriminant_analysis.LinearDiscriminantAnalysisLinear Discriminant Analysis.
method
sklearn.discriminant_analysis.LinearDiscriminantAnalysis.predict_proba(X)Estimate probability.
class
sklearn.discriminant_analysis.QuadraticDiscriminantAnalysisQuadratic Discriminant Analysis.
class
sklearn.dummy.DummyRegressorRegressor that makes predictions using simple rules.
method
sklearn.dummy.DummyRegressor.fit(X, y, sample_weight=None)Fit the baseline regressor.
class
sklearn.ensemble._bagging.BaggingClassifierA Bagging classifier.
method
sklearn.ensemble._bagging.BaggingClassifier.predict(X, **params)Predict class for X.
class
sklearn.ensemble._bagging.BaggingRegressorA Bagging regressor.
class
sklearn.ensemble._bagging.BaseBaggingBase class for Bagging meta-estimator.
class
sklearn.ensemble._base.BaseEnsembleBase class for all ensemble classes.
class
sklearn.ensemble._forest.BaseForestBase class for forests of trees.
class
sklearn.ensemble._forest.ExtraTreesClassifierAn extra-trees classifier.
class
sklearn.ensemble._forest.ExtraTreesRegressorAn extra-trees regressor.
class
sklearn.ensemble._forest.ForestClassifierBase class for forest of trees-based classifiers.
method
sklearn.ensemble._forest.ForestClassifier.predict(X)Predict class for X.
class
sklearn.ensemble._forest.ForestRegressorBase class for forest of trees-based regressors.
method
sklearn.ensemble._forest.ForestRegressor.predict(X)Predict regression target for X.
class
sklearn.ensemble._forest.RandomForestClassifierA random forest classifier.
class
sklearn.ensemble._forest.RandomForestRegressorA random forest regressor.
class
sklearn.ensemble._forest.RandomTreesEmbeddingAn ensemble of totally random trees.
method
sklearn.ensemble._forest.RandomTreesEmbedding.fit(X, y=None, sample_weight=None)Fit estimator.
method
sklearn.ensemble._forest.RandomTreesEmbedding.transform(X)Transform dataset.
class
sklearn.ensemble._gb.BaseGradientBoostingAbstract base class for Gradient Boosting.
class
sklearn.ensemble._gb.GradientBoostingClassifierGradient Boosting for classification.
method
sklearn.ensemble._gb.GradientBoostingClassifier.predict(X)Predict class for X.
class
sklearn.ensemble._gb.GradientBoostingRegressorGradient Boosting for regression.
class
sklearn.ensemble._gb.VerboseReporterReports verbose output to stdout.
class
sklearn.ensemble._hist_gradient_boosting.grower.TreeGrowerTree grower class used to build a tree.
class
sklearn.ensemble._hist_gradient_boosting.grower.TreeNodeTree Node class used in TreeGrower.
class
sklearn.ensemble._hist_gradient_boosting.predictor.TreePredictorTree class used for predictions.
class
sklearn.ensemble._iforest.IsolationForestIsolation Forest Algorithm.
method
sklearn.ensemble._iforest.IsolationForest.fit(X, y=None, sample_weight=None)Fit estimator.
class
sklearn.ensemble._stacking.StackingClassifierStack of estimators with a final classifier.
method
sklearn.ensemble._stacking.StackingClassifier.fit(X, y, **fit_params)Fit the estimators.
method
sklearn.ensemble._stacking.StackingClassifier.predict(X, **predict_params)Predict target for X.
class
sklearn.ensemble._stacking.StackingRegressorStack of estimators with a final regressor.
method
sklearn.ensemble._stacking.StackingRegressor.fit(X, y, **fit_params)Fit the estimators.
method
sklearn.ensemble._stacking.StackingRegressor.predict(X, **predict_params)Predict target for X.
class
sklearn.ensemble._voting.VotingRegressorPrediction voting regressor for unfitted estimators.
method
sklearn.ensemble._voting.VotingRegressor.fit(X, y, **fit_params)Fit the estimators.
method
sklearn.ensemble._voting.VotingRegressor.predict(X)Predict regression target for X.
class
sklearn.ensemble._weight_boosting.AdaBoostClassifierAn AdaBoost classifier.
method
sklearn.ensemble._weight_boosting.AdaBoostClassifier.predict(X)Predict classes for X.
class
sklearn.ensemble._weight_boosting.AdaBoostRegressorAn AdaBoost regressor.
class
sklearn.ensemble._weight_boosting.BaseWeightBoostingBase class for AdaBoost estimators.
class
sklearn.exceptions.ConvergenceWarningCustom warning to capture convergence problems ..
class
sklearn.exceptions.NotFittedErrorException class to raise if estimator is used before fitting.
class
sklearn.exceptions.UndefinedMetricWarningWarning used when the metric is invalid ..
class
sklearn.externals._arff.ArffDecoderAn ARFF decoder.
class
sklearn.externals._arff.ArffEncoderAn ARFF encoder.
class
sklearn.externals._numpydoc.docscrape.ReaderA line-based string reader.
func
sklearn.externals.array_api_compat._internal.clone_module(mod_name:str, globals_:dict[str, object]) -> list[str]Import everything from module, updating globals().
func
sklearn.externals.array_api_compat.common._helpers.device(x:_ArrayApiObj) -> DeviceHardware device the array data resides on.
func
sklearn.externals.array_api_compat.common._helpers.is_cupy_array(x:object) -> boolReturn True if `x` is a CuPy array.
func
sklearn.externals.array_api_compat.common._helpers.is_cupy_namespace(xp:Namespace) -> boolReturns True if `xp` is a CuPy namespace.
func
sklearn.externals.array_api_compat.common._helpers.is_dask_array(x:object) -> TypeIs[da.Array]Return True if `x` is a dask.array Array.
func
sklearn.externals.array_api_compat.common._helpers.is_dask_namespace(xp:Namespace) -> boolReturns True if `xp` is a Dask namespace.
func
sklearn.externals.array_api_compat.common._helpers.is_jax_array(x:object) -> TypeIs[jax.Array]Return True if `x` is a JAX array.
func
sklearn.externals.array_api_compat.common._helpers.is_jax_namespace(xp:Namespace) -> boolReturns True if `xp` is a JAX namespace.
func
sklearn.externals.array_api_compat.common._helpers.is_ndonnx_array(x:object) -> TypeIs[ndx.Array]Return True if `x` is a ndonnx Array.
func
sklearn.externals.array_api_compat.common._helpers.is_ndonnx_namespace(xp:Namespace) -> boolReturns True if `xp` is an NDONNX namespace.
func
sklearn.externals.array_api_compat.common._helpers.is_numpy_array(x:object) -> TypeIs[npt.NDArray[Any]]Return True if `x` is a NumPy array.
func
sklearn.externals.array_api_compat.common._helpers.is_numpy_namespace(xp:Namespace) -> boolReturns True if `xp` is a NumPy namespace.
func
sklearn.externals.array_api_compat.common._helpers.is_pydata_sparse_namespace(xp:Namespace) -> boolReturns True if `xp` is a pydata/sparse namespace.
func
sklearn.externals.array_api_compat.common._helpers.is_torch_array(x:object) -> TypeIs[torch.Tensor]Return True if `x` is a PyTorch tensor.
func
sklearn.externals.array_api_compat.common._helpers.is_torch_namespace(xp:Namespace) -> boolReturns True if `xp` is a PyTorch namespace.
func
sklearn.externals.array_api_compat.cupy._aliases.asarray(obj:Array | complex | NestedSequence[complex] | SupportsBufferProtocol, *dtype:DType | None=None, *device:Device | None=None, *copy:py_bool | None=None, **kwargs:object) -> ArrayArray API compatibility wrapper for asarray().
func
sklearn.externals.array_api_compat.dask.array._aliases.astype(x:Array, dtype:DType, *copy:py_bool=True, *device:Device | None=None) -> ArrayArray API compatibility wrapper for astype().
func
sklearn.externals.array_api_compat.dask.array._aliases.clip(x:Array, min:float | Array | None=None, max:float | Array | None=None) -> ArrayArray API compatibility wrapper for clip().
func
sklearn.externals.array_api_extra._delegation.create_diagonal(x:Array, *offset:int=0, *xp:ModuleType | None=None) -> ArrayConstruct a diagonal array.
func
sklearn.externals.array_api_extra._delegation.expand_dims(a:Array, *axis:int | tuple[int, ...]=(0,), *xp:ModuleType | None=None) -> ArrayExpand the shape of an array.
func
sklearn.externals.array_api_extra._delegation.kron(a:Array | complex, b:Array | complex, *xp:ModuleType | None=None) -> ArrayKronecker product of two arrays.
func
sklearn.externals.array_api_extra._delegation.one_hot(x:Array, num_classes:int, *dtype:DType | None=None, *axis:int=-1, *xp:ModuleType | None=None) -> ArrayOne-hot encode the given indices.
func
sklearn.externals.array_api_extra._delegation.pad(x:Array, pad_width:int | tuple[int, int] | Sequence[tuple[int, int]], mode:Literal['constant']='constant', *constant_values:complex=0, *xp:ModuleType | None=None) -> ArrayPad the input array.
func
sklearn.externals.array_api_extra._delegation.partition(a:Array, kth:int, axis:int | None=-1, *xp:ModuleType | None=None) -> ArrayReturn a partitioned copy of an array.
func
sklearn.externals.array_api_extra._delegation.setdiff1d(x1:Array | complex, x2:Array | complex, *assume_unique:bool=False, *xp:ModuleType | None=None) -> ArrayFind the set difference of two arrays.
func
sklearn.externals.array_api_extra._delegation.sinc(x:Array, *xp:ModuleType | None=None) -> ArrayReturn the normalized sinc function.
func
sklearn.externals.array_api_extra._delegation.union1d(a:Array, b:Array, *xp:ModuleType | None=None) -> ArrayFind the union of two arrays.
class
sklearn.externals.array_api_extra._lib._at.UndefSentinel for undefined values.
class
sklearn.externals.array_api_extra._lib._at.atUpdate operations for read-only arrays.
method
sklearn.externals.array_api_extra._lib._at.at.add(y:Array | complex, copy:bool | None=None, xp:ModuleType | None=None) -> ArrayApply ``x[idx] += y`` and return the updated array.
method
sklearn.externals.array_api_extra._lib._at.at.divide(y:Array | complex, copy:bool | None=None, xp:ModuleType | None=None) -> ArrayApply ``x[idx] /= y`` and return the updated array.
method
sklearn.externals.array_api_extra._lib._at.at.multiply(y:Array | complex, copy:bool | None=None, xp:ModuleType | None=None) -> ArrayApply ``x[idx] *= y`` and return the updated array.
method
sklearn.externals.array_api_extra._lib._at.at.set(y:Array | complex, copy:bool | None=None, xp:ModuleType | None=None) -> ArrayApply ``x[idx] = y`` and return the update array.
method
sklearn.externals.array_api_extra._lib._backends.Backend.like(*others:Backend) -> boolCheck if this backend uses the same module as others.
method
sklearn.externals.array_api_extra._lib._backends.Backend.modname() -> strModule name to be imported.
method
sklearn.externals.array_api_extra._lib._backends.Backend.pytest_param() -> AnyBackend as a pytest parameter.
func
sklearn.externals.array_api_extra._lib._funcs.angle(z:Array, *deg:bool=False, *xp:ModuleType | None=None) -> ArrayReturn the angle of the complex argument.
func
sklearn.externals.array_api_extra._lib._funcs.argpartition(x:Array, kth:int, axis:int=-1, *xp:ModuleType) -> ArraySee docstring in `array_api_extra._delegation.py`.
func
sklearn.externals.array_api_extra._lib._funcs.atleast_nd(x:Array, *ndim:int, *xp:ModuleType) -> ArraySee docstring in array_api_extra._delegation.
func
sklearn.externals.array_api_extra._lib._funcs.broadcast_shapes(*shapes:tuple[float | None, ...]) -> tuple[int | None, ...]See docstring in array_api_extra._delegation.
func
sklearn.externals.array_api_extra._lib._funcs.cov(m:Array, *xp:ModuleType) -> ArraySee docstring in array_api_extra._delegation.
func
sklearn.externals.array_api_extra._lib._funcs.create_diagonal(x:Array, *offset:int=0, *xp:ModuleType) -> ArraySee docstring in array_api_extra._delegation.
func
sklearn.externals.array_api_extra._lib._funcs.expand_dims(a:Array, *axis:tuple[int, ...]=(0,), *xp:ModuleType) -> ArraySee docstring in array_api_extra._delegation.
func
sklearn.externals.array_api_extra._lib._funcs.kron(a:Array, b:Array, *xp:ModuleType) -> ArraySee docstring in array_api_extra._delegation.
func
sklearn.externals.array_api_extra._lib._funcs.nan_to_num(x:Array, fill_value:int | float=0.0, *xp:ModuleType) -> ArraySee docstring in `array_api_extra._delegation.py`.
func
sklearn.externals.array_api_extra._lib._funcs.nunique(x:Array, *xp:ModuleType | None=None) -> ArrayCount the number of unique elements in an array.
func
sklearn.externals.array_api_extra._lib._funcs.one_hot(x:Array, num_classes:int, *xp:ModuleType) -> ArraySee docstring in `array_api_extra._delegation.py`.
func
sklearn.externals.array_api_extra._lib._funcs.partition(x:Array, kth:int, axis:int=-1, *xp:ModuleType) -> ArraySee docstring in `array_api_extra._delegation.py`.
func
sklearn.externals.array_api_extra._lib._funcs.perform_replacements(x:Array, fill_value:int | float, xp:ModuleType) -> ArrayInternal function to perform the replacements.
func
sklearn.externals.array_api_extra._lib._funcs.sinc(x:Array, *xp:ModuleType) -> ArraySee docstring in `array_api_extra._delegation.py`.
func
sklearn.externals.array_api_extra._lib._funcs.union1d(a:Array, b:Array, *xp:ModuleType) -> ArraySee docstring in `array_api_extra._delegation.py`.
func
sklearn.externals.array_api_extra._lib._utils._helpers.asarrays(a:Array | complex, b:Array | complex, xp:ModuleType) -> tuple[Array, Array]Ensure both `a` and `b` are arrays.
func
sklearn.externals.array_api_extra._lib._utils._helpers.eager_shape(x:Array, axis:int | None=None) -> tuple[int, ...]Return shape of an array.
func
sklearn.externals.array_api_extra._lib._utils._helpers.meta_namespace(*xp:ModuleType | None=None, *arrays:Array | complex | None) -> ModuleTypeGet the namespace of Dask chunks.
func
sklearn.externals.array_api_extra._lib._utils._helpers.pickle_unflatten(instances:Iterable[object], rest:FlattenRest) -> AnyReverse of ``pickle_flatten``.
class
sklearn.externals.array_api_extra.testing.DeprecatedUnique type for deprecated parameters.
func
sklearn.externals.array_api_extra.testing.temp_setattr(target:ModuleType | type, name:str, func:object) -> NoneTemporary setattr.
class
sklearn.feature_extraction._hash.FeatureHasherImplements feature hashing, aka the hashing trick.
class
sklearn.feature_extraction.image.PatchExtractorExtracts patches from a collection of images.
class
sklearn.feature_selection._rfe.RFEFeature ranking with recursive feature elimination.
func
sklearn.feature_selection._univariate_selection.f_oneway(*args)Perform a 1-way ANOVA.
class
sklearn.gaussian_process._gpr.GaussianProcessRegressorGaussian process regression (GPR).
class
sklearn.gaussian_process.kernels.CompoundKernelKernel which is composed of a set of other kernels.
class
sklearn.gaussian_process.kernels.ConstantKernelConstant kernel.
class
sklearn.gaussian_process.kernels.DotProductDot-Product kernel.
class
sklearn.gaussian_process.kernels.ExpSineSquaredExp-Sine-Squared kernel (aka periodic kernel).
class
sklearn.gaussian_process.kernels.KernelBase class for all kernels.
method
sklearn.gaussian_process.kernels.Kernel.get_params(deep=True)Get parameters of this kernel.
class
sklearn.gaussian_process.kernels.KernelOperatorBase class for all kernel operators.
class
sklearn.gaussian_process.kernels.MaternMatern kernel.
class
sklearn.gaussian_process.kernels.NormalizedKernelMixinMixin for kernels which are normalized: k(X, X)=1.
class
sklearn.gaussian_process.kernels.PairwiseKernelWrapper for kernels in sklearn.metrics.pairwise.
class
sklearn.gaussian_process.kernels.RationalQuadraticRational Quadratic kernel.
class
sklearn.gaussian_process.kernels.WhiteKernelWhite kernel.
class
sklearn.impute._base.MissingIndicatorBinary indicators for missing values.
method
sklearn.impute._base.MissingIndicator.fit(X, y=None)Fit the transformer on `X`.
method
sklearn.impute._base.SimpleImputer.fit(X, y=None)Fit the imputer on `X`.
method
sklearn.impute._base.SimpleImputer.transform(X)Impute all missing values in `X`.
class
sklearn.inspection._plot.decision_boundary.DecisionBoundaryDisplayDecisions boundary visualization.
class
sklearn.isotonic.IsotonicRegressionIsotonic regression model.
class
sklearn.kernel_approximation.AdditiveChi2SamplerApproximate feature map for additive chi2 kernel.
class
sklearn.kernel_approximation.PolynomialCountSketchPolynomial kernel approximation via Tensor Sketch.
method
sklearn.kernel_approximation.PolynomialCountSketch.fit(X, y=None)Fit the model with X.
method
sklearn.kernel_approximation.SkewedChi2Sampler.fit(X, y=None)Fit the model with X.
class
sklearn.kernel_ridge.KernelRidgeKernel ridge regression.
class
sklearn.linear_model._base.LinearClassifierMixinMixin for linear classifiers.
class
sklearn.linear_model._base.LinearModelBase class for Linear Models
method
sklearn.linear_model._base.LinearModel.fit(X, y)Fit model.
method
sklearn.linear_model._base.LinearModel.predict(X)Predict using the linear model.
class
sklearn.linear_model._base.LinearRegressionOrdinary least squares Linear Regression.
method
sklearn.linear_model._base.LinearRegression.fit(X, y, sample_weight=None)Fit linear model.
class
sklearn.linear_model._base.SparseCoefMixinMixin for converting coef_ to and from CSR format.
class
sklearn.linear_model._bayes.ARDRegressionBayesian ARD regression.
class
sklearn.linear_model._bayes.BayesianRidgeBayesian ridge regression.
method
sklearn.linear_model._bayes.BayesianRidge.fit(X, y, sample_weight=None)Fit the model.
class
sklearn.linear_model._glm._newton_solver.NewtonCholeskySolverCholesky based Newton solver.
class
sklearn.linear_model._glm._newton_solver.NewtonSolverNewton solver for GLMs.
method
sklearn.linear_model._glm._newton_solver.NewtonSolver.inner_solve(X, y, sample_weight)Compute Newton step.
class
sklearn.linear_model._glm.glm.GammaRegressorGeneralized Linear Model with a Gamma distribution.
class
sklearn.linear_model._glm.glm.PoissonRegressorGeneralized Linear Model with a Poisson distribution.
class
sklearn.linear_model._glm.glm.TweedieRegressorGeneralized Linear Model with a Tweedie distribution.
class
sklearn.linear_model._least_angle.LarsLeast Angle Regression model aka LAR.
class
sklearn.linear_model._least_angle.LarsCVCross-validated Least Angle Regression model.
class
sklearn.linear_model._least_angle.LassoLarsLasso model fit with Least Angle Regression aka Lars.
class
sklearn.linear_model._least_angle.LassoLarsCVCross-validated Lasso, using the LARS algorithm.
class
sklearn.linear_model._logistic.LogisticRegressionLogistic Regression (aka logit, MaxEnt) classifier.
method
sklearn.linear_model._logistic.LogisticRegression.predict_proba(X)Probability estimates.
class
sklearn.linear_model._omp.OrthogonalMatchingPursuitOrthogonal Matching Pursuit model (OMP).
class
sklearn.linear_model._passive_aggressive.PassiveAggressiveClassifierPassive Aggressive Classifier.
class
sklearn.linear_model._passive_aggressive.PassiveAggressiveRegressorPassive Aggressive Regressor.
class
sklearn.linear_model._perceptron.PerceptronLinear perceptron classifier.
class
sklearn.linear_model._ransac.RANSACRegressorRANSAC (RANdom SAmple Consensus) algorithm.
class
sklearn.linear_model._ridge.RidgeLinear least squares with l2 regularization.
method
sklearn.linear_model._ridge.Ridge.fit(X, y, sample_weight=None)Fit Ridge regression model.
method
sklearn.linear_model._ridge.Ridge.predict(X)Predict using the linear model.
class
sklearn.linear_model._ridge.RidgeCVRidge regression with built-in cross-validation.
method
sklearn.linear_model._ridge.RidgeCV.predict(X)Predict using the linear model.
class
sklearn.linear_model._ridge.RidgeClassifierClassifier using Ridge regression.
method
sklearn.linear_model._ridge.RidgeClassifier.fit(X, y, sample_weight=None)Fit Ridge classifier model.
class
sklearn.linear_model._ridge.RidgeClassifierCVRidge classifier with built-in cross-validation.
class
sklearn.linear_model._stochastic_gradient.BaseSGDBase class for SGD classification and regression.
method
sklearn.linear_model._stochastic_gradient.BaseSGD.fit(X, y)Fit model.
class
sklearn.manifold._classical_mds.ClassicalMDSClassical multidimensional scaling (MDS).
class
sklearn.manifold._isomap.IsomapIsomap Embedding.
method
sklearn.manifold._isomap.Isomap.transform(X)Transform X.
class
sklearn.manifold._locally_linear.LocallyLinearEmbeddingLocally Linear Embedding.
class
sklearn.manifold._mds.MDSMultidimensional scaling.
class
sklearn.manifold._t_sne.TSNET-distributed Stochastic Neighbor Embedding.
method
sklearn.manifold._t_sne.TSNE.fit(X, y=None)Fit X into an embedded space.
class
sklearn.metrics._plot.confusion_matrix.ConfusionMatrixDisplayConfusion Matrix visualization.
class
sklearn.metrics._plot.det_curve.DetCurveDisplayDetection Error Tradeoff (DET) curve visualization.
method
sklearn.metrics._plot.det_curve.DetCurveDisplay.plot(ax=None, *name=None, *curve_kwargs=None, **kwargs)Plot visualization.
class
sklearn.metrics._plot.precision_recall_curve.PrecisionRecallDisplayPrecision Recall visualization.
class
sklearn.metrics._plot.roc_curve.RocCurveDisplayROC Curve visualization.
func
sklearn.metrics._ranking.coverage_error(y_true, y_score, *sample_weight=None)Coverage error measure.
func
sklearn.metrics._scorer.get_scorer(scoring)Get a scorer from string.
func
sklearn.metrics.cluster._supervised.rand_score(labels_true, labels_pred)Rand index.
func
sklearn.metrics.pairwise.kernel_metrics()Valid metrics for pairwise_kernels.
class
sklearn.mixture._base.BaseMixtureBase class for mixture models.
class
sklearn.mixture._gaussian_mixture.GaussianMixtureGaussian Mixture.
class
sklearn.model_selection._plot.LearningCurveDisplayLearning Curve visualization.
class
sklearn.model_selection._plot.ValidationCurveDisplayValidation Curve visualization.
class
sklearn.model_selection._search.RandomizedSearchCVRandomized search on hyper parameters.
class
sklearn.model_selection._search_successive_halving.BaseSuccessiveHalvingImplements successive halving.
class
sklearn.model_selection._search_successive_halving.HalvingRandomSearchCVRandomized search on hyper parameters.
class
sklearn.model_selection._split.BaseCrossValidatorBase class for all cross-validators.
class
sklearn.model_selection._split.BaseShuffleSplitBase class for *ShuffleSplit.
class
sklearn.model_selection._split.GroupKFoldK-fold iterator variant with non-overlapping groups.
class
sklearn.model_selection._split.GroupShuffleSplitShuffle-Group(s)-Out cross-validation iterator.
class
sklearn.model_selection._split.GroupsConsumerMixinA Mixin to ``groups`` by default.
class
sklearn.model_selection._split.KFoldK-Fold cross-validator.
class
sklearn.model_selection._split.LeaveOneGroupOutLeave One Group Out cross-validator.
class
sklearn.model_selection._split.LeaveOneOutLeave-One-Out cross-validator.
class
sklearn.model_selection._split.LeavePGroupsOutLeave P Group(s) Out cross-validator.
class
sklearn.model_selection._split.LeavePOutLeave-P-Out cross-validator.
class
sklearn.model_selection._split.PredefinedSplitPredefined split cross-validator.
class
sklearn.model_selection._split.RepeatedKFoldRepeated K-Fold cross validator.
class
sklearn.model_selection._split.ShuffleSplitRandom permutation cross-validator.
class
sklearn.model_selection._split.StratifiedKFoldClass-wise stratified K-Fold cross-validator.
class
sklearn.model_selection._split.StratifiedShuffleSplitClass-wise stratified ShuffleSplit cross-validator.
class
sklearn.model_selection._split.TimeSeriesSplitTime Series cross-validator.
class
sklearn.multiclass.OneVsOneClassifierOne-vs-one multiclass strategy.
method
sklearn.multiclass.OneVsOneClassifier.fit(X, y, **fit_params)Fit underlying estimators.
method
sklearn.multiclass.OneVsOneClassifier.n_classes_()Number of classes.
class
sklearn.multiclass.OneVsRestClassifierOne-vs-the-rest (OvR) multiclass strategy.
method
sklearn.multiclass.OneVsRestClassifier.fit(X, y, **fit_params)Fit underlying estimators.
method
sklearn.multiclass.OneVsRestClassifier.n_classes_()Number of classes.
method
sklearn.multiclass.OneVsRestClassifier.predict_proba(X)Probability estimates.
class
sklearn.multiclass.OutputCodeClassifier(Error-Correcting) Output-Code multiclass strategy.
method
sklearn.multiclass.OutputCodeClassifier.fit(X, y, **fit_params)Fit underlying estimators.
class
sklearn.multioutput.MultiOutputClassifierMulti target classification.
class
sklearn.multioutput.MultiOutputRegressorMulti target regression.
class
sklearn.naive_bayes.BernoulliNBNaive Bayes classifier for multivariate Bernoulli models.
class
sklearn.naive_bayes.CategoricalNBNaive Bayes classifier for categorical features.
class
sklearn.naive_bayes.GaussianNBGaussian Naive Bayes (GaussianNB).
class
sklearn.naive_bayes.MultinomialNBNaive Bayes classifier for multinomial models.
class
sklearn.neighbors._base.KNeighborsMixinMixin for k-neighbors searches.
class
sklearn.neighbors._base.NeighborsBaseBase class for nearest neighbors estimators.
class
sklearn.neighbors._base.RadiusNeighborsMixinMixin for radius-based neighbors searches.
class
sklearn.neighbors._kde.KernelDensityKernel Density Estimation.
class
sklearn.neighbors._nca.NeighborhoodComponentsAnalysisNeighborhood Components Analysis.
class
sklearn.neighbors._nearest_centroid.NearestCentroidNearest centroid classifier.
class
sklearn.neighbors._regression.KNeighborsRegressorRegression based on k-nearest neighbors.
class
sklearn.neighbors._unsupervised.NearestNeighborsUnsupervised learner for implementing neighbor searches.
func
sklearn.neural_network._base.inplace_exp(X)Compute the exponential inplace.
class
sklearn.neural_network._multilayer_perceptron.MLPClassifierMulti-layer Perceptron classifier.
method
sklearn.neural_network._multilayer_perceptron.MLPClassifier.predict_proba(X)Probability estimates.
class
sklearn.neural_network._multilayer_perceptron.MLPRegressorMulti-layer Perceptron regressor.
class
sklearn.neural_network._rbm.BernoulliRBMBernoulli Restricted Boltzmann Machine (RBM).
method
sklearn.neural_network._rbm.BernoulliRBM.fit(X, y=None)Fit the model to the data X.
method
sklearn.neural_network._rbm.BernoulliRBM.gibbs(v)Perform one Gibbs sampling step.
class
sklearn.pipeline.FeatureUnionConcatenates results of multiple transformer objects.
method
sklearn.pipeline.FeatureUnion.fit(X, y=None, **fit_params)Fit all transformers using X.
method
sklearn.pipeline.Pipeline.classes_()The classes labels.
method
sklearn.pipeline.Pipeline.fit(X, y=None, **params)Fit the model.
method
sklearn.pipeline.Pipeline.get_params(deep=True)Get parameters for this estimator.
method
sklearn.pipeline.Pipeline.named_steps()Access the steps by name.
method
sklearn.preprocessing._data.Binarizer.transform(X, copy=None)Binarize each element of X.
class
sklearn.preprocessing._data.KernelCentererCenter an arbitrary kernel matrix :math:`K`.
method
sklearn.preprocessing._data.KernelCenterer.fit(K, y=None)Fit KernelCenterer.
method
sklearn.preprocessing._data.KernelCenterer.transform(K, copy=True)Center kernel matrix.
class
sklearn.preprocessing._data.MaxAbsScalerScale each feature by its maximum absolute value.
method
sklearn.preprocessing._data.MaxAbsScaler.transform(X)Scale the data.
class
sklearn.preprocessing._data.NormalizerNormalize samples individually to unit norm.
class
sklearn.preprocessing._data.QuantileTransformerTransform features using quantiles information.
class
sklearn.preprocessing._discretization.KBinsDiscretizerBin continuous data into intervals.
method
sklearn.preprocessing._discretization.KBinsDiscretizer.fit(X, y=None, sample_weight=None)Fit the estimator.
method
sklearn.preprocessing._discretization.KBinsDiscretizer.transform(X)Discretize the data.
class
sklearn.preprocessing._encoders.OneHotEncoderEncode categorical features as a one-hot numeric array.
method
sklearn.preprocessing._encoders.OneHotEncoder.fit(X, y=None)Fit OneHotEncoder to X.
class
sklearn.preprocessing._encoders.OrdinalEncoderEncode categorical features as an integer array.
method
sklearn.preprocessing._encoders.OrdinalEncoder.fit(X, y=None)Fit the OrdinalEncoder to X.
method
sklearn.preprocessing._encoders.OrdinalEncoder.transform(X)Transform X to ordinal codes.
class
sklearn.preprocessing._label.LabelBinarizerBinarize labels in a one-vs-all fashion.
method
sklearn.preprocessing._label.LabelBinarizer.fit(y)Fit label binarizer.
class
sklearn.preprocessing._label.LabelEncoderEncode target labels with value between 0 and n_classes-1.
method
sklearn.preprocessing._label.LabelEncoder.fit(y)Fit label encoder.
class
sklearn.preprocessing._polynomial.PolynomialFeaturesGenerate polynomial and interaction features.
class
sklearn.preprocessing._polynomial.SplineTransformerGenerate univariate B-spline bases for features.
class
sklearn.random_projection.BaseRandomProjectionBase class for random projections.
class
sklearn.semi_supervised._label_propagation.BaseLabelPropagationBase class for label propagation module.
class
sklearn.semi_supervised._label_propagation.LabelPropagationLabel Propagation classifier.
class
sklearn.semi_supervised._self_training.SelfTrainingClassifierSelf-training classifier.
class
sklearn.svm._base.BaseLibSVMBase class for estimators that use libsvm as backing library.
method
sklearn.svm._base.BaseLibSVM.predict(X)Perform regression on samples in X.
class
sklearn.svm._base.BaseSVCABC for LibSVM-based classifiers.
class
sklearn.svm._classes.LinearSVCLinear Support Vector Classification.
class
sklearn.svm._classes.LinearSVRLinear Support Vector Regression.
class
sklearn.svm._classes.NuSVCNu-Support Vector Classification.
class
sklearn.svm._classes.NuSVRNu Support Vector Regression.
class
sklearn.svm._classes.OneClassSVMUnsupervised Outlier Detection.
class
sklearn.svm._classes.SVCC-Support Vector Classification.
class
sklearn.svm._classes.SVREpsilon-Support Vector Regression.
class
sklearn.tree._classes.BaseDecisionTreeBase class for decision trees.
class
sklearn.tree._classes.DecisionTreeClassifierA decision tree classifier.
class
sklearn.tree._classes.DecisionTreeRegressorA decision tree regressor.
class
sklearn.tree._classes.ExtraTreeClassifierAn extremely randomized tree classifier.
class
sklearn.tree._classes.ExtraTreeRegressorAn extremely randomized tree regressor.
func
sklearn.utils._array_api.get_namespace(*remove_none=True, *remove_types=REMOVE_TYPES_DEFAULT, *xp=None, *arrays)Get namespace of arrays.
func
sklearn.utils._array_api.move_to(*xp, *device, *arrays)Move all arrays to `xp` and `device`.
func
sklearn.utils._array_api.yield_namespaces(include_numpy_namespaces=True)Yield supported namespace.
class
sklearn.utils._bunch.BunchContainer object exposing keys as attributes.
class
sklearn.utils._encode.MissingValuesData class for missing data information
class
sklearn.utils._metadata_requests.MetadataRouterCoordinates metadata routing for a :term:`router` object.
func
sklearn.utils._metadata_requests._MetadataRequester.is_RequestMethod(obj, name:str)Check if obj.name is a RequestMethod
func
sklearn.utils._metadata_requests.process_routing(_obj, _method, **kwargs)Validate and route metadata.
func
sklearn.utils._missing.is_pandas_na(x)Test if x is pandas.NA.
func
sklearn.utils._missing.is_scalar_nan(x)Test if x is NaN.
class
sklearn.utils._mocking.ArraySlicingWrapperParameters ---------- array
method
sklearn.utils._mocking.CheckingClassifier.decision_function(X)Confidence score.
method
sklearn.utils._mocking.CheckingClassifier.fit(X, y, sample_weight=None, **fit_params)Fit classifier.
method
sklearn.utils._mocking.CheckingClassifier.score(X=None, Y=None)Fake score.
class
sklearn.utils._mocking.MockDataFrameParameters ---------- array
class
sklearn.utils._mocking.NoSampleWeightWrapperWrap estimator which will not expose `sample_weight`.
class
sklearn.utils._param_validation.IntervalConstraint representing a typed interval.
class
sklearn.utils._param_validation.StrOptionsConstraint representing a finite set of strings.
class
sklearn.utils._repr_html.base.ReprHTMLMixinMixin to handle consistently the HTML representation.
func
sklearn.utils._set_output.check_library_installed(library)Check library is installed.
class
sklearn.utils._tags.ClassifierTagsTags for the classifier.
class
sklearn.utils._tags.InputTagsTags for the input data.
class
sklearn.utils._tags.RegressorTagsTags for the regressor.
class
sklearn.utils._tags.TagsTags for the estimator.
class
sklearn.utils._tags.TargetTagsTags for the target data.
class
sklearn.utils._tags.TransformerTagsTags for the transformer.
func
sklearn.utils._tags.get_tags(estimator) -> TagsGet estimator tags.
func
sklearn.utils._unique.cached_unique(*xp=None, *ys)Return the unique values of ys.
class
sklearn.utils.deprecation.deprecatedDecorator to mark a function or class as deprecated.
func
sklearn.utils.extmath.density(w)Compute density of a sparse vector.
func
sklearn.utils.extmath.make_nonnegative(X, min_value=0)Ensure `X.min()` >= `min_value`.
func
sklearn.utils.extmath.row_norms(X, squared=False)Row-wise (squared) Euclidean norm of X.
func
sklearn.utils.extmath.softmax(X, copy=True)Calculate the softmax function.
func
sklearn.utils.validation.check_is_fitted(estimator, attributes=None, *msg=None, *all_or_any=all)Perform is_fitted validation for estimator.
About this data
These signatures were extracted from the public source of scikit-learn/scikit-learn
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.