Learn R Programming

imputation (version 2.0.3)

SVTApproxImpute: Approximate SVT Imputation

Description

Imputation using Singular Value Thresholding First fill missing values using the mean of the column. Then, compute the SVD of the matrix, and subtract lambda from each of the singular values, thresholding at 0. Impute by multiplying back out the augmented SVD

Usage

SVTApproxImpute(x, lambda, verbose = F)

Arguments

x
a data frame or matrix where each row represents a different record
lambda
the penalty on the singular values
verbose
if TRUE print status updates

Examples

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

Run the code above in your browser using DataLab