CVTuningCov-package {CVTuningCov} | R Documentation |
This is a package for selecting tuning parameters based on cross-validation (CV) in regularized estimators of large covariance matrices. Four regularized methods are implemented: banding, tapering, hard-thresholding and soft-thresholding. Two types of matrix norms are applied: Frobenius norm and operator norm. Two types of CV are considered: K-fold CV and random CV. Usually K-fold CV use K-1 folds to train a model and the rest one fold to validate the model. The reverse version trains a model with 1 fold and validates with the rest with K-1 folds. Random CV randomly splits the data set to two parts, a training set and a validation set with user-specified sizes.
Package: | CVTuningCov |
Type: | Package |
Version: | 1.0 |
Date: | 2014-07-31 |
License: | GPL-2 |
Binhuan Wang
Maintainer: Binhuan Wang <binhuan.wang@nyumc.org>
Fang, Y., Wang, B. and Feng, Y. (2013). Tuning parameter selection in regularized estimations of large covariance matrices. Available at: http://arxiv.org/abs/1308.3416.
library(MASS); n <- 50; p <- 50; fold <- 3; k.grid <- seq(0,2*(p-1),by=1); Sigma <- AR1(p, rho=0.6); X <- mvrnorm(n,rep(0,p),Sigma); CV.F.fit <- regular.CV(X,k.grid, method='Tapering',fold=fold,norm='F'); CV.F.fit$CV.k;