stranger: Computes anomaly metrics by invoking specific method(s) with...

Description Usage Arguments Details Value Examples

View source: R/stranger.R

Description

strange invokes a weird method – that is a wrapper around a pre-existing anomaly detection measure (distance, probability...). stranger allows to invoke several weird methods in a single call.

Usage

1
strange(data, weird = "knn", tuneGrid = NULL, colname = NULL, ...)

Arguments

data

crazy data, ie outcome of a call to crazyfy.

weird

Weird method to be used - for the list of available methods, use weirds_list.

tuneGrid

(optional) vector or data.frame of values for the parameters of the invoked method.

colname

(optional) character - name to be given to the resulting anomaly metric computation (distance/probability).

...

additional parameters to be passed to the invoked weird method.

Details

You will use strange to use one method and may be interested by stranger if you wants to apply different methods in a single call. When comparing stranger package with caret, strange function is the equivalent of train, where as stranger corresponds to caretEnsemble function and package.

Value

stranger object – that is a data.table with attributes and overloaded with class stranger

Examples

1
2
3
4
5
6
7
## Not run: 
library(stranger)
data(iris)
crazydata <- crazyfy(iris[,1:4])
curious <- strange(crazydata, weird="knn")

## End(Not run)

stranger documentation built on March 18, 2018, 2:01 p.m.