R: Recompute the '$d' component of a '"softImpute"' object...

deBias {softImpute} | R Documentation

## Recompute the `$d` component of a `"softImpute"` object through regression.

### Description

`softImpute` uses shrinkage when completing a matrix with missing values. This function debiases the singular values using ordinary least squares.

### Usage

    deBias(x, svdObject)

### Arguments

`x` | matrix with missing entries, or a matrix of class `"Incomplete"`
`svdObject` | an SVD object, the output of `softImpute`

### Details

Treating the `"d"` values as parameters, this function recomputes them by linear regression.

### Value

An svd object is returned, with components "u", "d", and "v".

### Author(s)

Trevor Hastie
Maintainer: Trevor Hastie hastie@stanford.edu

### Examples

    set.seed(101)
    n=200
    p=100
    J=50
    np=n*p
    missfrac=0.3
    x=matrix(rnorm(n*J),n,J)%*%matrix(rnorm(J*p),J,p)+matrix(rnorm(np),n,p)/5
    ix=seq(np)
    imiss=sample(ix,np*missfrac,replace=FALSE)
    xna=x
    xna[imiss]=NA
    fit1=softImpute(xna,rank=50,lambda=30)
    fit1d=deBias(xna,fit1)

[Package softImpute version 1.4 Index]