sklearn.linear model.ARDRegression
Jump to navigation
Jump to search
A sklearn.linear_model.ARDRegression is a ARD Regression System within sklearn.linear_model
class.
- AKA: ARDRegression, linear_model.ARDRegression.
- Context
- Usage:
- 1) Import ARD Regression model from scikit-learn :
from sklearn.linear_model import ARDRegression
- 2) Create design matrix
X
and response vectorY
- 3) Create ARD Regression object:
model=ARDRegression([n_iter=n_iter, tol=tol, alpha_1=alpha1, alpha_2=alpha1, lambda_1=lambda1, lambda_2=lambda2,...])
- 4) Choose method(s):
- Fit the ARDRegression model to the dataset:
model.fit(X, Y[, check_input]))
- Predict Y using the linear model with estimated coefficients:
Y_pred = model.predict(X)
- Return coefficient of determination (R^2) of the prediction:
model.score(X,Y[, sample_weight=w])
- Get estimator parameters:
model.get_params([deep])
- Set estimator parameters:
model.set_params(**params)
- Fit the ARDRegression model to the dataset:
- 1) Import ARD Regression model from scikit-learn :
- Example(s):
Input: | Output: |
#Importing modules
#Calculaton of RMSE and Explained Variances
# Printing Results
#plotting real vs predicted data
|
|
- Counter-Example(s)
- See: Explained Variance Regression Score, Regression System, Regularization Task, Bayesian Regression Task, Bayesian Analysis.
References
2017
- http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.ARDRegression.html
- QUOTE:
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)
- QUOTE:
- Fit the weights of a regression model, using an ARD prior. The weights of the regression model are assumed to be in Gaussian distributions. Also estimate the parameters lambda (precisions of the distributions of the weights) and alpha (precision of the distribution of the noise). The estimation is done by an iterative procedures (Evidence Maximization)noise).