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
fit
predict