ridge
Ridge regression.
📝Syntax
B = ridge(y, X, k)
B = ridge(y, X, k, scaled)
📄Description

ridge returns coefficient estimates for ridge regression models of response vector y on predictor matrix X.

Predictors are centered and scaled before fitting. If scaled is 0, coefficients are restored to the original predictor scale and an intercept row is included.

💡Examples
y = [1; 2.1; 2.9; 4.2; 5.1; 5.9];
X = [(1:6)' [2; 1; 4; 3; 7; 6]];
B = ridge(y, X, [0 0.5 2])
🔗See Also
regressrobustfit
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub