powered by
Detect outliers using DBSCAN or other methods, then optionally remove them or down-weight them before supervised learning.
tl_anomaly_aware( data, formula, response, anomaly_method = "dbscan", action = "flag", supervised_method = "logistic", ... )
A tidylearn model or list with model and anomaly info
A data frame
Model formula
Response variable name
Method for anomaly detection: "dbscan", "isolation_forest"
Action to take: "remove", "flag", "downweight"
Supervised learning method
Additional arguments
# \donttest{ model <- tl_anomaly_aware(iris, Species ~ ., response = "Species", anomaly_method = "dbscan", action = "flag") # }
Run the code above in your browser using DataLab