Description Usage Arguments Value References Examples
Attribute-wise Learning for Scoring Outliers.
1 2 |
data |
a matrix or data.frame. |
scale_numerics |
logical, if TRUE then center and scale numeric variables. If FALSE then ignore scaling |
method |
a function name in the form of a character string which is passed to formula (e.g. 'lm') |
cross_validate |
logical indicating the use of cross validation for scoring |
n_folds |
an integer specifying the number of folds if cross validating. Defaults to 5 |
scores_only |
logical, if TRUE return outlier scores only. If FALSE return a list with outlier scores and the error matrix |
... |
additional arguments passed to method |
If scores_only = TRUE, only outlier scores are returned. If FALSE, the function returns a list containing outlier scores, feature RMSE, feature weights, raw prediction error matrix, squared prediction error matrix, and feature weighted squared prediction error matrix
see "Outlier Analysis" (C.C Aggarwal. Springer, 2017) section 7.7
1 2 3 4 5 6 7 8 | # OLS with cross validation for out of sample scoring
also(data = state.x77, scale_numerics = TRUE, method = 'lm', cross_validate = TRUE,
n_folds = 10, scores_only = TRUE)
# random forest without cross validation#'
rf_also <- also(data = scale(state.x77), scale_numerics = FALSE, method = 'randomForest',
cross_validate = FALSE, scores_only = FALSE)
rf_also$scores; rf_also$feature_weights; rf_also$raw_error_matrix
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.