doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
class sklearn.linear_model.LarsCV(*, fit_intercept=True, verbose=False, max_iter=500, normalize=True, precompute='auto', cv=None, max_n_alphas=1000, n_jobs=None, eps=2.220446049250313e-16, copy_X=True) [source] Cross-validated Least Angle Regression model. See glossary entry for cross-validation estimator. Read more ...
sklearn.modules.generated.sklearn.linear_model.larscv#sklearn.linear_model.LarsCV
sklearn.linear_model.LarsCV class sklearn.linear_model.LarsCV(*, fit_intercept=True, verbose=False, max_iter=500, normalize=True, precompute='auto', cv=None, max_n_alphas=1000, n_jobs=None, eps=2.220446049250313e-16, copy_X=True) [source] Cross-validated Least Angle Regression model. See glossary entry for cross-va...
sklearn.modules.generated.sklearn.linear_model.larscv
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. Returns selfobject returns an instance of self.
sklearn.modules.generated.sklearn.linear_model.larscv#sklearn.linear_model.LarsCV.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.larscv#sklearn.linear_model.LarsCV.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.larscv#sklearn.linear_model.LarsCV.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.larscv#sklearn.linear_model.LarsCV.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.larscv#sklearn.linear_model.LarsCV.set_params
sklearn.linear_model.lars_path(X, y, Xy=None, *, Gram=None, max_iter=500, alpha_min=0, method='lar', copy_X=True, eps=2.220446049250313e-16, copy_Gram=True, verbose=0, return_path=True, return_n_iter=False, positive=False) [source] Compute Least Angle Regression or Lasso path using LARS algorithm [1] The optimization...
sklearn.modules.generated.sklearn.linear_model.lars_path#sklearn.linear_model.lars_path
sklearn.linear_model.lars_path_gram(Xy, Gram, *, n_samples, max_iter=500, alpha_min=0, method='lar', copy_X=True, eps=2.220446049250313e-16, copy_Gram=True, verbose=0, return_path=True, return_n_iter=False, positive=False) [source] lars_path in the sufficient stats mode [1] The optimization objective for the case met...
sklearn.modules.generated.sklearn.linear_model.lars_path_gram#sklearn.linear_model.lars_path_gram
class sklearn.linear_model.Lasso(alpha=1.0, *, fit_intercept=True, normalize=False, precompute=False, copy_X=True, max_iter=1000, tol=0.0001, warm_start=False, positive=False, random_state=None, selection='cyclic') [source] Linear Model trained with L1 prior as regularizer (aka the Lasso) The optimization objective f...
sklearn.modules.generated.sklearn.linear_model.lasso#sklearn.linear_model.Lasso
sklearn.linear_model.Lasso class sklearn.linear_model.Lasso(alpha=1.0, *, fit_intercept=True, normalize=False, precompute=False, copy_X=True, max_iter=1000, tol=0.0001, warm_start=False, positive=False, random_state=None, selection='cyclic') [source] Linear Model trained with L1 prior as regularizer (aka the Lasso)...
sklearn.modules.generated.sklearn.linear_model.lasso
fit(X, y, sample_weight=None, check_input=True) [source] Fit model with coordinate descent. Parameters X{ndarray, sparse matrix} of (n_samples, n_features) Data. y{ndarray, sparse matrix} of shape (n_samples,) or (n_samples, n_targets) Target. Will be cast to X’s dtype if necessary. sample_weightfloat or ...
sklearn.modules.generated.sklearn.linear_model.lasso#sklearn.linear_model.Lasso.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.lasso#sklearn.linear_model.Lasso.get_params
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.lasso#sklearn.linear_model.Lasso.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.lasso#sklearn.linear_model.Lasso.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.lasso#sklearn.linear_model.Lasso.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.lasso#sklearn.linear_model.Lasso.set_params
property sparse_coef_ Sparse representation of the fitted coef_.
sklearn.modules.generated.sklearn.linear_model.lasso#sklearn.linear_model.Lasso.sparse_coef_
class sklearn.linear_model.LassoCV(*, eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, normalize=False, precompute='auto', max_iter=1000, tol=0.0001, copy_X=True, cv=None, verbose=False, n_jobs=None, positive=False, random_state=None, selection='cyclic') [source] Lasso linear model with iterative fitting alo...
sklearn.modules.generated.sklearn.linear_model.lassocv#sklearn.linear_model.LassoCV
sklearn.linear_model.LassoCV class sklearn.linear_model.LassoCV(*, eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, normalize=False, precompute='auto', max_iter=1000, tol=0.0001, copy_X=True, cv=None, verbose=False, n_jobs=None, positive=False, random_state=None, selection='cyclic') [source] Lasso linear m...
sklearn.modules.generated.sklearn.linear_model.lassocv
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.lassocv#sklearn.linear_model.LassoCV.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.lassocv#sklearn.linear_model.LassoCV.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.lassocv#sklearn.linear_model.LassoCV.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.lassocv#sklearn.linear_model.LassoCV.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.lassocv#sklearn.linear_model.LassoCV.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.lassocv#sklearn.linear_model.LassoCV.set_params
class sklearn.linear_model.LassoLars(alpha=1.0, *, fit_intercept=True, verbose=False, normalize=True, precompute='auto', max_iter=500, eps=2.220446049250313e-16, copy_X=True, fit_path=True, positive=False, jitter=None, random_state=None) [source] Lasso model fit with Least Angle Regression a.k.a. Lars It is a Linear ...
sklearn.modules.generated.sklearn.linear_model.lassolars#sklearn.linear_model.LassoLars
sklearn.linear_model.LassoLars class sklearn.linear_model.LassoLars(alpha=1.0, *, fit_intercept=True, verbose=False, normalize=True, precompute='auto', max_iter=500, eps=2.220446049250313e-16, copy_X=True, fit_path=True, positive=False, jitter=None, random_state=None) [source] Lasso model fit with Least Angle Regre...
sklearn.modules.generated.sklearn.linear_model.lassolars
fit(X, y, Xy=None) [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. Xyarray-like of shape (n_samples,) or (n_samples, n_targets), default=None Xy = np.dot(...
sklearn.modules.generated.sklearn.linear_model.lassolars#sklearn.linear_model.LassoLars.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.lassolars#sklearn.linear_model.LassoLars.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.lassolars#sklearn.linear_model.LassoLars.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.lassolars#sklearn.linear_model.LassoLars.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.lassolars#sklearn.linear_model.LassoLars.set_params
class sklearn.linear_model.LassoLarsCV(*, fit_intercept=True, verbose=False, max_iter=500, normalize=True, precompute='auto', cv=None, max_n_alphas=1000, n_jobs=None, eps=2.220446049250313e-16, copy_X=True, positive=False) [source] Cross-validated Lasso, using the LARS algorithm. See glossary entry for cross-validati...
sklearn.modules.generated.sklearn.linear_model.lassolarscv#sklearn.linear_model.LassoLarsCV
sklearn.linear_model.LassoLarsCV class sklearn.linear_model.LassoLarsCV(*, fit_intercept=True, verbose=False, max_iter=500, normalize=True, precompute='auto', cv=None, max_n_alphas=1000, n_jobs=None, eps=2.220446049250313e-16, copy_X=True, positive=False) [source] Cross-validated Lasso, using the LARS algorithm. Se...
sklearn.modules.generated.sklearn.linear_model.lassolarscv
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. Returns selfobject returns an instance of self.
sklearn.modules.generated.sklearn.linear_model.lassolarscv#sklearn.linear_model.LassoLarsCV.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.lassolarscv#sklearn.linear_model.LassoLarsCV.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.lassolarscv#sklearn.linear_model.LassoLarsCV.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.lassolarscv#sklearn.linear_model.LassoLarsCV.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.lassolarscv#sklearn.linear_model.LassoLarsCV.set_params
class sklearn.linear_model.LassoLarsIC(criterion='aic', *, fit_intercept=True, verbose=False, normalize=True, precompute='auto', max_iter=500, eps=2.220446049250313e-16, copy_X=True, positive=False) [source] Lasso model fit with Lars using BIC or AIC for model selection The optimization objective for Lasso is: (1 / (...
sklearn.modules.generated.sklearn.linear_model.lassolarsic#sklearn.linear_model.LassoLarsIC
sklearn.linear_model.LassoLarsIC class sklearn.linear_model.LassoLarsIC(criterion='aic', *, fit_intercept=True, verbose=False, normalize=True, precompute='auto', max_iter=500, eps=2.220446049250313e-16, copy_X=True, positive=False) [source] Lasso model fit with Lars using BIC or AIC for model selection The optimiza...
sklearn.modules.generated.sklearn.linear_model.lassolarsic
fit(X, y, copy_X=None) [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 copy_Xbool, default=None If provided, this parameter will override the...
sklearn.modules.generated.sklearn.linear_model.lassolarsic#sklearn.linear_model.LassoLarsIC.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.lassolarsic#sklearn.linear_model.LassoLarsIC.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.lassolarsic#sklearn.linear_model.LassoLarsIC.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.lassolarsic#sklearn.linear_model.LassoLarsIC.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.lassolarsic#sklearn.linear_model.LassoLarsIC.set_params
sklearn.linear_model.lasso_path(X, y, *, eps=0.001, n_alphas=100, alphas=None, precompute='auto', Xy=None, copy_X=True, coef_init=None, verbose=False, return_n_iter=False, positive=False, **params) [source] Compute Lasso path with coordinate descent The Lasso optimization function varies for mono and multi-outputs. F...
sklearn.modules.generated.sklearn.linear_model.lasso_path#sklearn.linear_model.lasso_path
class sklearn.linear_model.LinearRegression(*, fit_intercept=True, normalize=False, copy_X=True, n_jobs=None, positive=False) [source] Ordinary least squares Linear Regression. LinearRegression fits a linear model with coefficients w = (w1, …, wp) to minimize the residual sum of squares between the observed targets i...
sklearn.modules.generated.sklearn.linear_model.linearregression#sklearn.linear_model.LinearRegression
sklearn.linear_model.LinearRegression class sklearn.linear_model.LinearRegression(*, fit_intercept=True, normalize=False, copy_X=True, n_jobs=None, positive=False) [source] Ordinary least squares Linear Regression. LinearRegression fits a linear model with coefficients w = (w1, …, wp) to minimize the residual sum o...
sklearn.modules.generated.sklearn.linear_model.linearregression
fit(X, y, sample_weight=None) [source] Fit linear model. Parameters X{array-like, sparse matrix} 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 sample_weightarray-like of shape (n_samples,), d...
sklearn.modules.generated.sklearn.linear_model.linearregression#sklearn.linear_model.LinearRegression.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.linearregression#sklearn.linear_model.LinearRegression.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.linearregression#sklearn.linear_model.LinearRegression.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.linearregression#sklearn.linear_model.LinearRegression.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.linearregression#sklearn.linear_model.LinearRegression.set_params
class sklearn.linear_model.LogisticRegression(penalty='l2', *, dual=False, tol=0.0001, C=1.0, fit_intercept=True, intercept_scaling=1, class_weight=None, random_state=None, solver='lbfgs', max_iter=100, multi_class='auto', verbose=0, warm_start=False, n_jobs=None, l1_ratio=None) [source] Logistic Regression (aka logi...
sklearn.modules.generated.sklearn.linear_model.logisticregression#sklearn.linear_model.LogisticRegression
sklearn.linear_model.LogisticRegression class sklearn.linear_model.LogisticRegression(penalty='l2', *, dual=False, tol=0.0001, C=1.0, fit_intercept=True, intercept_scaling=1, class_weight=None, random_state=None, solver='lbfgs', max_iter=100, multi_class='auto', verbose=0, warm_start=False, n_jobs=None, l1_ratio=None...
sklearn.modules.generated.sklearn.linear_model.logisticregression
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.logisticregression#sklearn.linear_model.LogisticRegression.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.logisticregression#sklearn.linear_model.LogisticRegression.densify
fit(X, y, sample_weight=None) [source] Fit the model according to the given training data. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples is the number of samples and n_features is the number of features. yarray-like of shape (n_samples,) Target vec...
sklearn.modules.generated.sklearn.linear_model.logisticregression#sklearn.linear_model.LogisticRegression.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.logisticregression#sklearn.linear_model.LogisticRegression.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.logisticregression#sklearn.linear_model.LogisticRegression.predict
predict_log_proba(X) [source] Predict logarithm of probability estimates. The returned estimates for all classes are ordered by the label of classes. Parameters Xarray-like of shape (n_samples, n_features) Vector to be scored, where n_samples is the number of samples and n_features is the number of features. ...
sklearn.modules.generated.sklearn.linear_model.logisticregression#sklearn.linear_model.LogisticRegression.predict_log_proba
predict_proba(X) [source] Probability estimates. The returned estimates for all classes are ordered by the label of classes. For a multi_class problem, if multi_class is set to be “multinomial” the softmax function is used to find the predicted probability of each class. Else use a one-vs-rest approach, i.e calculate...
sklearn.modules.generated.sklearn.linear_model.logisticregression#sklearn.linear_model.LogisticRegression.predict_proba
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.logisticregression#sklearn.linear_model.LogisticRegression.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.logisticregression#sklearn.linear_model.LogisticRegression.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.logisticregression#sklearn.linear_model.LogisticRegression.sparsify
class sklearn.linear_model.LogisticRegressionCV(*, Cs=10, fit_intercept=True, cv=None, dual=False, penalty='l2', scoring=None, solver='lbfgs', tol=0.0001, max_iter=100, class_weight=None, n_jobs=None, verbose=0, refit=True, intercept_scaling=1.0, multi_class='auto', random_state=None, l1_ratios=None) [source] Logisti...
sklearn.modules.generated.sklearn.linear_model.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV
sklearn.linear_model.LogisticRegressionCV class sklearn.linear_model.LogisticRegressionCV(*, Cs=10, fit_intercept=True, cv=None, dual=False, penalty='l2', scoring=None, solver='lbfgs', tol=0.0001, max_iter=100, class_weight=None, n_jobs=None, verbose=0, refit=True, intercept_scaling=1.0, multi_class='auto', random_st...
sklearn.modules.generated.sklearn.linear_model.logisticregressioncv
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.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.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.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.densify
fit(X, y, sample_weight=None) [source] Fit the model according to the given training data. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where n_samples is the number of samples and n_features is the number of features. yarray-like of shape (n_samples,) Target vec...
sklearn.modules.generated.sklearn.linear_model.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.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.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.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.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.predict
predict_log_proba(X) [source] Predict logarithm of probability estimates. The returned estimates for all classes are ordered by the label of classes. Parameters Xarray-like of shape (n_samples, n_features) Vector to be scored, where n_samples is the number of samples and n_features is the number of features. ...
sklearn.modules.generated.sklearn.linear_model.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.predict_log_proba
predict_proba(X) [source] Probability estimates. The returned estimates for all classes are ordered by the label of classes. For a multi_class problem, if multi_class is set to be “multinomial” the softmax function is used to find the predicted probability of each class. Else use a one-vs-rest approach, i.e calculate...
sklearn.modules.generated.sklearn.linear_model.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.predict_proba
score(X, y, sample_weight=None) [source] Returns the score using the scoring option on the given test data and labels. Parameters Xarray-like of shape (n_samples, n_features) Test samples. yarray-like of shape (n_samples,) True labels for X. sample_weightarray-like of shape (n_samples,), default=None Sa...
sklearn.modules.generated.sklearn.linear_model.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.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.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.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.logisticregressioncv#sklearn.linear_model.LogisticRegressionCV.sparsify
class sklearn.linear_model.MultiTaskElasticNet(alpha=1.0, *, l1_ratio=0.5, fit_intercept=True, normalize=False, copy_X=True, max_iter=1000, tol=0.0001, warm_start=False, random_state=None, selection='cyclic') [source] Multi-task ElasticNet model trained with L1/L2 mixed-norm as regularizer. The optimization objective...
sklearn.modules.generated.sklearn.linear_model.multitaskelasticnet#sklearn.linear_model.MultiTaskElasticNet
sklearn.linear_model.MultiTaskElasticNet class sklearn.linear_model.MultiTaskElasticNet(alpha=1.0, *, l1_ratio=0.5, fit_intercept=True, normalize=False, copy_X=True, max_iter=1000, tol=0.0001, warm_start=False, random_state=None, selection='cyclic') [source] Multi-task ElasticNet model trained with L1/L2 mixed-norm...
sklearn.modules.generated.sklearn.linear_model.multitaskelasticnet
fit(X, y) [source] Fit MultiTaskElasticNet model with coordinate descent Parameters Xndarray of shape (n_samples, n_features) Data. yndarray of shape (n_samples, n_tasks) Target. Will be cast to X’s dtype if necessary. Notes Coordinate descent is an algorithm that considers each column of data at a time...
sklearn.modules.generated.sklearn.linear_model.multitaskelasticnet#sklearn.linear_model.MultiTaskElasticNet.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.multitaskelasticnet#sklearn.linear_model.MultiTaskElasticNet.get_params
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.multitaskelasticnet#sklearn.linear_model.MultiTaskElasticNet.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.multitaskelasticnet#sklearn.linear_model.MultiTaskElasticNet.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.multitaskelasticnet#sklearn.linear_model.MultiTaskElasticNet.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.multitaskelasticnet#sklearn.linear_model.MultiTaskElasticNet.set_params
property sparse_coef_ Sparse representation of the fitted coef_.
sklearn.modules.generated.sklearn.linear_model.multitaskelasticnet#sklearn.linear_model.MultiTaskElasticNet.sparse_coef_
class sklearn.linear_model.MultiTaskElasticNetCV(*, l1_ratio=0.5, eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, normalize=False, max_iter=1000, tol=0.0001, cv=None, copy_X=True, verbose=0, n_jobs=None, random_state=None, selection='cyclic') [source] Multi-task L1/L2 ElasticNet with built-in cross-validati...
sklearn.modules.generated.sklearn.linear_model.multitaskelasticnetcv#sklearn.linear_model.MultiTaskElasticNetCV
sklearn.linear_model.MultiTaskElasticNetCV class sklearn.linear_model.MultiTaskElasticNetCV(*, l1_ratio=0.5, eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, normalize=False, max_iter=1000, tol=0.0001, cv=None, copy_X=True, verbose=0, n_jobs=None, random_state=None, selection='cyclic') [source] Multi-task ...
sklearn.modules.generated.sklearn.linear_model.multitaskelasticnetcv
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.multitaskelasticnetcv#sklearn.linear_model.MultiTaskElasticNetCV.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.multitaskelasticnetcv#sklearn.linear_model.MultiTaskElasticNetCV.get_params
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.multitaskelasticnetcv#sklearn.linear_model.MultiTaskElasticNetCV.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.multitaskelasticnetcv#sklearn.linear_model.MultiTaskElasticNetCV.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.multitaskelasticnetcv#sklearn.linear_model.MultiTaskElasticNetCV.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.multitaskelasticnetcv#sklearn.linear_model.MultiTaskElasticNetCV.set_params
class sklearn.linear_model.MultiTaskLasso(alpha=1.0, *, fit_intercept=True, normalize=False, copy_X=True, max_iter=1000, tol=0.0001, warm_start=False, random_state=None, selection='cyclic') [source] Multi-task Lasso model trained with L1/L2 mixed-norm as regularizer. The optimization objective for Lasso is: (1 / (2 *...
sklearn.modules.generated.sklearn.linear_model.multitasklasso#sklearn.linear_model.MultiTaskLasso
sklearn.linear_model.MultiTaskLasso class sklearn.linear_model.MultiTaskLasso(alpha=1.0, *, fit_intercept=True, normalize=False, copy_X=True, max_iter=1000, tol=0.0001, warm_start=False, random_state=None, selection='cyclic') [source] Multi-task Lasso model trained with L1/L2 mixed-norm as regularizer. The optimiza...
sklearn.modules.generated.sklearn.linear_model.multitasklasso
fit(X, y) [source] Fit MultiTaskElasticNet model with coordinate descent Parameters Xndarray of shape (n_samples, n_features) Data. yndarray of shape (n_samples, n_tasks) Target. Will be cast to X’s dtype if necessary. Notes Coordinate descent is an algorithm that considers each column of data at a time...
sklearn.modules.generated.sklearn.linear_model.multitasklasso#sklearn.linear_model.MultiTaskLasso.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.multitasklasso#sklearn.linear_model.MultiTaskLasso.get_params