pm4py.util.compression.util module#
- pm4py.util.compression.util.is_polars_lazyframe(df: Any) bool[source]#
Return True if the provided dataframe is a Polars LazyFrame.
- pm4py.util.compression.util.project_univariate(log: EventLog | DataFrame, key: str = 'concept:name', df_glue: str = 'case:concept:name', df_sorting_criterion_key='time:timestamp') List[List[Any]] | None[source]#
Projects an event log to a univariate list of values For example, an event log of the form [[(‘concept:name’:A,’k1’:v1,’k2’:v2),(‘concept:name’:B,’k1’:v3,’k2’:v4),…],…] is converted to [[‘A’,’B’,…],…]
The method returns the compressed log
- Return type:
UCL- Parameters:
log – log to compress (either EventLog or Dataframe)
key – key to use for compression
df_glue – key to use for combining events into traces when the input is a dataframe.
df_sorting_criterion_key – key to use as a sorting criterion for traces (typically timestamps)
- pm4py.util.compression.util.discover_dfg(log: List[List[Any]] | List[List[Tuple[Any]]], index: int = 0) DirectlyFollowsGraph[source]#
Discover a DFG object from a compressed event log (either univariate or multivariate) The DFG object represents a counter of integer pairs
- Return type:
Counter[Tuple[int, int]]- Parameters:
log – compressed event log (either uni or multivariate)
indes – index to use for dfg discovery in case of using an multivariate log
- pm4py.util.compression.util.discover_dfg_uvcl(log: Counter[Tuple[Any]]) DirectlyFollowsGraph[source]#
- pm4py.util.compression.util.get_start_activities(log: List[List[Any]] | List[List[Tuple[Any]]] | Counter[Tuple[Any]], index: int = 0) Counter[Any][source]#
- pm4py.util.compression.util.get_end_activities(log: List[List[Any]] | List[List[Tuple[Any]]] | Counter[Tuple[Any]], index: int = 0) Counter[Any][source]#