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

View source: R/stranger.R

strangeR Documentation

Computes anomaly metrics by invoking specific method(s) with associated sets of parameters

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

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 weird_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.

weirdList

List of weirds methods names.

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

library(stranger)
data(iris)
crazydata <- crazyfy(iris[,1:4])
curious <- strange(crazydata, weird="knn")

welovedatascience/stranger documentation built on Oct. 12, 2022, 10:52 p.m.