SVDImpute: SVD Imputation

Description Usage Arguments Examples

View source: R/SVD.R

Description

Imputation using the SVD First fill missing values using the mean of the column Then, compute a low, rank-k approximation of x. Fill the missing values again from the rank-k approximation. Recompute the rank-k approximation with the imputed values and fill again, repeating num.iters times

Usage

1
  SVDImpute(x, k, num.iters = 10, verbose = T)

Arguments

x

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

k

the rank-k approximation to use for x

num.iters

the number of times to compute the rank-k approximation and impute the missing data

verbose

if TRUE print status updates

Examples

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

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