doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
static path(*args, **kwargs) [source]
Compute elastic net path with coordinate descent. The elastic net optimization function varies for mono and multi-outputs. For mono-output tasks it is: 1 / (2 * n_samples) * ||y - Xw||^2_2
+ alpha * l1_ratio * ||w||_1
+ 0.5 * alpha * (1 - l1_ratio) * ||w||^2_2
For multi-output t... | sklearn.modules.generated.sklearn.linear_model.multitasklasso#sklearn.linear_model.MultiTaskLasso.path |
predict(X) [source]
Predict using the linear model. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape (n_samples,)
Returns predicted values. | sklearn.modules.generated.sklearn.linear_model.multitasklasso#sklearn.linear_model.MultiTaskLasso.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.linear_model.multitasklasso#sklearn.linear_model.MultiTaskLasso.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.multitasklasso#sklearn.linear_model.MultiTaskLasso.set_params |
property sparse_coef_
Sparse representation of the fitted coef_. | sklearn.modules.generated.sklearn.linear_model.multitasklasso#sklearn.linear_model.MultiTaskLasso.sparse_coef_ |
class sklearn.linear_model.MultiTaskLassoCV(*, eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, normalize=False, max_iter=1000, tol=0.0001, copy_X=True, cv=None, verbose=False, n_jobs=None, random_state=None, selection='cyclic') [source]
Multi-task Lasso model trained with L1/L2 mixed-norm as regularizer. Se... | sklearn.modules.generated.sklearn.linear_model.multitasklassocv#sklearn.linear_model.MultiTaskLassoCV |
sklearn.linear_model.MultiTaskLassoCV
class sklearn.linear_model.MultiTaskLassoCV(*, eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, normalize=False, max_iter=1000, tol=0.0001, copy_X=True, cv=None, verbose=False, n_jobs=None, random_state=None, selection='cyclic') [source]
Multi-task Lasso model trained ... | sklearn.modules.generated.sklearn.linear_model.multitasklassocv |
fit(X, y) [source]
Fit linear model with coordinate descent. Fit is on grid of alphas and best alpha estimated by cross-validation. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Training data. Pass directly as Fortran-contiguous data to avoid unnecessary memory duplication. If y is mo... | sklearn.modules.generated.sklearn.linear_model.multitasklassocv#sklearn.linear_model.MultiTaskLassoCV.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.multitasklassocv#sklearn.linear_model.MultiTaskLassoCV.get_params |
static path(*args, **kwargs) [source]
Compute Lasso path with coordinate descent The Lasso optimization function varies for mono and multi-outputs. For mono-output tasks it is: (1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1
For multi-output tasks it is: (1 / (2 * n_samples)) * ||Y - XW||^2_Fro + alpha * ||... | sklearn.modules.generated.sklearn.linear_model.multitasklassocv#sklearn.linear_model.MultiTaskLassoCV.path |
predict(X) [source]
Predict using the linear model. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape (n_samples,)
Returns predicted values. | sklearn.modules.generated.sklearn.linear_model.multitasklassocv#sklearn.linear_model.MultiTaskLassoCV.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.linear_model.multitasklassocv#sklearn.linear_model.MultiTaskLassoCV.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.multitasklassocv#sklearn.linear_model.MultiTaskLassoCV.set_params |
class sklearn.linear_model.OrthogonalMatchingPursuit(*, n_nonzero_coefs=None, tol=None, fit_intercept=True, normalize=True, precompute='auto') [source]
Orthogonal Matching Pursuit model (OMP). Read more in the User Guide. Parameters
n_nonzero_coefsint, default=None
Desired number of non-zero entries in the solu... | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuit#sklearn.linear_model.OrthogonalMatchingPursuit |
sklearn.linear_model.OrthogonalMatchingPursuit
class sklearn.linear_model.OrthogonalMatchingPursuit(*, n_nonzero_coefs=None, tol=None, fit_intercept=True, normalize=True, precompute='auto') [source]
Orthogonal Matching Pursuit model (OMP). Read more in the User Guide. Parameters
n_nonzero_coefsint, default=None... | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuit |
fit(X, y) [source]
Fit the model using X, y as training data. Parameters
Xarray-like of shape (n_samples, n_features)
Training data.
yarray-like of shape (n_samples,) or (n_samples, n_targets)
Target values. Will be cast to X’s dtype if necessary Returns
selfobject
returns an instance of self. | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuit#sklearn.linear_model.OrthogonalMatchingPursuit.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuit#sklearn.linear_model.OrthogonalMatchingPursuit.get_params |
predict(X) [source]
Predict using the linear model. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape (n_samples,)
Returns predicted values. | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuit#sklearn.linear_model.OrthogonalMatchingPursuit.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuit#sklearn.linear_model.OrthogonalMatchingPursuit.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuit#sklearn.linear_model.OrthogonalMatchingPursuit.set_params |
class sklearn.linear_model.OrthogonalMatchingPursuitCV(*, copy=True, fit_intercept=True, normalize=True, max_iter=None, cv=None, n_jobs=None, verbose=False) [source]
Cross-validated Orthogonal Matching Pursuit model (OMP). See glossary entry for cross-validation estimator. Read more in the User Guide. Parameters
... | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuitcv#sklearn.linear_model.OrthogonalMatchingPursuitCV |
sklearn.linear_model.OrthogonalMatchingPursuitCV
class sklearn.linear_model.OrthogonalMatchingPursuitCV(*, copy=True, fit_intercept=True, normalize=True, max_iter=None, cv=None, n_jobs=None, verbose=False) [source]
Cross-validated Orthogonal Matching Pursuit model (OMP). See glossary entry for cross-validation esti... | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuitcv |
fit(X, y) [source]
Fit the model using X, y as training data. Parameters
Xarray-like of shape (n_samples, n_features)
Training data.
yarray-like of shape (n_samples,)
Target values. Will be cast to X’s dtype if necessary. Returns
selfobject
returns an instance of self. | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuitcv#sklearn.linear_model.OrthogonalMatchingPursuitCV.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuitcv#sklearn.linear_model.OrthogonalMatchingPursuitCV.get_params |
predict(X) [source]
Predict using the linear model. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape (n_samples,)
Returns predicted values. | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuitcv#sklearn.linear_model.OrthogonalMatchingPursuitCV.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuitcv#sklearn.linear_model.OrthogonalMatchingPursuitCV.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.orthogonalmatchingpursuitcv#sklearn.linear_model.OrthogonalMatchingPursuitCV.set_params |
sklearn.linear_model.orthogonal_mp(X, y, *, n_nonzero_coefs=None, tol=None, precompute=False, copy_X=True, return_path=False, return_n_iter=False) [source]
Orthogonal Matching Pursuit (OMP). Solves n_targets Orthogonal Matching Pursuit problems. An instance of the problem has the form: When parametrized by the number... | sklearn.modules.generated.sklearn.linear_model.orthogonal_mp#sklearn.linear_model.orthogonal_mp |
sklearn.linear_model.orthogonal_mp_gram(Gram, Xy, *, n_nonzero_coefs=None, tol=None, norms_squared=None, copy_Gram=True, copy_Xy=True, return_path=False, return_n_iter=False) [source]
Gram Orthogonal Matching Pursuit (OMP). Solves n_targets Orthogonal Matching Pursuit problems using only the Gram matrix X.T * X and t... | sklearn.modules.generated.sklearn.linear_model.orthogonal_mp_gram#sklearn.linear_model.orthogonal_mp_gram |
class sklearn.linear_model.PassiveAggressiveClassifier(*, C=1.0, fit_intercept=True, max_iter=1000, tol=0.001, early_stopping=False, validation_fraction=0.1, n_iter_no_change=5, shuffle=True, verbose=0, loss='hinge', n_jobs=None, random_state=None, warm_start=False, class_weight=None, average=False) [source]
Passive ... | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier |
sklearn.linear_model.PassiveAggressiveClassifier
class sklearn.linear_model.PassiveAggressiveClassifier(*, C=1.0, fit_intercept=True, max_iter=1000, tol=0.001, early_stopping=False, validation_fraction=0.1, n_iter_no_change=5, shuffle=True, verbose=0, loss='hinge', n_jobs=None, random_state=None, warm_start=False, cl... | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier |
decision_function(X) [source]
Predict confidence scores for samples. The confidence score for a sample is proportional to the signed distance of that sample to the hyperplane. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
array, shape=(n_samples,) if n_classes == 2... | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier.decision_function |
densify() [source]
Convert coefficient matrix to dense array format. Converts the coef_ member (back) to a numpy.ndarray. This is the default format of coef_ and is required for fitting, so calling this method is only required on models that have previously been sparsified; otherwise, it is a no-op. Returns
self
... | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier.densify |
fit(X, y, coef_init=None, intercept_init=None) [source]
Fit linear model with Passive Aggressive algorithm. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Training data
ynumpy array of shape [n_samples]
Target values
coef_initarray, shape = [n_classes,n_features]
The initial co... | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier.get_params |
partial_fit(X, y, classes=None) [source]
Fit linear model with Passive Aggressive algorithm. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Subset of the training data
ynumpy array of shape [n_samples]
Subset of the target values
classesarray, shape = [n_classes]
Classes across... | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier.partial_fit |
predict(X) [source]
Predict class labels for samples in X. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape [n_samples]
Predicted class label per sample. | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier.predict |
score(X, y, sample_weight=None) [source]
Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters
Xarray-like of shape (n_samples, n_featur... | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier.score |
set_params(**kwargs) [source]
Set and validate the parameters of estimator. Parameters
**kwargsdict
Estimator parameters. Returns
selfobject
Estimator instance. | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier.set_params |
sparsify() [source]
Convert coefficient matrix to sparse format. Converts the coef_ member to a scipy.sparse matrix, which for L1-regularized models can be much more memory- and storage-efficient than the usual numpy.ndarray representation. The intercept_ member is not converted. Returns
self
Fitted estimator. ... | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveclassifier#sklearn.linear_model.PassiveAggressiveClassifier.sparsify |
sklearn.linear_model.PassiveAggressiveRegressor(*, C=1.0, fit_intercept=True, max_iter=1000, tol=0.001, early_stopping=False, validation_fraction=0.1, n_iter_no_change=5, shuffle=True, verbose=0, loss='epsilon_insensitive', epsilon=0.1, random_state=None, warm_start=False, average=False) [source]
Passive Aggressive R... | sklearn.modules.generated.sklearn.linear_model.passiveaggressiveregressor#sklearn.linear_model.PassiveAggressiveRegressor |
class sklearn.linear_model.Perceptron(*, penalty=None, alpha=0.0001, l1_ratio=0.15, fit_intercept=True, max_iter=1000, tol=0.001, shuffle=True, verbose=0, eta0=1.0, n_jobs=None, random_state=0, early_stopping=False, validation_fraction=0.1, n_iter_no_change=5, class_weight=None, warm_start=False) [source]
Read more i... | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron |
sklearn.linear_model.Perceptron
class sklearn.linear_model.Perceptron(*, penalty=None, alpha=0.0001, l1_ratio=0.15, fit_intercept=True, max_iter=1000, tol=0.001, shuffle=True, verbose=0, eta0=1.0, n_jobs=None, random_state=0, early_stopping=False, validation_fraction=0.1, n_iter_no_change=5, class_weight=None, warm_s... | sklearn.modules.generated.sklearn.linear_model.perceptron |
decision_function(X) [source]
Predict confidence scores for samples. The confidence score for a sample is proportional to the signed distance of that sample to the hyperplane. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
array, shape=(n_samples,) if n_classes == 2... | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron.decision_function |
densify() [source]
Convert coefficient matrix to dense array format. Converts the coef_ member (back) to a numpy.ndarray. This is the default format of coef_ and is required for fitting, so calling this method is only required on models that have previously been sparsified; otherwise, it is a no-op. Returns
self
... | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron.densify |
fit(X, y, coef_init=None, intercept_init=None, sample_weight=None) [source]
Fit linear model with Stochastic Gradient Descent. Parameters
X{array-like, sparse matrix}, shape (n_samples, n_features)
Training data.
yndarray of shape (n_samples,)
Target values.
coef_initndarray of shape (n_classes, n_feature... | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron.get_params |
partial_fit(X, y, classes=None, sample_weight=None) [source]
Perform one epoch of stochastic gradient descent on given samples. Internally, this method uses max_iter = 1. Therefore, it is not guaranteed that a minimum of the cost function is reached after calling it once. Matters such as objective convergence and ear... | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron.partial_fit |
predict(X) [source]
Predict class labels for samples in X. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape [n_samples]
Predicted class label per sample. | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron.predict |
score(X, y, sample_weight=None) [source]
Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters
Xarray-like of shape (n_samples, n_featur... | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron.score |
set_params(**kwargs) [source]
Set and validate the parameters of estimator. Parameters
**kwargsdict
Estimator parameters. Returns
selfobject
Estimator instance. | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron.set_params |
sparsify() [source]
Convert coefficient matrix to sparse format. Converts the coef_ member to a scipy.sparse matrix, which for L1-regularized models can be much more memory- and storage-efficient than the usual numpy.ndarray representation. The intercept_ member is not converted. Returns
self
Fitted estimator. ... | sklearn.modules.generated.sklearn.linear_model.perceptron#sklearn.linear_model.Perceptron.sparsify |
class sklearn.linear_model.PoissonRegressor(*, alpha=1.0, fit_intercept=True, max_iter=100, tol=0.0001, warm_start=False, verbose=0) [source]
Generalized Linear Model with a Poisson distribution. Read more in the User Guide. New in version 0.23. Parameters
alphafloat, default=1
Constant that multiplies the pe... | sklearn.modules.generated.sklearn.linear_model.poissonregressor#sklearn.linear_model.PoissonRegressor |
sklearn.linear_model.PoissonRegressor
class sklearn.linear_model.PoissonRegressor(*, alpha=1.0, fit_intercept=True, max_iter=100, tol=0.0001, warm_start=False, verbose=0) [source]
Generalized Linear Model with a Poisson distribution. Read more in the User Guide. New in version 0.23. Parameters
alphafloat, def... | sklearn.modules.generated.sklearn.linear_model.poissonregressor |
fit(X, y, sample_weight=None) [source]
Fit a Generalized Linear Model. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Training data.
yarray-like of shape (n_samples,)
Target values.
sample_weightarray-like of shape (n_samples,), default=None
Sample weights. Returns
selfre... | sklearn.modules.generated.sklearn.linear_model.poissonregressor#sklearn.linear_model.PoissonRegressor.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.poissonregressor#sklearn.linear_model.PoissonRegressor.get_params |
predict(X) [source]
Predict using GLM with feature matrix X. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Samples. Returns
y_predarray of shape (n_samples,)
Returns predicted values. | sklearn.modules.generated.sklearn.linear_model.poissonregressor#sklearn.linear_model.PoissonRegressor.predict |
score(X, y, sample_weight=None) [source]
Compute D^2, the percentage of deviance explained. D^2 is a generalization of the coefficient of determination R^2. R^2 uses squared error and D^2 deviance. Note that those two are equal for family='normal'. D^2 is defined as \(D^2 = 1-\frac{D(y_{true},y_{pred})}{D_{null}}\), ... | sklearn.modules.generated.sklearn.linear_model.poissonregressor#sklearn.linear_model.PoissonRegressor.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.poissonregressor#sklearn.linear_model.PoissonRegressor.set_params |
class sklearn.linear_model.RANSACRegressor(base_estimator=None, *, min_samples=None, residual_threshold=None, is_data_valid=None, is_model_valid=None, max_trials=100, max_skips=inf, stop_n_inliers=inf, stop_score=inf, stop_probability=0.99, loss='absolute_loss', random_state=None) [source]
RANSAC (RANdom SAmple Conse... | sklearn.modules.generated.sklearn.linear_model.ransacregressor#sklearn.linear_model.RANSACRegressor |
sklearn.linear_model.RANSACRegressor
class sklearn.linear_model.RANSACRegressor(base_estimator=None, *, min_samples=None, residual_threshold=None, is_data_valid=None, is_model_valid=None, max_trials=100, max_skips=inf, stop_n_inliers=inf, stop_score=inf, stop_probability=0.99, loss='absolute_loss', random_state=None)... | sklearn.modules.generated.sklearn.linear_model.ransacregressor |
fit(X, y, sample_weight=None) [source]
Fit estimator using RANSAC algorithm. Parameters
Xarray-like or sparse matrix, shape [n_samples, n_features]
Training data.
yarray-like of shape (n_samples,) or (n_samples, n_targets)
Target values.
sample_weightarray-like of shape (n_samples,), default=None
Indivi... | sklearn.modules.generated.sklearn.linear_model.ransacregressor#sklearn.linear_model.RANSACRegressor.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.ransacregressor#sklearn.linear_model.RANSACRegressor.get_params |
predict(X) [source]
Predict using the estimated model. This is a wrapper for estimator_.predict(X). Parameters
Xnumpy array of shape [n_samples, n_features]
Returns
yarray, shape = [n_samples] or [n_samples, n_targets]
Returns predicted values. | sklearn.modules.generated.sklearn.linear_model.ransacregressor#sklearn.linear_model.RANSACRegressor.predict |
score(X, y) [source]
Returns the score of the prediction. This is a wrapper for estimator_.score(X, y). Parameters
Xnumpy array or sparse matrix of shape [n_samples, n_features]
Training data.
yarray, shape = [n_samples] or [n_samples, n_targets]
Target values. Returns
zfloat
Score of the prediction... | sklearn.modules.generated.sklearn.linear_model.ransacregressor#sklearn.linear_model.RANSACRegressor.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.ransacregressor#sklearn.linear_model.RANSACRegressor.set_params |
class sklearn.linear_model.Ridge(alpha=1.0, *, fit_intercept=True, normalize=False, copy_X=True, max_iter=None, tol=0.001, solver='auto', random_state=None) [source]
Linear least squares with l2 regularization. Minimizes the objective function: ||y - Xw||^2_2 + alpha * ||w||^2_2
This model solves a regression model ... | sklearn.modules.generated.sklearn.linear_model.ridge#sklearn.linear_model.Ridge |
sklearn.linear_model.Ridge
class sklearn.linear_model.Ridge(alpha=1.0, *, fit_intercept=True, normalize=False, copy_X=True, max_iter=None, tol=0.001, solver='auto', random_state=None) [source]
Linear least squares with l2 regularization. Minimizes the objective function: ||y - Xw||^2_2 + alpha * ||w||^2_2
This mod... | sklearn.modules.generated.sklearn.linear_model.ridge |
fit(X, y, sample_weight=None) [source]
Fit Ridge regression model. Parameters
X{ndarray, sparse matrix} of shape (n_samples, n_features)
Training data
yndarray of shape (n_samples,) or (n_samples, n_targets)
Target values
sample_weightfloat or ndarray of shape (n_samples,), default=None
Individual weigh... | sklearn.modules.generated.sklearn.linear_model.ridge#sklearn.linear_model.Ridge.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.ridge#sklearn.linear_model.Ridge.get_params |
predict(X) [source]
Predict using the linear model. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape (n_samples,)
Returns predicted values. | sklearn.modules.generated.sklearn.linear_model.ridge#sklearn.linear_model.Ridge.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.linear_model.ridge#sklearn.linear_model.Ridge.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.ridge#sklearn.linear_model.Ridge.set_params |
class sklearn.linear_model.RidgeClassifier(alpha=1.0, *, fit_intercept=True, normalize=False, copy_X=True, max_iter=None, tol=0.001, class_weight=None, solver='auto', random_state=None) [source]
Classifier using Ridge regression. This classifier first converts the target values into {-1, 1} and then treats the proble... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifier#sklearn.linear_model.RidgeClassifier |
sklearn.linear_model.RidgeClassifier
class sklearn.linear_model.RidgeClassifier(alpha=1.0, *, fit_intercept=True, normalize=False, copy_X=True, max_iter=None, tol=0.001, class_weight=None, solver='auto', random_state=None) [source]
Classifier using Ridge regression. This classifier first converts the target values ... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifier |
decision_function(X) [source]
Predict confidence scores for samples. The confidence score for a sample is proportional to the signed distance of that sample to the hyperplane. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
array, shape=(n_samples,) if n_classes == 2... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifier#sklearn.linear_model.RidgeClassifier.decision_function |
fit(X, y, sample_weight=None) [source]
Fit Ridge classifier model. Parameters
X{ndarray, sparse matrix} of shape (n_samples, n_features)
Training data.
yndarray of shape (n_samples,)
Target values.
sample_weightfloat or ndarray of shape (n_samples,), default=None
Individual weights for each sample. If g... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifier#sklearn.linear_model.RidgeClassifier.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.ridgeclassifier#sklearn.linear_model.RidgeClassifier.get_params |
predict(X) [source]
Predict class labels for samples in X. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape [n_samples]
Predicted class label per sample. | sklearn.modules.generated.sklearn.linear_model.ridgeclassifier#sklearn.linear_model.RidgeClassifier.predict |
score(X, y, sample_weight=None) [source]
Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters
Xarray-like of shape (n_samples, n_featur... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifier#sklearn.linear_model.RidgeClassifier.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifier#sklearn.linear_model.RidgeClassifier.set_params |
class sklearn.linear_model.RidgeClassifierCV(alphas=0.1, 1.0, 10.0, *, fit_intercept=True, normalize=False, scoring=None, cv=None, class_weight=None, store_cv_values=False) [source]
Ridge classifier with built-in cross-validation. See glossary entry for cross-validation estimator. By default, it performs Leave-One-Ou... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifiercv#sklearn.linear_model.RidgeClassifierCV |
sklearn.linear_model.RidgeClassifierCV
class sklearn.linear_model.RidgeClassifierCV(alphas=0.1, 1.0, 10.0, *, fit_intercept=True, normalize=False, scoring=None, cv=None, class_weight=None, store_cv_values=False) [source]
Ridge classifier with built-in cross-validation. See glossary entry for cross-validation estima... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifiercv |
decision_function(X) [source]
Predict confidence scores for samples. The confidence score for a sample is proportional to the signed distance of that sample to the hyperplane. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
array, shape=(n_samples,) if n_classes == 2... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifiercv#sklearn.linear_model.RidgeClassifierCV.decision_function |
fit(X, y, sample_weight=None) [source]
Fit Ridge classifier with cv. Parameters
Xndarray of shape (n_samples, n_features)
Training vectors, where n_samples is the number of samples and n_features is the number of features. When using GCV, will be cast to float64 if necessary.
yndarray of shape (n_samples,)
... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifiercv#sklearn.linear_model.RidgeClassifierCV.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.ridgeclassifiercv#sklearn.linear_model.RidgeClassifierCV.get_params |
predict(X) [source]
Predict class labels for samples in X. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape [n_samples]
Predicted class label per sample. | sklearn.modules.generated.sklearn.linear_model.ridgeclassifiercv#sklearn.linear_model.RidgeClassifierCV.predict |
score(X, y, sample_weight=None) [source]
Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters
Xarray-like of shape (n_samples, n_featur... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifiercv#sklearn.linear_model.RidgeClassifierCV.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.ridgeclassifiercv#sklearn.linear_model.RidgeClassifierCV.set_params |
class sklearn.linear_model.RidgeCV(alphas=0.1, 1.0, 10.0, *, fit_intercept=True, normalize=False, scoring=None, cv=None, gcv_mode=None, store_cv_values=False, alpha_per_target=False) [source]
Ridge regression with built-in cross-validation. See glossary entry for cross-validation estimator. By default, it performs ef... | sklearn.modules.generated.sklearn.linear_model.ridgecv#sklearn.linear_model.RidgeCV |
sklearn.linear_model.RidgeCV
class sklearn.linear_model.RidgeCV(alphas=0.1, 1.0, 10.0, *, fit_intercept=True, normalize=False, scoring=None, cv=None, gcv_mode=None, store_cv_values=False, alpha_per_target=False) [source]
Ridge regression with built-in cross-validation. See glossary entry for cross-validation estima... | sklearn.modules.generated.sklearn.linear_model.ridgecv |
fit(X, y, sample_weight=None) [source]
Fit Ridge regression model with cv. Parameters
Xndarray of shape (n_samples, n_features)
Training data. If using GCV, will be cast to float64 if necessary.
yndarray of shape (n_samples,) or (n_samples, n_targets)
Target values. Will be cast to X’s dtype if necessary. ... | sklearn.modules.generated.sklearn.linear_model.ridgecv#sklearn.linear_model.RidgeCV.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.linear_model.ridgecv#sklearn.linear_model.RidgeCV.get_params |
predict(X) [source]
Predict using the linear model. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
Carray, shape (n_samples,)
Returns predicted values. | sklearn.modules.generated.sklearn.linear_model.ridgecv#sklearn.linear_model.RidgeCV.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.linear_model.ridgecv#sklearn.linear_model.RidgeCV.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.linear_model.ridgecv#sklearn.linear_model.RidgeCV.set_params |
sklearn.linear_model.ridge_regression(X, y, alpha, *, sample_weight=None, solver='auto', max_iter=None, tol=0.001, verbose=0, random_state=None, return_n_iter=False, return_intercept=False, check_input=True) [source]
Solve the ridge equation by the method of normal equations. Read more in the User Guide. Parameters ... | sklearn.modules.generated.sklearn.linear_model.ridge_regression#sklearn.linear_model.ridge_regression |
class sklearn.linear_model.SGDClassifier(loss='hinge', *, penalty='l2', alpha=0.0001, l1_ratio=0.15, fit_intercept=True, max_iter=1000, tol=0.001, shuffle=True, verbose=0, epsilon=0.1, n_jobs=None, random_state=None, learning_rate='optimal', eta0=0.0, power_t=0.5, early_stopping=False, validation_fraction=0.1, n_iter_n... | sklearn.modules.generated.sklearn.linear_model.sgdclassifier#sklearn.linear_model.SGDClassifier |
sklearn.linear_model.SGDClassifier
class sklearn.linear_model.SGDClassifier(loss='hinge', *, penalty='l2', alpha=0.0001, l1_ratio=0.15, fit_intercept=True, max_iter=1000, tol=0.001, shuffle=True, verbose=0, epsilon=0.1, n_jobs=None, random_state=None, learning_rate='optimal', eta0=0.0, power_t=0.5, early_stopping=Fal... | sklearn.modules.generated.sklearn.linear_model.sgdclassifier |
decision_function(X) [source]
Predict confidence scores for samples. The confidence score for a sample is proportional to the signed distance of that sample to the hyperplane. Parameters
Xarray-like or sparse matrix, shape (n_samples, n_features)
Samples. Returns
array, shape=(n_samples,) if n_classes == 2... | sklearn.modules.generated.sklearn.linear_model.sgdclassifier#sklearn.linear_model.SGDClassifier.decision_function |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.