Description Usage Arguments Value See Also Examples
View source: R/print.bagged.outlieroutputs.R
Pretty-prints outliers as output by the predict
function from a Bagged OutlierTrees
model (as generated by function bagged.outliertrees
).
1 2 |
x |
Outliers as returned by predict method on an object from |
outliers_print |
Maximum number of outliers to print. |
... |
No use. |
The same input x
that was passed (as invisible
).
bagged.outliertrees predict.bagged.outliertrees
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.