prepare_examples {processpredictR}R Documentation

Convert a dataset of type log into a preprocessed format.

Description

an event log is converted into a tibble where each row contains a cumulative sequence of activities per case. This sequence will eventually be feeded to the Transformer model's token embedding layer.

Usage

prepare_examples(
  log,
  task = c("outcome", "next_activity", "next_time", "remaining_time", "remaining_trace",
    "remaining_trace_s2s"),
  features = NULL,
  ...
)

Arguments

log

log: Object of class log or derivatives (grouped_log, eventlog, activitylog, etc.).

task

character: a process monitoring task for which to prepare an event log.

features

character (default NULL): additional features. Appends attributes (if present) numeric_features and/or categorical_features to a preprocessed event log.

...

additional arguments.

Value

a preprocessed dataset of class ppred_examples_df.

Examples

library(processpredictR)
library(eventdataR)

prepare_examples(patients, "next_activity")



[Package processpredictR version 0.1.0 Index]