11.3.1.1. astroML.linear_model.LinearRegression

class astroML.linear_model.LinearRegression(fit_intercept=True, regularization='none', kwds=None)[source]

Simple Linear Regression with errors in y

This is a stripped-down version of sklearn.linear_model.LinearRegression which can correctly accounts for errors in the y variable

Parameters
fit_interceptbool (optional)

if True (default) then fit the intercept of the data

regularizationstring (optional)

[‘l1’|’l2’|’none’] Use L1 (Lasso) or L2 (Ridge) regression

kwds: dict

additional keyword arguments passed to sklearn estimators: LinearRegression, Lasso (L1), or Ridge (L2)

Notes

This implementation may be compared to that in sklearn.linear_model.LinearRegression. The difference is that here errors are

Attributes
coef_

Methods

get_params([deep])

Get parameters for this estimator.

set_params(**params)

Set the parameters of this estimator.

fit

predict

__init__(fit_intercept=True, regularization='none', kwds=None)[source]

Initialize self. See help(type(self)) for accurate signature.