Description Usage Arguments Value Details References Examples
Computes dimension reduction based on the supervised principal components algorithm. In essense, algorithm performs a screening step based on univariate scores for the features, and then computes standard PCA on using only the retained features.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
x |
The original feature matrix, columns denoting the features and rows the instances. |
y |
A vector with the observed target values we try to predict using |
nctot |
Total number of latent features to extract. |
ncsup |
Maximum number of latent features to extract that use supervision.
If |
window |
Maximum number of features that will survive the screening and from which
the supervised components are computed. Affects also how the |
exclude |
Columns (variables) in |
verbose |
Whether to print some messages along the way. |
normalize |
Whether to scale the extracted features so that they all have standard deviation of one. |
preprocess |
Whether to center and scale the features before extracting the new features. |
alpha |
Significance level for the p-values of the univariate scores used to determine which features survive the screening and are used to compute the supervised components. |
perms |
Number of permutations to estimate the p-values for univariate scores. |
screenthresh |
Value between 0 and 1 (or |
nfeat |
Number of features to retain in the screening step. If this option is used, then
the algorithm does not perform the permutation tests for the p-values, but instead computes the
supervised components from those features that have their univariate score among the |
sup.only |
If |
... |
Currently ignored. |
spca-object that is similar to the object returned by prcomp
.
The object will have the following elements:
w
The projection (or rotation) matrix W, that transforms the original data X into the new features Z = X W .
z
The extracted latent features corresponding to the training inputs X.
v
Matrix V that is used to compute W when combining supervised and unsupervised components (see the Piironen and Vehtari (2018) for more information).
sdev
Standard deviations of the new features.
centers
Mean values for the original variables.
scales
Scales of the original variables.
exclude
Excluded variables.
In the original paper, the authors proposed estimating the screening threshold
using cross-validation for the model obtained when the extracted features are used
for regression or classification. This implementation performs the screening
based on the estimated p-values for the univariate scores (these are estimated using
a permutation test) and the screening step retains only those features with p-value
less than the specified level alpha
.
Bair, E., Hastie, T., Paul, D., and Tibshirani, R. (2006). Prediction by supervised principal components. Journal of the American Statistical Association, 101(473):119-137.
Piironen, J. and Vehtari, A. (2018). Iterative supervised principal components. In Proceedings of the 21st International Conference on Artificial Intelligence and Statistics (AISTATS) PMLR 84: 106-114.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.