L2 regularized Least Squares linear model solved using a closed-form solution. The addition of regularization, controlled by the alpha parameter, makes Ridge less prone to overfitting than ordinary linear regression.

Interfaces: Estimator, Learner, Ranks Features, Persistable

Data Type Compatibility: Continuous


# Param Default Type Description
1 alpha 1.0 float The strength of the L2 regularization penalty.


use Rubix\ML\Regressors\Ridge;

$estimator = new Ridge(2.0);

Additional Methods#

Return the weights of features in the decision function.

public coefficients() : array|null

Return the bias added to the decision function.

public bias() : float|null