cv.SVDImpute: CV for SVDImpute

Description Usage Arguments Examples

View source: R/SVD.R

Description

Cross Validation for SVD Imputation Artificially erase some data and run SVDImpute multiple times, varying k from 1 to k.max. For each k, compute the RMSE on the subset of x for which data was artificially erased.

Usage

1
  cv.SVDImpute(x, k.max = floor(ncol(x)/2), parallel = F)

Arguments

x

a data frame or matrix where each row represents a different record

k.max

the largest rank used to approximate x

parallel

runs each run for k = 1 to k = k.max in parallel. Requires a parallel backend to be registered

Examples

1
2
3
4
x = matrix(rnorm(100),10,10)
  x.missing = x > 1
  x[x.missing] = NA
  cv.SVDImpute(x)

jeffwong/imputation documentation built on May 19, 2019, 4:02 a.m.