plot.mbl {resemble} | R Documentation |
Plot method for an object of class mbl
Description
Plots the content of an object of class mbl
Usage
## S3 method for class 'mbl'
plot(x, g = c("validation", "gh"), param = "rmse", pls_c = c(1,2), ...)
Arguments
x |
an object of class |
g |
a character vector indicating what results shall be plotted.
Options are: |
param |
a character string indicating what validation statistics shall be
plotted. The following options are available: |
pls_c |
a numeric vector of length one or two indicating the pls factors to be
plotted. Default is |
... |
some arguments to be passed to the plot methods. |
Details
For plotting the pls scores from the pls score matrix (of more than one column), this matrix is first transformed from the Euclidean space to the Mahalanobis space. This is done by multiplying the score matrix by the root square of its covariance matrix. The root square of this matrix is estimated using a singular value decomposition.
Author(s)
Leonardo Ramirez-Lopez and Antoine Stevens
See Also
Examples
library(prospectr)
data(NIRsoil)
Xu <- NIRsoil$spc[!as.logical(NIRsoil$train), ]
Yu <- NIRsoil$CEC[!as.logical(NIRsoil$train)]
Yr <- NIRsoil$CEC[as.logical(NIRsoil$train)]
Xr <- NIRsoil$spc[as.logical(NIRsoil$train), ]
Xu <- Xu[!is.na(Yu), ]
Yu <- Yu[!is.na(Yu)]
Xr <- Xr[!is.na(Yr), ]
Yr <- Yr[!is.na(Yr)]
ctrl <- mbl_control(validation_type = "NNv")
ex_1 <- mbl(
Yr = Yr, Xr = Xr, Xu = Xu,
diss_method = "cor",
diss_usage = "none",
gh = TRUE,
mblCtrl = ctrl,
k = seq(50, 250, 30)
)
plot(ex_1)
plot(ex_1, g = "gh", pls_c = c(2, 3))