Description Usage Arguments Value See Also Examples
Computing Elastic Net Estimator when multiple units are missing. The underlying algorithm is glmnet package in R. It is worth noting that this package was written by Friedman et. al.
1 | en_mp_rows(M, mask, num_folds = 5, num_lam = 100L, num_alpha = 40L)
|
M |
Matrix of observed entries. The input should be N (number of units) by T (number of time periods). |
mask |
Binary mask with the same shape as M containing observed entries. |
num_folds |
Optional parameter on the number of folds for cross-validation. Default is 5. |
num_lam |
Optional parameter on the number of lambda values (weight penalties). Default is 100. |
num_alpha |
Optional parameter on the number of alpha values (shape parameter). Default is 40. |
The matrix with all missing entries filled.
cv.glmnet
, written by Jerome Friedman, Trevor Hastie, Noah Simon, Junyang Qian, and Rob Tibshirani
1 | en_mp_rows(matrix(c(1,2,3,4),2,2), matrix(c(1,1,1,0),2,2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.