项目作者: bupaverse

项目描述 :
Heuristics Miner in R and integrated with the bupaR framework.
高级语言: R
项目地址: git://github.com/bupaverse/heuristicsmineR.git
创建时间: 2019-01-26T19:07:35Z
项目社区:https://github.com/bupaverse/heuristicsmineR

开源协议:Other

下载


Process discovery with variants of the Heuristics Miner algorithm


CRAN\_Status\_Badge
Travis-CI Build Status

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:

  1. install.packages("heuristicsmineR")

You can install the development version of heuristicsmineR with:

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

Example

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

  1. library(heuristicsmineR)
  2. library(eventdataR)
  3. data(patients)
  4. # Dependency graph / matrix
  5. dependency_matrix(patients)
  6. # Causal graph / Heuristics net
  7. 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:

  1. # Efficient precedence matrix
  2. m <- precedence_matrix_absolute(L_heur_1)
  3. as.matrix(m)
  4. # Example from Process mining book
  5. dependency_matrix(L_heur_1, threshold = .7)
  6. 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):

  1. # Convert to Petri net
  2. library(petrinetR)
  3. cn <- causal_net(L_heur_1, threshold = .7)
  4. pn <- as.petrinet(cn)
  5. 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):

  1. library(pm4py)
  2. conformance_alignment(L_heur_1, pn,
  3. initial_marking = pn$marking,
  4. final_marking = c("p_in_6"))