Class LinearRegression
java.lang.Object
ai.beestream.jitnn.ml.LinearRegression
Least squares with an optional L2 penalty alpha (ridge regression), solved in closed form from
the normal equations (X^T X + alpha I) w = X^T y on centred data, after scikit-learn's
LinearRegression (alpha 0) and Ridge.
-
Constructor Summary
ConstructorsConstructorDescriptionLeast squares with an intercept.LinearRegression(float alpha, boolean fitIntercept) Ridge regression with penaltyalpha(0 for plain least squares), with or without an intercept. -
Method Summary
-
Constructor Details
-
LinearRegression
public LinearRegression(float alpha, boolean fitIntercept) Ridge regression with penaltyalpha(0 for plain least squares), with or without an intercept. -
LinearRegression
public LinearRegression()Least squares with an intercept.
-
-
Method Details
-
fit
y [n] or [n, t]. -
coef
Coefficients [d] (one target) or [t, d]. -
intercept
The fitted intercept (zero without one). -
predict
-