Skip to contents

Rolls back the data in columns for rows flagged by event to prevent data leaks during training.

Usage

dataset_rollback_event(
  dataset,
  event = "event",
  rollback_cols = setdiff(colnames(dataset), c(by, event, "timestamp")),
  by = "group_customer_no",
  ...
)

Arguments

dataset

data.table of data to roll back

event

character column name containing a logical feature that indicates events to rollback

rollback_cols

character vector of columns to roll back

by

character column name to group the table by

...

not used

Value

rolled back data.table