Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

imputation (version 2.0.3)

SVDImpute: SVD Imputation

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

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

Run this code
x = matrix(rnorm(100),10,10)
  x.missing = x > 1
  x[x.missing] = NA
  SVDImpute(x, 3)

Run the code above in your browser using DataLab