Tradeoff Curves for Sparse PCs
Tradeoff curves of one or more sparse PCs for a series of lambdas, which contrast the loss of explained variance and the gain of sparseness.
## S3 method for class 'opt.TPO'
plot(x, k, f.x = c ("l0", "pl0", "l1", "pl1", "lambda"),
f.y = c ("var", "pvar"), ...)
## S3 method for class 'opt.BIC'
plot(x, k, f.x = c ("l0", "pl0", "l1", "pl1", "lambda"),
f.y = c ("var", "pvar"), ...)x |
|
k |
This function plots the tradeoff curve of the
|
f.x, f.y |
A string, specifying which information shall be plotted on the x and y - axis. See the details section for more information. |
... |
Further arguments passed to or from other functions. |
The argument f.x can obtain the following values:
"l0": l0 - sparseness, which corresponds to the number of
zero loadings of the considered component(s).
"pl0": l0 - sparseness in percent (l0 - sparseness
ranges from 0 to p-1 for each component).
"l1": l1 - sparseness, which corresponds to
the negative sum of absolute
loadings of the considered component(s).
(The exact value displayed for a single component is
sqrt (p) - S, with S as the the absolute sum of loadings.)
As this value is a part of the objective function which selects
the candidate directions within the sPCAgrid function,
this option is provided here.
"pl1" The "l1 - sparseness" in percent (l1 - sparseness
ranges from 0 to sqrt (p-1) for each component).
"lambda": The lambda used for computing a particular model.
The argument f.y can obtain the following values:
"var": The (cumulated) explained variance of the considered
component(s). The value shown here is calculated using the variance
estimator specified via the method argument of function
sPCAgrid.
"pvar": The (cumulated) explained variance of the considered
component(s) in percent. The 100%-level is assumed as the sum of variances
of all columns of argument x.
Again the same variance estimator is
used as specified via the method argument of function
sPCAgrid.
The subtitle summarizes the result of the applied criterion for selecting a value of lambda:
The component the argument k refers to, corresponds to the
$pc.noord item of argument x.
For more info on the order of sparse PCs see the details section of
opt.TPO.
Heinrich Fritz, Peter Filzmoser <P.Filzmoser@tuwien.ac.at>
C. Croux, P. Filzmoser, H. Fritz (2011). Robust Sparse Principal Component Analysis Based on Projection-Pursuit, ?? To appear.
set.seed (0)
## generate test data
x <- data.Zou (n = 250)
k.max <- 3 ## max number of considered sparse PCs
## arguments for the sPCAgrid algorithm
maxiter <- 25 ## the maximum number of iterations
method <- "sd" ## using classical estimations
## Optimizing the TPO criterion
oTPO <- opt.TPO (x, k.max = k.max, method = method, maxiter = maxiter)
## Optimizing the BIC criterion
oBIC <- opt.BIC (x, k.max = k.max, method = method, maxiter = maxiter)
## Tradeoff Curves: Explained Variance vs. sparseness
par (mfrow = c (2, k.max))
for (i in 1:k.max) plot (oTPO, k = i)
for (i in 1:k.max) plot (oBIC, k = i)
## Explained Variance vs. lambda
par (mfrow = c (2, k.max))
for (i in 1:k.max) plot (oTPO, k = i, f.x = "lambda")
for (i in 1:k.max) plot (oBIC, k = i, f.x = "lambda")Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.