View source: R/composite_tsout_ensemble.R
comp_tsout_ens | R Documentation |
Performs composite time series outlier ensembling.
comp_tsout_ens( x, m1 = NULL, ncomp = 2, sds = 1, rept = 1, compr = 2, rat = 0.05, fast = TRUE )
x |
A data frame or a matrix object containing a multivariate time series |
m1 |
Variable indicating dimension reduction methods. Default is set to using all 4 methods: PCA, DOBIN, ICS and ICA. |
ncomp |
The number of components for each dimension reduction method. Default is set to 2. |
sds |
The random seed for generating a no-outlier time series. |
rept |
The number of repetitions for generating a no-outlier time series. |
compr |
To adjust for multiple testing, the results of the ensemble are compared with the results of a time series without outliers. If |
rat |
A comparison is done with the outliers removed time series. The variable |
fast |
For faster computation skip ICS decomposition method. |
A list with the following components:
|
The outliers detected from the multivariate ensemble after comparing with the comparison time series without outliers. |
|
All the outliers detected from the multivariate ensemble. |
|
A matrix with outlier scores organised by outlier method. |
|
The weights of the outlier detection methods. |
|
The basis vectors from PCA. |
|
The basis vectors from DOBIN. See R package |
|
The basis vectors from ICS. See R package |
|
The basis vectors from Independent Component Analysis. |
|
Each decomposition method has several components. For example if |
|
A 4D array with outlier scores organised by outlier method, decomposition method, components for each decomposition method and time. |
|
The unconstrained basis vectors on the simplex. |
|
The unconstrained coordinates of the composite time series data. |
## Not run: set.seed(100) n <- 600 x <- sample(1:100, n, replace=TRUE) x[25] <- 200 x[320] <- 300 x2 <- sample(1:100, n, replace=TRUE) x3 <- sample(1:100, n, replace=TRUE) x4 <- sample(1:100, n, replace=TRUE) X <- cbind.data.frame(x, x2, x3, x4) X <- X/rowSums(X) out <- comp_tsout_ens(X, compr=2, fast=FALSE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.