print.bagged.outlieroutputs: Print outliers in human-readable format

Description Usage Arguments Value See Also Examples

View source: R/print.bagged.outlieroutputs.R

Description

Pretty-prints outliers as output by the predict function from a Bagged OutlierTrees model (as generated by function bagged.outliertrees).

Usage

1
2
## S3 method for class 'bagged.outlieroutputs'
print(x, outliers_print = 15, ...)

Arguments

x

Outliers as returned by predict method on an object from bagged.outliertrees.

outliers_print

Maximum number of outliers to print.

...

No use.

Value

The same input x that was passed (as invisible).

See Also

bagged.outliertrees predict.bagged.outliertrees

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
library(bagged.outliertrees)

### example dataset with interesting outliers
data(hypothyroid)

### fit a Bagged OutlierTrees model
model <- bagged.outliertrees(hypothyroid,
  ntrees = 10,
  subsampling_rate = 0.5,
  z_outlier = 6,
  nthreads = 1
)

### use the fitted model to find outliers in the training dataset
outliers <- predict(model,
  newdata = hypothyroid,
  min_outlier_score = 0.5,
  nthreads = 1
)

### print the top-10 outliers in human-readable format
print(outliers, outliers_print = 10)

bagged.outliertrees documentation built on July 6, 2021, 9:06 a.m.