preProcess(x, ...)## S3 method for class 'default':
preProcess(x,
method = c("center", "scale"),
thresh = 0.95,
na.remove = TRUE,
k = 5,
knnSummary = mean,
...)
## S3 method for class 'preProcess':
predict(object, newdata, ...)
preProcess
fastICA
, such as n.comp
preProcess
results in a list with elementsx
method
thresh
W
and K
matrix of the decompositionIf PCA is requested but scaling is not, the values will still be scaled. Similarly, when ICA is requested, the data are automatically centered.
$k$-nearest neighbor imputation is carried out by finding the k closest samples (Euclidian distance) in the training set.
A warning is thrown if both PCA and ICA are requested. ICA, as implemented bt the fastICA
package automatically does a PCA decomposition prior to finding the ICA scores.
The function will throw an error of any variables in x
has less than two unique values.
prcomp
, fastICA
, spatialSign
data(BloodBrain)
# one variable has one unique value
preProc <- preProcess(bbbDescr[1:100,])
preProc <- preProcess(bbbDescr[1:100,-3])
training <- predict(preProc, bbbDescr[1:100,-3])
test <- predict(preProc, bbbDescr[101:208,-3])
Run the code above in your browser using DataLab