View source: R/trans_outliers_boxplot.R
outliers_boxplot | R Documentation |
The outliers_boxplot class uses box-plot definition for outliers_boxplot.
An outlier is a value that is below than Q_1 - 1.5 \cdot IQR
or higher than Q_3 + 1.5 \cdot IQR
.
The class remove outliers_boxplot for numeric attributes.
Users can set alpha to 3 to remove extreme values.
outliers_boxplot(alpha = 1.5)
alpha |
boxplot outlier threshold (default 1.5, but can be 3.0 to remove extreme values) |
returns an outlier object
# code for outlier removal
out_obj <- outliers_boxplot() # class for outlier analysis
out_obj <- fit(out_obj, iris) # computing boundaries
iris.clean <- transform(out_obj, iris) # returning cleaned dataset
#inspection of cleaned dataset
nrow(iris.clean)
idx <- attr(iris.clean, "idx")
table(idx)
iris.outliers_boxplot <- iris[idx,]
iris.outliers_boxplot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.