soft_cv: Soft-impute Cross-validation as described in Choi et al...

Description Usage Arguments Value Author(s) References See Also

View source: R/var_ests.R

Description

Hold out some data from a matrix and use softImpute to complete the matrix. The tuning parameter with the smallest prediction error is selected.

Usage

1
soft_cv(Y, k = 10, lambda_grid = NULL, print_update = FALSE)

Arguments

Y

The data matrix.

k

A positive integer. The fold for the soft-impute cross validation. Default is 10.

lambda_grid

A vector of positive numerics. The values of lambda to compute. The default is 20 values from the minimum to the maximum singular value of Y.

print_update

A logical. Should we print to the screen the status of the cross-validation-ish procedure at each iteration (TRUE) or not (FALSE)?

Value

lambda_min A positive numeric. The lambda that minimizes the prediction error.

lambda_grid A vector of positive numerics. The putative lambdas.

pred_err_vec A vector of positive numerics. The prediction errors for the lambdas in lambda_grid.

Author(s)

David Gerard

References

Choi, Yunjin, Jonathan Taylor, and Robert Tibshirani. "Selecting the number of principal components: Estimation of the true rank of a noisy matrix." arXiv preprint arXiv:1410.8260 (2014).

See Also

sig_soft that calls soft_cv to find the optimal lambda.


dcgerard/hose documentation built on Aug. 1, 2019, 12:11 a.m.