| buildPCA | R Documentation |
buildPCA builds principal components of given dataset.
It is used inside plotPCA function to build necessary
object to perform principal components analysis.
buildPCA(x, control = list())
x |
dataset of parameters to be transformed |
control |
control list |
returns a list with the following elements:
sdev the standard deviations of the principal components (i.e., the square roots of the eigenvalues of the covariance/correlation matrix, though the calculation is actually done with the singular values of the data matrix).
rotation the matrix of variable loadings (i.e., a matrix whose columns contain the eigenvectors).
x transformed matrix.
center,scale the centering and scaling used, or FALSE.
Alpar Gür alpar.guer@smail.th-koeln.de
#define objective function
objFun <- function(x) 2*(x[1] - 1)^2 + 5*(x[2] - 3)^2 + (10*x[3] - x[4]/3)
spotConfig <-
list(types = c('numeric', 'numeric', 'numeric', 'numeric'),
funEvals = 15, #budget
noise = TRUE,
seedFun = 1,
replicated = 2,
seedSPOT = 1,
design = designLHD,
model = buildRandomForest, #surrogate model
optimizer = optimLHD, #LHD to optimize model
optimizerControl = list(funEvals=100)) #100 model evals in each step
lower <- c(-20, -20, -20, -20)
upper <- c(20, 20, 20, 20)
res <- spot(x=NULL,
fun=objFun,
lower=lower,
upper=upper,
control=spotConfig)
resPCA <- buildPCA(res$x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.