pygraphistry icon indicating copy to clipboard operation
pygraphistry copied to clipboard

[FEA] hypergraph Directly Follows edges for process mining

Open lmeyerov opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe.

We should be able to create Event Graphs for process mining: https://towardsdatascience.com/introduction-to-process-mining-5f4ce985b7e5

The main missing piece seems to be a flag for Directly Follows

Describe the solution you'd like

hypergraph(df, cols, directly_follows=True, direct=False) # links successive event nodes
hypergraph(df, cols, directly_follows=True, direct=True) # links entities of successive event nodes
  • [ ] Default off hypergraph param directly_follows
  • [ ] When direct=False: creates new event=>event edges of type directly_follows
  • [ ] When direct=True: creates new entity=>entity edges of type directly_follows
  • [ ] int64 column directly_follows_step
  • [ ] Should work for all engines
  • [ ] Tested
  • [ ] Documented
  • [ ] Tutorial

Describe alternatives you've considered

  • We should check libraries for additional common shapes

  • Additional options:

directly_follows_step_offset=0 # initial number to count from
directly_follows_attributed=True # control whether to add some/all attrs
directly_follows_ordering_dimension='some_col' # default to current order
directly_follows_max_threshold='30s' # only link if next even in a threshold, default=None
directly_follows_predicate=lambda (prev, next): True # only link when True

lmeyerov avatar Nov 02 '21 14:11 lmeyerov