Filters cases based on the precedence relations between two sets of activities.
filter_precedence(eventlog, antecedents, consequents, precedence_type, filter_method, reverse) # S3 method for eventlog filter_precedence(eventlog, antecedents, consequents, precedence_type = c("directly_follows", "eventually_follows"), filter_method = c("all", "one_of", "none"), reverse = FALSE) # S3 method for grouped_eventlog filter_precedence(eventlog, antecedents, consequents, precedence_type = c("directly_follows", "eventually_follows"), filter_method = c("all", "one_of", "none"), reverse = FALSE) ifilter_precedence(eventlog)
The dataset to be used. Should be a (grouped) eventlog object.
The set of antecendent and consequent activities. Both are character vectors containing at leaste one activity identifier. All pairs of antecedents and consequents are turned into seperate precedence rules.
Logical, indicating whether the selection should be reversed.
When given an eventlog, it will return a filtered eventlog. When given a grouped eventlog, the filter will be applied in a stratified way (i.e. each separately for each group). The returned eventlog will be grouped on the same variables as the original event log.
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 each other, or activities that should eventually follow 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, also 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).
eventlog: Filter event log
grouped_eventlog: Filter grouped event log