os.pca | R Documentation |
Visualize predictors using principal coordinate analysis
os.pca(x, y, method = "linear", thresh = 0, n.pred = ncol(x), size = 1)
x |
A data matrix (row: samples, col: predictors). |
y |
A vector of target value. |
method |
A string to specify the regression function for calculating R-squared values. "linear" (default), "quadratic" or "cubic" function can be specified. |
thresh |
The lower threshold of R-squared value to be indicated in a PCA plot (default: 0). |
n.pred |
The number of candidate predictors for prediction model to be indicated in a PCA plot (default: ncol(x)). |
size |
The size of symbols in a PCA plot (default: 1). |
A PCA plot
Takahiko Koizumi
data(Pinus)
train <- os.clean(Pinus$train)
target <- Pinus$target
os.pca(train, target)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.