enpls.od {enpls} | R Documentation |
Ensemble Partial Least Squares for Outlier Detection
Description
Outlier detection with ensemble partial least squares.
Usage
enpls.od(x, y, maxcomp = NULL, cvfolds = 5L, reptimes = 500L,
method = c("mc", "boot"), ratio = 0.8, parallel = 1L)
Arguments
x |
Predictor matrix. |
y |
Response vector. |
maxcomp |
Maximum number of components included within each model. If not specified, will use the maximum number possible (considering cross-validation and special cases where n is smaller than p). |
cvfolds |
Number of cross-validation folds used in each model
for automatic parameter selection, default is |
reptimes |
Number of models to build with Monte-Carlo resampling or bootstrapping. |
method |
Resampling method. |
ratio |
Sampling ratio used when |
parallel |
Integer. Number of CPU cores to use.
Default is |
Value
A list containing four components:
-
error.mean
- error mean for all samples (absolute value) -
error.median
- error median for all samples -
error.sd
- error sd for all samples -
predict.error.matrix
- the original prediction error matrix
Note
To maximize the probablity that each observation can
be selected in the test set (thus the prediction uncertainty
can be measured), please try setting a large reptimes
.
Author(s)
Nan Xiao <https://nanx.me>
See Also
See enpls.fs
for measuring feature importance with
ensemble partial least squares regressions.
See enpls.fit
for fitting ensemble partial least
squares regression models.
Examples
data("alkanes")
x <- alkanes$x
y <- alkanes$y
set.seed(42)
od <- enpls.od(x, y, reptimes = 50)
print(od)
plot(od)
plot(od, criterion = "sd")