doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
predict(T) [source]
Predict new data by linear interpolation. Parameters
Tarray-like of shape (n_samples,) or (n_samples, 1)
Data to transform. Returns
y_predndarray of shape (n_samples,)
Transformed data. | sklearn.modules.generated.sklearn.isotonic.isotonicregression#sklearn.isotonic.IsotonicRegression.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.isotonic.isotonicregression#sklearn.isotonic.IsotonicRegression.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.isotonic.isotonicregression#sklearn.isotonic.IsotonicRegression.set_params |
transform(T) [source]
Transform new data by linear interpolation Parameters
Tarray-like of shape (n_samples,) or (n_samples, 1)
Data to transform. Changed in version 0.24: Also accepts 2d array with 1 feature. Returns
y_predndarray of shape (n_samples,)
The transformed data | sklearn.modules.generated.sklearn.isotonic.isotonicregression#sklearn.isotonic.IsotonicRegression.transform |
sklearn.isotonic.isotonic_regression(y, *, sample_weight=None, y_min=None, y_max=None, increasing=True) [source]
Solve the isotonic regression model. Read more in the User Guide. Parameters
yarray-like of shape (n_samples,)
The data.
sample_weightarray-like of shape (n_samples,), default=None
Weights on eac... | sklearn.modules.generated.sklearn.isotonic.isotonic_regression#sklearn.isotonic.isotonic_regression |
class sklearn.kernel_approximation.AdditiveChi2Sampler(*, sample_steps=2, sample_interval=None) [source]
Approximate feature map for additive chi2 kernel. Uses sampling the fourier transform of the kernel characteristic at regular intervals. Since the kernel that is to be approximated is additive, the components of t... | sklearn.modules.generated.sklearn.kernel_approximation.additivechi2sampler#sklearn.kernel_approximation.AdditiveChi2Sampler |
sklearn.kernel_approximation.AdditiveChi2Sampler
class sklearn.kernel_approximation.AdditiveChi2Sampler(*, sample_steps=2, sample_interval=None) [source]
Approximate feature map for additive chi2 kernel. Uses sampling the fourier transform of the kernel characteristic at regular intervals. Since the kernel that is ... | sklearn.modules.generated.sklearn.kernel_approximation.additivechi2sampler |
fit(X, y=None) [source]
Set the parameters Parameters
Xarray-like, shape (n_samples, n_features)
Training data, where n_samples in the number of samples and n_features is the number of features. Returns
selfobject
Returns the transformer. | sklearn.modules.generated.sklearn.kernel_approximation.additivechi2sampler#sklearn.kernel_approximation.AdditiveChi2Sampler.fit |
fit_transform(X, y=None, **fit_params) [source]
Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters
Xarray-like of shape (n_samples, n_features)
Input samples.
yarray-like of shape (n_samples,) or (n_samples, n_outp... | sklearn.modules.generated.sklearn.kernel_approximation.additivechi2sampler#sklearn.kernel_approximation.AdditiveChi2Sampler.fit_transform |
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.kernel_approximation.additivechi2sampler#sklearn.kernel_approximation.AdditiveChi2Sampler.get_params |
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.kernel_approximation.additivechi2sampler#sklearn.kernel_approximation.AdditiveChi2Sampler.set_params |
transform(X) [source]
Apply approximate feature map to X. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Returns
X_new{ndarray, sparse matrix}, shape = (n_samples, n_features * (2*sample_steps + 1))
Whether the return value is an array of sparse matrix depends on the type of the ... | sklearn.modules.generated.sklearn.kernel_approximation.additivechi2sampler#sklearn.kernel_approximation.AdditiveChi2Sampler.transform |
class sklearn.kernel_approximation.Nystroem(kernel='rbf', *, gamma=None, coef0=None, degree=None, kernel_params=None, n_components=100, random_state=None, n_jobs=None) [source]
Approximate a kernel map using a subset of the training data. Constructs an approximate feature map for an arbitrary kernel using a subset of... | sklearn.modules.generated.sklearn.kernel_approximation.nystroem#sklearn.kernel_approximation.Nystroem |
sklearn.kernel_approximation.Nystroem
class sklearn.kernel_approximation.Nystroem(kernel='rbf', *, gamma=None, coef0=None, degree=None, kernel_params=None, n_components=100, random_state=None, n_jobs=None) [source]
Approximate a kernel map using a subset of the training data. Constructs an approximate feature map f... | sklearn.modules.generated.sklearn.kernel_approximation.nystroem |
fit(X, y=None) [source]
Fit estimator to data. Samples a subset of training points, computes kernel on these and computes normalization matrix. Parameters
Xarray-like of shape (n_samples, n_features)
Training data. | sklearn.modules.generated.sklearn.kernel_approximation.nystroem#sklearn.kernel_approximation.Nystroem.fit |
fit_transform(X, y=None, **fit_params) [source]
Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters
Xarray-like of shape (n_samples, n_features)
Input samples.
yarray-like of shape (n_samples,) or (n_samples, n_outp... | sklearn.modules.generated.sklearn.kernel_approximation.nystroem#sklearn.kernel_approximation.Nystroem.fit_transform |
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.kernel_approximation.nystroem#sklearn.kernel_approximation.Nystroem.get_params |
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.kernel_approximation.nystroem#sklearn.kernel_approximation.Nystroem.set_params |
transform(X) [source]
Apply feature map to X. Computes an approximate feature map using the kernel between some training points and X. Parameters
Xarray-like of shape (n_samples, n_features)
Data to transform. Returns
X_transformedndarray of shape (n_samples, n_components)
Transformed data. | sklearn.modules.generated.sklearn.kernel_approximation.nystroem#sklearn.kernel_approximation.Nystroem.transform |
class sklearn.kernel_approximation.PolynomialCountSketch(*, gamma=1.0, degree=2, coef0=0, n_components=100, random_state=None) [source]
Polynomial kernel approximation via Tensor Sketch. Implements Tensor Sketch, which approximates the feature map of the polynomial kernel: K(X, Y) = (gamma * <X, Y> + coef0)^degree
b... | sklearn.modules.generated.sklearn.kernel_approximation.polynomialcountsketch#sklearn.kernel_approximation.PolynomialCountSketch |
sklearn.kernel_approximation.PolynomialCountSketch
class sklearn.kernel_approximation.PolynomialCountSketch(*, gamma=1.0, degree=2, coef0=0, n_components=100, random_state=None) [source]
Polynomial kernel approximation via Tensor Sketch. Implements Tensor Sketch, which approximates the feature map of the polynomial... | sklearn.modules.generated.sklearn.kernel_approximation.polynomialcountsketch |
fit(X, y=None) [source]
Fit the model with X. Initializes the internal variables. The method needs no information about the distribution of data, so we only care about n_features in X. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Training data, where n_samples in the number of sample... | sklearn.modules.generated.sklearn.kernel_approximation.polynomialcountsketch#sklearn.kernel_approximation.PolynomialCountSketch.fit |
fit_transform(X, y=None, **fit_params) [source]
Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters
Xarray-like of shape (n_samples, n_features)
Input samples.
yarray-like of shape (n_samples,) or (n_samples, n_outp... | sklearn.modules.generated.sklearn.kernel_approximation.polynomialcountsketch#sklearn.kernel_approximation.PolynomialCountSketch.fit_transform |
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.kernel_approximation.polynomialcountsketch#sklearn.kernel_approximation.PolynomialCountSketch.get_params |
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.kernel_approximation.polynomialcountsketch#sklearn.kernel_approximation.PolynomialCountSketch.set_params |
transform(X) [source]
Generate the feature map approximation for X. Parameters
X{array-like}, shape (n_samples, n_features)
New data, where n_samples in the number of samples and n_features is the number of features. Returns
X_newarray-like, shape (n_samples, n_components) | sklearn.modules.generated.sklearn.kernel_approximation.polynomialcountsketch#sklearn.kernel_approximation.PolynomialCountSketch.transform |
class sklearn.kernel_approximation.RBFSampler(*, gamma=1.0, n_components=100, random_state=None) [source]
Approximates feature map of an RBF kernel by Monte Carlo approximation of its Fourier transform. It implements a variant of Random Kitchen Sinks.[1] Read more in the User Guide. Parameters
gammafloat, default... | sklearn.modules.generated.sklearn.kernel_approximation.rbfsampler#sklearn.kernel_approximation.RBFSampler |
sklearn.kernel_approximation.RBFSampler
class sklearn.kernel_approximation.RBFSampler(*, gamma=1.0, n_components=100, random_state=None) [source]
Approximates feature map of an RBF kernel by Monte Carlo approximation of its Fourier transform. It implements a variant of Random Kitchen Sinks.[1] Read more in the User... | sklearn.modules.generated.sklearn.kernel_approximation.rbfsampler |
fit(X, y=None) [source]
Fit the model with X. Samples random projection according to n_features. Parameters
X{array-like, sparse matrix}, shape (n_samples, n_features)
Training data, where n_samples in the number of samples and n_features is the number of features. Returns
selfobject
Returns the transfo... | sklearn.modules.generated.sklearn.kernel_approximation.rbfsampler#sklearn.kernel_approximation.RBFSampler.fit |
fit_transform(X, y=None, **fit_params) [source]
Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters
Xarray-like of shape (n_samples, n_features)
Input samples.
yarray-like of shape (n_samples,) or (n_samples, n_outp... | sklearn.modules.generated.sklearn.kernel_approximation.rbfsampler#sklearn.kernel_approximation.RBFSampler.fit_transform |
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.kernel_approximation.rbfsampler#sklearn.kernel_approximation.RBFSampler.get_params |
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.kernel_approximation.rbfsampler#sklearn.kernel_approximation.RBFSampler.set_params |
transform(X) [source]
Apply the approximate feature map to X. Parameters
X{array-like, sparse matrix}, shape (n_samples, n_features)
New data, where n_samples in the number of samples and n_features is the number of features. Returns
X_newarray-like, shape (n_samples, n_components) | sklearn.modules.generated.sklearn.kernel_approximation.rbfsampler#sklearn.kernel_approximation.RBFSampler.transform |
class sklearn.kernel_approximation.SkewedChi2Sampler(*, skewedness=1.0, n_components=100, random_state=None) [source]
Approximates feature map of the “skewed chi-squared” kernel by Monte Carlo approximation of its Fourier transform. Read more in the User Guide. Parameters
skewednessfloat, default=1.0
“skewednes... | sklearn.modules.generated.sklearn.kernel_approximation.skewedchi2sampler#sklearn.kernel_approximation.SkewedChi2Sampler |
sklearn.kernel_approximation.SkewedChi2Sampler
class sklearn.kernel_approximation.SkewedChi2Sampler(*, skewedness=1.0, n_components=100, random_state=None) [source]
Approximates feature map of the “skewed chi-squared” kernel by Monte Carlo approximation of its Fourier transform. Read more in the User Guide. Parame... | sklearn.modules.generated.sklearn.kernel_approximation.skewedchi2sampler |
fit(X, y=None) [source]
Fit the model with X. Samples random projection according to n_features. Parameters
Xarray-like, shape (n_samples, n_features)
Training data, where n_samples in the number of samples and n_features is the number of features. Returns
selfobject
Returns the transformer. | sklearn.modules.generated.sklearn.kernel_approximation.skewedchi2sampler#sklearn.kernel_approximation.SkewedChi2Sampler.fit |
fit_transform(X, y=None, **fit_params) [source]
Fit to data, then transform it. Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X. Parameters
Xarray-like of shape (n_samples, n_features)
Input samples.
yarray-like of shape (n_samples,) or (n_samples, n_outp... | sklearn.modules.generated.sklearn.kernel_approximation.skewedchi2sampler#sklearn.kernel_approximation.SkewedChi2Sampler.fit_transform |
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.kernel_approximation.skewedchi2sampler#sklearn.kernel_approximation.SkewedChi2Sampler.get_params |
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.kernel_approximation.skewedchi2sampler#sklearn.kernel_approximation.SkewedChi2Sampler.set_params |
transform(X) [source]
Apply the approximate feature map to X. Parameters
Xarray-like, shape (n_samples, n_features)
New data, where n_samples in the number of samples and n_features is the number of features. All values of X must be strictly greater than “-skewedness”. Returns
X_newarray-like, shape (n_sa... | sklearn.modules.generated.sklearn.kernel_approximation.skewedchi2sampler#sklearn.kernel_approximation.SkewedChi2Sampler.transform |
class sklearn.kernel_ridge.KernelRidge(alpha=1, *, kernel='linear', gamma=None, degree=3, coef0=1, kernel_params=None) [source]
Kernel ridge regression. Kernel ridge regression (KRR) combines ridge regression (linear least squares with l2-norm regularization) with the kernel trick. It thus learns a linear function in... | sklearn.modules.generated.sklearn.kernel_ridge.kernelridge#sklearn.kernel_ridge.KernelRidge |
sklearn.kernel_ridge.KernelRidge
class sklearn.kernel_ridge.KernelRidge(alpha=1, *, kernel='linear', gamma=None, degree=3, coef0=1, kernel_params=None) [source]
Kernel ridge regression. Kernel ridge regression (KRR) combines ridge regression (linear least squares with l2-norm regularization) with the kernel trick. ... | sklearn.modules.generated.sklearn.kernel_ridge.kernelridge |
fit(X, y, sample_weight=None) [source]
Fit Kernel Ridge regression model Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Training data. If kernel == “precomputed” this is instead a precomputed kernel matrix, of shape (n_samples, n_samples).
yarray-like of shape (n_samples,) or (n_samp... | sklearn.modules.generated.sklearn.kernel_ridge.kernelridge#sklearn.kernel_ridge.KernelRidge.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.kernel_ridge.kernelridge#sklearn.kernel_ridge.KernelRidge.get_params |
predict(X) [source]
Predict using the kernel ridge model Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Samples. If kernel == “precomputed” this is instead a precomputed kernel matrix, shape = [n_samples, n_samples_fitted], where n_samples_fitted is the number of samples used in the fi... | sklearn.modules.generated.sklearn.kernel_ridge.kernelridge#sklearn.kernel_ridge.KernelRidge.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.kernel_ridge.kernelridge#sklearn.kernel_ridge.KernelRidge.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.kernel_ridge.kernelridge#sklearn.kernel_ridge.KernelRidge.set_params |
class sklearn.linear_model.ARDRegression(*, n_iter=300, tol=0.001, alpha_1=1e-06, alpha_2=1e-06, lambda_1=1e-06, lambda_2=1e-06, compute_score=False, threshold_lambda=10000.0, fit_intercept=True, normalize=False, copy_X=True, verbose=False) [source]
Bayesian ARD regression. Fit the weights of a regression model, usin... | sklearn.modules.generated.sklearn.linear_model.ardregression#sklearn.linear_model.ARDRegression |
sklearn.linear_model.ARDRegression
class sklearn.linear_model.ARDRegression(*, n_iter=300, tol=0.001, alpha_1=1e-06, alpha_2=1e-06, lambda_1=1e-06, lambda_2=1e-06, compute_score=False, threshold_lambda=10000.0, fit_intercept=True, normalize=False, copy_X=True, verbose=False) [source]
Bayesian ARD regression. Fit th... | sklearn.modules.generated.sklearn.linear_model.ardregression |
fit(X, y) [source]
Fit the ARDRegression model according to the given training data and parameters. Iterative procedure to maximize the evidence Parameters
Xarray-like of shape (n_samples, n_features)
Training vector, where n_samples in the number of samples and n_features is the number of features.
yarray-li... | sklearn.modules.generated.sklearn.linear_model.ardregression#sklearn.linear_model.ARDRegression.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.ardregression#sklearn.linear_model.ARDRegression.get_params |
predict(X, return_std=False) [source]
Predict using the linear model. In addition to the mean of the predictive distribution, also its standard deviation can be returned. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Samples.
return_stdbool, default=False
Whether to return the sta... | sklearn.modules.generated.sklearn.linear_model.ardregression#sklearn.linear_model.ARDRegression.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.ardregression#sklearn.linear_model.ARDRegression.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.ardregression#sklearn.linear_model.ARDRegression.set_params |
class sklearn.linear_model.BayesianRidge(*, n_iter=300, tol=0.001, alpha_1=1e-06, alpha_2=1e-06, lambda_1=1e-06, lambda_2=1e-06, alpha_init=None, lambda_init=None, compute_score=False, fit_intercept=True, normalize=False, copy_X=True, verbose=False) [source]
Bayesian ridge regression. Fit a Bayesian ridge model. See ... | sklearn.modules.generated.sklearn.linear_model.bayesianridge#sklearn.linear_model.BayesianRidge |
sklearn.linear_model.BayesianRidge
class sklearn.linear_model.BayesianRidge(*, n_iter=300, tol=0.001, alpha_1=1e-06, alpha_2=1e-06, lambda_1=1e-06, lambda_2=1e-06, alpha_init=None, lambda_init=None, compute_score=False, fit_intercept=True, normalize=False, copy_X=True, verbose=False) [source]
Bayesian ridge regress... | sklearn.modules.generated.sklearn.linear_model.bayesianridge |
fit(X, y, sample_weight=None) [source]
Fit the model Parameters
Xndarray of shape (n_samples, n_features)
Training data
yndarray of shape (n_samples,)
Target values. Will be cast to X’s dtype if necessary
sample_weightndarray of shape (n_samples,), default=None
Individual weights for each sample New in... | sklearn.modules.generated.sklearn.linear_model.bayesianridge#sklearn.linear_model.BayesianRidge.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.bayesianridge#sklearn.linear_model.BayesianRidge.get_params |
predict(X, return_std=False) [source]
Predict using the linear model. In addition to the mean of the predictive distribution, also its standard deviation can be returned. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Samples.
return_stdbool, default=False
Whether to return the sta... | sklearn.modules.generated.sklearn.linear_model.bayesianridge#sklearn.linear_model.BayesianRidge.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.bayesianridge#sklearn.linear_model.BayesianRidge.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.bayesianridge#sklearn.linear_model.BayesianRidge.set_params |
class sklearn.linear_model.ElasticNet(alpha=1.0, *, l1_ratio=0.5, fit_intercept=True, normalize=False, precompute=False, max_iter=1000, copy_X=True, tol=0.0001, warm_start=False, positive=False, random_state=None, selection='cyclic') [source]
Linear regression with combined L1 and L2 priors as regularizer. Minimizes ... | sklearn.modules.generated.sklearn.linear_model.elasticnet#sklearn.linear_model.ElasticNet |
sklearn.linear_model.ElasticNet
class sklearn.linear_model.ElasticNet(alpha=1.0, *, l1_ratio=0.5, fit_intercept=True, normalize=False, precompute=False, max_iter=1000, copy_X=True, tol=0.0001, warm_start=False, positive=False, random_state=None, selection='cyclic') [source]
Linear regression with combined L1 and L2... | sklearn.modules.generated.sklearn.linear_model.elasticnet |
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.elasticnet#sklearn.linear_model.ElasticNet.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.elasticnet#sklearn.linear_model.ElasticNet.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.elasticnet#sklearn.linear_model.ElasticNet.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.elasticnet#sklearn.linear_model.ElasticNet.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.elasticnet#sklearn.linear_model.ElasticNet.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.elasticnet#sklearn.linear_model.ElasticNet.set_params |
property sparse_coef_
Sparse representation of the fitted coef_. | sklearn.modules.generated.sklearn.linear_model.elasticnet#sklearn.linear_model.ElasticNet.sparse_coef_ |
class sklearn.linear_model.ElasticNetCV(*, l1_ratio=0.5, eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, normalize=False, precompute='auto', max_iter=1000, tol=0.0001, cv=None, copy_X=True, verbose=0, n_jobs=None, positive=False, random_state=None, selection='cyclic') [source]
Elastic Net model with iterati... | sklearn.modules.generated.sklearn.linear_model.elasticnetcv#sklearn.linear_model.ElasticNetCV |
sklearn.linear_model.ElasticNetCV
class sklearn.linear_model.ElasticNetCV(*, l1_ratio=0.5, eps=0.001, n_alphas=100, alphas=None, fit_intercept=True, normalize=False, precompute='auto', max_iter=1000, tol=0.0001, cv=None, copy_X=True, verbose=0, n_jobs=None, positive=False, random_state=None, selection='cyclic') [sour... | sklearn.modules.generated.sklearn.linear_model.elasticnetcv |
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.elasticnetcv#sklearn.linear_model.ElasticNetCV.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.elasticnetcv#sklearn.linear_model.ElasticNetCV.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.elasticnetcv#sklearn.linear_model.ElasticNetCV.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.elasticnetcv#sklearn.linear_model.ElasticNetCV.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.elasticnetcv#sklearn.linear_model.ElasticNetCV.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.elasticnetcv#sklearn.linear_model.ElasticNetCV.set_params |
sklearn.linear_model.enet_path(X, y, *, l1_ratio=0.5, 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, check_input=True, **params) [source]
Compute elastic net path with coordinate descent. The elastic net optimization f... | sklearn.modules.generated.sklearn.linear_model.enet_path#sklearn.linear_model.enet_path |
class sklearn.linear_model.GammaRegressor(*, alpha=1.0, fit_intercept=True, max_iter=100, tol=0.0001, warm_start=False, verbose=0) [source]
Generalized Linear Model with a Gamma distribution. Read more in the User Guide. New in version 0.23. Parameters
alphafloat, default=1
Constant that multiplies the penalt... | sklearn.modules.generated.sklearn.linear_model.gammaregressor#sklearn.linear_model.GammaRegressor |
sklearn.linear_model.GammaRegressor
class sklearn.linear_model.GammaRegressor(*, alpha=1.0, fit_intercept=True, max_iter=100, tol=0.0001, warm_start=False, verbose=0) [source]
Generalized Linear Model with a Gamma distribution. Read more in the User Guide. New in version 0.23. Parameters
alphafloat, default=1... | sklearn.modules.generated.sklearn.linear_model.gammaregressor |
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.gammaregressor#sklearn.linear_model.GammaRegressor.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.gammaregressor#sklearn.linear_model.GammaRegressor.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.gammaregressor#sklearn.linear_model.GammaRegressor.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.gammaregressor#sklearn.linear_model.GammaRegressor.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.gammaregressor#sklearn.linear_model.GammaRegressor.set_params |
class sklearn.linear_model.HuberRegressor(*, epsilon=1.35, max_iter=100, alpha=0.0001, warm_start=False, fit_intercept=True, tol=1e-05) [source]
Linear regression model that is robust to outliers. The Huber Regressor optimizes the squared loss for the samples where |(y - X'w) / sigma| < epsilon and the absolute loss ... | sklearn.modules.generated.sklearn.linear_model.huberregressor#sklearn.linear_model.HuberRegressor |
sklearn.linear_model.HuberRegressor
class sklearn.linear_model.HuberRegressor(*, epsilon=1.35, max_iter=100, alpha=0.0001, warm_start=False, fit_intercept=True, tol=1e-05) [source]
Linear regression model that is robust to outliers. The Huber Regressor optimizes the squared loss for the samples where |(y - X'w) / s... | sklearn.modules.generated.sklearn.linear_model.huberregressor |
fit(X, y, sample_weight=None) [source]
Fit the model according to the given training data. Parameters
Xarray-like, shape (n_samples, n_features)
Training vector, where n_samples in the number of samples and n_features is the number of features.
yarray-like, shape (n_samples,)
Target vector relative to X.
... | sklearn.modules.generated.sklearn.linear_model.huberregressor#sklearn.linear_model.HuberRegressor.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.huberregressor#sklearn.linear_model.HuberRegressor.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.huberregressor#sklearn.linear_model.HuberRegressor.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.huberregressor#sklearn.linear_model.HuberRegressor.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.huberregressor#sklearn.linear_model.HuberRegressor.set_params |
class sklearn.linear_model.Lars(*, fit_intercept=True, verbose=False, normalize=True, precompute='auto', n_nonzero_coefs=500, eps=2.220446049250313e-16, copy_X=True, fit_path=True, jitter=None, random_state=None) [source]
Least Angle Regression model a.k.a. LAR Read more in the User Guide. Parameters
fit_intercep... | sklearn.modules.generated.sklearn.linear_model.lars#sklearn.linear_model.Lars |
sklearn.linear_model.Lars
class sklearn.linear_model.Lars(*, fit_intercept=True, verbose=False, normalize=True, precompute='auto', n_nonzero_coefs=500, eps=2.220446049250313e-16, copy_X=True, fit_path=True, jitter=None, random_state=None) [source]
Least Angle Regression model a.k.a. LAR Read more in the User Guide.... | sklearn.modules.generated.sklearn.linear_model.lars |
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.lars#sklearn.linear_model.Lars.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.lars#sklearn.linear_model.Lars.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.lars#sklearn.linear_model.Lars.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.lars#sklearn.linear_model.Lars.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.lars#sklearn.linear_model.Lars.set_params |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.