L2 penalized ordinary least squares linear regression (OLS) solved using the closed-form equation. The addition of regularization, controlled by the alpha parameter, makes Ridge less prone to overfitting than non-regularized linear regression.
Data Type Compatibility: Continuous
|1||alpha||1.0||float||The L2 regularization penalty amount to be added to the weight coefficients.|
Return the weights of the model:
public weights() : array|null
Return the bias parameter:
public bias() : float|null
use Rubix\ML\Regressors\Ridge; $estimator = new Ridge(2.0);