Tuning of the projection pursuit regression with compositional predictor variables | R Documentation |
Tuning of the projection pursuit regression with compositional predictor variables.
pprcomp.tune(y, x, nfolds = 10, folds = NULL, seed = NULL,
nterms = 1:10, type = "log", graph = FALSE)
y |
A numerical vector with the continuous variable. |
x |
A matrix with the available compositional data, but zeros are not allowed. |
nfolds |
The number of folds to use. |
folds |
If you have the list with the folds supply it here. |
seed |
You can specify your own seed number here or leave it NULL. |
nterms |
The number of terms to try in the projection pursuit regression. |
type |
Either "alr" or "log" corresponding to the additive log-ratio transformation or the logarithm applied to the compositional predictor variables. |
graph |
If graph is TRUE (default value) a filled contour plot will appear. |
The function performs tuning of the projection pursuit regression algorithm with compositional predictor variables.
A list including:
runtime |
The run time of the cross-validation procedure. |
mse |
The mean squared error of prediction for each number of terms. |
opt.nterms |
The number of terms corresponding to the minimum mean squared error of prediction. |
opt.alpha |
The value of |
performance |
The minimum mean squared error of prediction. |
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Friedman, J. H. and Stuetzle, W. (1981). Projection pursuit regression. Journal of the American Statistical Association, 76, 817-823. doi: 10.2307/2287576.
pprcomp, ice.pprcomp, alfapcr.tune, compppr.tune
x <- as.matrix(iris[, 2:4])
x <- x/ rowSums(x)
y <- iris[, 1]
mod <- pprcomp.tune(y, x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.