biscale {eimpute} | R Documentation |
Data standardization
Description
Standardize a matrix rows and/or columns to have zero mean or unit variance
Usage
biscale(x, thresh.sd = 1e-05, maxit.sd = 100, control = list(...), ...)
Arguments
x |
an |
thresh.sd |
convergence threshold, measured as the relative change in the Frobenius norm between two successive estimates. |
maxit.sd |
maximum number of iterations. |
control |
a list of parameters that control details of standard procedure. See biscale.control. |
... |
arguments to be used to form the default control argument if it is not supplied directly. |
Value
A list is returned
x.st |
The matrix after standardization. |
alpha |
The row mean after iterative process. |
beta |
The column mean after iterative process. |
tau |
The row standard deviation after iterative process. |
gamma |
The column standard deviation after iterative process. |
References
Hastie, Trevor, Rahul Mazumder, Jason D. Lee, and Reza Zadeh. Matrix completion and low-rank SVD via fast alternating least squares. The Journal of Machine Learning Research 16, no. 1 (2015): 3367-3402.
Examples
################# Quick Start #################
m <- 100
n <- 100
r <- 10
x_na <- incomplete.generator(m, n, r)
###### Standardize both mean and variance
xs <- biscale(x_na)
###### Only standardize mean ######
xs_mean <- biscale(x_na, row.mean = TRUE, col.mean = TRUE)
###### Only standardize variance ######
xs_std <- biscale(x_na, row.std = TRUE, col.std = TRUE)