| filter_precedence {edeaR} | R Documentation |
Filter Precedence Relations
Description
Filters cases based on the precedence relations between two sets of activities.
Usage
filter_precedence(
log,
antecedents,
consequents,
precedence_type = c("directly_follows", "eventually_follows"),
filter_method = c("all", "one_of", "none"),
reverse = FALSE,
eventlog = deprecated()
)
## S3 method for class 'log'
filter_precedence(
log,
antecedents,
consequents,
precedence_type = c("directly_follows", "eventually_follows"),
filter_method = c("all", "one_of", "none"),
reverse = FALSE,
eventlog = deprecated()
)
## S3 method for class 'grouped_log'
filter_precedence(
log,
antecedents,
consequents,
precedence_type = c("directly_follows", "eventually_follows"),
filter_method = c("all", "one_of", "none"),
reverse = FALSE,
eventlog = deprecated()
)
Arguments
log |
|
antecedents, consequents |
|
precedence_type |
|
filter_method |
|
reverse |
|
eventlog |
Details
In order to extract a subset of an event log which conforms with a set of precedence rules, one can use the filter_precedence method.
There are two types of precendence relations which can be tested: activities that should directly follow ("directly_follows") each other,
or activities that should eventually follow ("eventually_follows") each other. The type can be set with the precedence_type argument.
Further, the filter requires a vector of one or more antecedents (containing activity labels), and one or more consequents.
Finally, a filter_method argument can be set. This argument is relevant when there is more than one antecedent or consequent.
In such a case, you can specify that all possible precedence combinations must be present ("all"),
at least one of them ("one_of"), or none ("none").
Value
When given an object of type log, it will return a filtered log.
When given an object of type grouped_log, the filter will be applied in a stratified way (i.e. each separately for each group).
The returned log will be grouped on the same variables as the original log.
Methods (by class)
-
filter_precedence(log): Filters cases for alog. -
filter_precedence(grouped_log): Filters cases for agrouped_log.
References
Swennen, M. (2018). Using Event Log Knowledge to Support Operational Exellence Techniques (Doctoral dissertation). Hasselt University.
See Also
Other filters:
filter_activity_frequency(),
filter_activity_instance(),
filter_activity_presence(),
filter_activity(),
filter_case_condition(),
filter_case(),
filter_endpoints_condition(),
filter_endpoints(),
filter_flow_time(),
filter_idle_time(),
filter_infrequent_flows(),
filter_lifecycle_presence(),
filter_lifecycle(),
filter_precedence_condition(),
filter_precedence_resource(),
filter_processing_time(),
filter_resource_frequency(),
filter_resource(),
filter_throughput_time(),
filter_time_period(),
filter_trace_frequency(),
filter_trace_length(),
filter_trace(),
filter_trim_lifecycle(),
filter_trim()
Examples
eventdataR::patients %>%
filter_precedence(antecedents = "Triage and Assessment",
consequents = "Blood test",
precedence_type = "directly_follows") %>%
bupaR::traces()
eventdataR::patients %>%
filter_precedence(antecedents = "Triage and Assessment",
consequents = c("Blood test", "X-Ray", "MRI SCAN"),
precedence_type = "eventually_follows",
filter_method = "one_of") %>%
bupaR::traces()