Learn R Programming

tidylearn (version 0.1.0)

tl_anomaly_aware: Anomaly-Aware Supervised Learning

Description

Detect outliers using DBSCAN or other methods, then optionally remove them or down-weight them before supervised learning.

Usage

tl_anomaly_aware(
  data,
  formula,
  response,
  anomaly_method = "dbscan",
  action = "flag",
  supervised_method = "logistic",
  ...
)

Value

A tidylearn model or list with model and anomaly info

Arguments

data

A data frame

formula

Model formula

response

Response variable name

anomaly_method

Method for anomaly detection: "dbscan", "isolation_forest"

action

Action to take: "remove", "flag", "downweight"

supervised_method

Supervised learning method

...

Additional arguments

Examples

Run this code
# \donttest{
model <- tl_anomaly_aware(iris, Species ~ ., response = "Species",
                           anomaly_method = "dbscan", action = "flag")
# }

Run the code above in your browser using DataLab