rbsvd {rsvd}R Documentation

Robust singular value decomposition

Description

The function is to implement the singular value decomposition based on alternating regression. Many loss functions are offered in the decomposition for the robustness.

Usage

rbsvd(y, k = 2, constant = 1.205, ind = 1, recursive=FALSE, mad=FALSE, by.col=TRUE, alpha = 0.5, err = 0.5, err1 = 0.01, err2 = 0.001, loops = 10, iter = 100, iter1 = 1000, sigma = -2, nsamp = 100)

Arguments

y Data matrix
k First k components after the decomposition
constant The parameter in the robust loss functions
ind To indicate the type of loss functions ind = 1:Logistic ind = 2:Huber M estimator ind = 3:Andrew ind = 4:Beaton and Tukey ind = 5:Hinich and Talwar ind = 6:t-likelihood ind = 7:Dennis and Welsch ind = 8:Fair ind = 9:L1 ind = other: Least Squares Estimator
recursive Recursively find the fitted matrix
mad Robust scaling. Default is false
by.col Implement robust scaling by columns. Default is true
alpha The percentage of data to be used in LTS estimate procedure
err The stop criteria in the stabling test procedure
err1 The stop criteria of comparing the current and previous fitted matrices
err2 The stop criteria of comparing the current and previous loss function values
loops The number of iterations in stabling test procedure
iter The number of iterations in alternating regression procedure
iter1 The number of iterations in M estimate procedure
sigma If sigma is positive, it will consider the variance in M estimate is known and the variance will not be estimated. Otherwise, sigma will be estimated together with the ceofficients in the robust regression procedure
nsamp The number of subsample used in the initial estimates in fast LTS estimate procedure

Details

The procedure composed two parts. In the first part, the estimates from LTS and M estimators will be compared so that some outliers can be removed. In the second part, alternating regression will be implemented to find the fitted matrix. The regular singular value decomposition will be carried out on the fitted matrix.

Value

d a vector containing the singular values of y, of length m.
u a matrix whose columns contain the left singular vectors of y, Dimension c(n, m).
v a matrix whose columns contain the right singular vectors of y, Dimension c(m, m).

Note

Author(s)

Xingdong Feng, Xuming He

References

Lower Rank Approximation of Matrices Based on Fast and Robust Alternating Regression

See Also

Examples

n<-100
m<-20
y<-matrix(rnorm(n*m),n,m)
y[2,2]<-y[2,2]+1000
y[20,15]<-y[20,15]+10000
rbsvd(y)

[Package rsvd version 1.0 Index]