print.bagged.outlieroutputs {bagged.outliertrees}R Documentation

Print outliers in human-readable format

Description

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

Usage

## 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

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)

[Package bagged.outliertrees version 1.0.0 Index]