Extracts outliers from object of class "outForest". The outliers are sorted by their absolute score in descending fashion.
outliers(object, ...)
# Default S3 method
outliers(object, ...)
# S3 method for class 'outForest'
outliers(object, ...)
A data.frame
with one row per outlier. The columns are as follows:
row
, col
: Row and column in original data with outlier.
observed
: Observed value.
predicted
: Predicted value.
rmse
: Scaling factor used to normalize the difference between observed
and predicted.
score
: Outlier score defined as (observed-predicted)/RMSE.
threshold
: Threshold above which an outlier score counts as outlier.
replacement
: Value used to replace observed value.
outliers(default)
: Default method not implemented yet.
outliers(outForest)
: Extract outliers from outForest object.
x <- outForest(iris)
#>
#> Outlier identification by random forests
#>
#> Variables to check: Sepal.Length, Sepal.Width, Petal.Length, Petal.Width
#> Variables used to check: Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species
#>
#> Checking: Sepal.Length Sepal.Width Petal.Length Petal.Width
outliers(x)
#> row col observed predicted rmse score threshold replacement
#> 2 42 Sepal.Width 2.3 3.341299 0.2914918 -3.572309 3 3.1
#> 5 115 Petal.Width 2.4 1.814530 0.1775892 3.296767 3 1.8
#> 1 107 Sepal.Length 4.9 6.114094 0.3691353 -3.289021 3 6.3
#> 4 119 Petal.Length 6.9 5.935608 0.2961940 3.255946 3 6.6
#> 3 99 Petal.Length 3.0 3.937854 0.2961940 -3.166351 3 3.9
#> 6 135 Petal.Width 1.4 1.954661 0.1775892 -3.123281 3 1.8