The original implementation of ridge_reg should work when given a sparse matrix X; the function Matrix::crossprod is used in place of the default. Generally this is okay because XtX will usually be...


The original implementation of ridge_reg should work when given a sparse matrix X; the function Matrix::crossprod is used in place of the default. Generally this is okay because XtX will usually be much smaller than X itself. However, if we center and scale the columns of X this causes a problem as the matrix will be converted to a dense format. Implement the scale option in an intelligent way so that the matrix never needs to be converted to a dense format



May 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here