Last chance! 50% off unlimited learning
Sale ends in
outliers_kmeans_lof
is for outliers detection and treatment using Kmeans and Local Outlier Factor (lof)
process_outliers
is a simpler wrapper for outliers_kmeans_lof
.
process_outliers(dat, target, ex_cols = NULL, kc = 3, kn = 5,
x_list = NULL, parallel = FALSE, note = FALSE, process = TRUE,
save_data = FALSE, file_name = NULL, dir_path = tempdir())outliers_kmeans_lof(dat, x, target = NULL, kc = 3, kn = 5,
note = FALSE, process = TRUE, save_data = FALSE,
file_name = NULL, dir_path = tempdir())
Dataset with independent variables and target variable.
The name of target variable.
A list of excluded variables. Regular expressions can also be used to match variable names. Default is NULL.
Number of clustering centers for Kmeans
Number of neighbors for LOF.
Names of independent variables.
Logical, parallel computing.
Logical, outputs info. Default is TRUE.
Logical, process outliers, not just analysis.
Logical. If TRUE, save outliers analysis file to the specified folder at dir_path
The file name for periodically saved outliers analysis file. Default is NULL.
The path for periodically saved outliers analysis file. Default is "./variable".
The name of variable to process.
A data frame with outliers process to all the variables.
# NOT RUN {
dat_out = process_outliers(UCICreditCard,
target = "default.payment.next.month",
ex_cols = "date$", kc = 3, kn = 10, parallel = FALSE)
# }
Run the code above in your browser using DataLab