This commit includes regularization of covariance matrix. The function "regularize_eigenvalues" was added to utils.R This function winsorizes very small eigenvalues to a value between 0.1-1. This value is chosen based on the ratio of eigenvalues to the largest eigenvalue. Using this function, the covariance matrix is regularized at lines 80-104 of the script sparse_linear.R. The regularized covariance matrix is returned as a stand-alone output and is included in the list of outputs at line 157.
This commit includes regularization of covariance matrix. The function "regularize_eigenvalues" was added to utils.R This function winsorizes very small eigenvalues to a value between 0.1-1. This value is chosen based on the ratio of eigenvalues to the largest eigenvalue. Using this function, the covariance matrix is regularized at lines 80-104 of the script sparse_linear.R. The regularized covariance matrix is returned as a stand-alone output and is included in the list of outputs at line 157.