Learn R Programming

Process discovery with variants of the Heuristics Miner algorithm

Discover process models with the Heuristics Miner

Discovery of process models from event logs based on the Heuristics Miner algorithm integrated into the bupaR framework.

Installation

You can install the release CRAN version with:

install.packages("heuristicsmineR")

You can install the development version of heuristicsmineR with:

source("https://install-github.me/r-lib/remotes")
remotes::install_github("bupaverse/heuristicsmineR")

Example

This is a basic usage example discovering the Causal net of the patients event log:

library(heuristicsmineR)
library(eventdataR)
data(patients)

# Dependency graph / matrix
dependency_matrix(patients)
# Causal graph / Heuristics net
causal_net(patients)

This discovers the Causal net of the built-in L_heur_1 event log that was proposed in the book Process Mining: Data Science in Action:

# Efficient precedence matrix
m <- precedence_matrix_absolute(L_heur_1)
as.matrix(m)

# Example from Process mining book
dependency_matrix(L_heur_1, threshold = .7)
causal_net(L_heur_1, threshold = .7)

The Causal net can be converted to a Petri net (note that there are some unnecessary invisible transition that are not yet removed):

# Convert to Petri net
library(petrinetR)
cn <- causal_net(L_heur_1, threshold = .7)
pn <- as.petrinet(cn)
render_PN(pn)

The Petri net can be further used, for example for conformance checking through the pm4py package (Note that the final marking is currently not saved in petrinetR):

library(pm4py)
conformance_alignment(L_heur_1, pn, 
                      initial_marking = pn$marking, 
                      final_marking = c("p_in_6"))

Copy Link

Version

Install

install.packages('heuristicsmineR')

Monthly Downloads

341

Version

0.3.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Felix Mannhardt

Last Published

April 4th, 2023

Functions in heuristicsmineR (0.3.0)

print.causal_net

Generic print function for a Causal net
precedence_matrix_length_two_loops

Length Two Loop Precedence Matrix
parallel_matrix_lifecycle

Parallel Matrix with Lifecycle
render_causal_net

Renders a Causal net as graph
print.dependency_matrix

Generic print function for a dependency matrix
dependency_type_lifecycle

Dependency type based on time intervals
hospital_multi_perspective

Hospital example event log capturing multi-perspectives
render_dependency_matrix

Renders a dependency matrix as dependency graph
%>%

Pipe operator
as.petrinet

Converts the object to a Petrinet
causal_performance

Performance map profile
causal_bindings

Compute input and output bindings
causal_frequency

Frequency map profile
dependency_matrix

Create a dependency matrix
causal_net

Create a Causal net (also Heuristics net)
L_heur_2

Heuristics miner example log #2
dependency_type_fhm

Dependency type based on Flexible Heuristics Miner (FHM)
causal_custom

Custom map profile
precedence_matrix_lifecycle

Precedence Matrix with Lifecycle
precedence_matrix_absolute

Precedence Matrix
plot.dependency_matrix

Dependency matrix plot
L_heur_1

Heuristics miner example log #1
precedence_matrix

Precedence Matrix