powered by
Identifies outliers in new data based on previously fitted "outForest" object. The result of predict() is again an object of class "outForest". All its methods can be applied to it.
predict()
# S3 method for outForest predict( object, newdata, replace = c("pmm", "predictions", "NA", "no"), pmm.k = 3L, threshold = object$threshold, max_n_outliers = Inf, max_prop_outliers = 1, seed = NULL, ... )
An object of class "outForest".
A new data.frame to be assessed for numeric outliers.
data.frame
Should outliers be replaced via predictive mean matching "pmm" (default), by "predictions", or by NA ("NA"). Use "no" to keep outliers as they are.
NA
For replace = "pmm", from how many nearest OOB prediction neighbours (from the original non-outliers) to sample?
replace = "pmm"
Threshold above which an outlier score is considered an outlier. The default is 3.
Maximal number of outliers to identify. Will be used in combination with threshold and max_prop_outliers.
threshold
max_prop_outliers
Maximal relative count of outliers. Will be used in combination with threshold and max_n_outliers.
max_n_outliers
Integer random seed.
Further arguments passed from other methods.
outForest(), outliers(), Data()
outForest()
outliers()
Data()
(out <- outForest(iris, allow_predictions = TRUE)) iris1 <- iris[1, ] iris1$Sepal.Length <- -1 pred <- predict(out, newdata = iris1) outliers(pred) Data(pred) plot(pred) plot(pred, what = "scores")
Run the code above in your browser using DataLab