aux.preprocess {Rdimtools} | R Documentation |
Preprocessing the data
Description
aux.preprocess
can perform one of following operations; "center"
, "scale"
,
"cscale"
, "decorrelate"
and "whiten"
. See below for more details.
Usage
aux.preprocess(
data,
type = c("center", "scale", "cscale", "decorrelate", "whiten")
)
Arguments
data |
an |
type |
one of |
Value
named list containing:
- pX
an
(n\times p)
matrix after preprocessing in accordance withtype
parameter- info
a list containing
-
type:
name of preprocessing procedure. -
mean:
a mean vector of lengthp
. -
multiplier:
a(p\times p)
matrix or 1 for "center".
-
Operations
we have following operations,
"center"
subtracts mean of each column so that every variable has mean
0
."scale"
turns each column corresponding to variable have variance
1
."cscale"
combines
"center"
and"scale"
."decorrelate"
"center"
and sets its covariance term having diagonal entries only."whiten"
"decorrelate"
and sets all diagonal elements be1
.
Author(s)
Kisung You
Examples
## Generate data
set.seed(100)
X = aux.gensamples(n=200)
## 5 types of preprocessing
X_center = aux.preprocess(X)
X_scale = aux.preprocess(X,type="scale")
X_cscale = aux.preprocess(X,type="cscale")
X_decorr = aux.preprocess(X,type="decorrelate")
X_whiten = aux.preprocess(X,type="whiten")