Modify ridge_reg to include an option scale that, when set to TRUE, centers and scales the columns of X before running the regression. Make sure to return the result in the original scale.
Construct a function cv.ridge_reg that performs 10-fold cross-validation to select the optimal value of λ for ridge regression.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here