pm4py.algo.transformation.log_to_features.variants.temporal module#
- class pm4py.algo.transformation.log_to_features.variants.temporal.Parameters(*values)[source]#
Bases:
Enum- ARRIVAL_RATE = 'arrival_rate'#
- FINISH_RATE = 'finish_rate'#
- CASE_ID_COLUMN = 'pm4py:param:case_id_key'#
- START_TIMESTAMP_COLUMN = 'pm4py:param:start_timestamp_key'#
- TIMESTAMP_COLUMN = 'pm4py:param:timestamp_key'#
- RESOURCE_COLUMN = 'pm4py:param:resource_key'#
- ACTIVITY_COLUMN = 'pm4py:param:activity_key'#
- GROUPER_FREQ = 'grouper_freq'#
- SERVICE_TIME = 'service_time'#
- WAITING_TIME = 'waiting_time'#
- SOJOURN_TIME = 'sojourn_time'#
- DIFF_START_END = 'diff_start_end'#
- pm4py.algo.transformation.log_to_features.variants.temporal.apply(log: EventLog | EventStream | DataFrame, parameters: Dict[Any, Any] | None = None) DataFrame[source]#
Extracts temporal features with the provided granularity from the Pandas dataframe.
Implements the approach described in the paper: Pourbafrani, Mahsa, Sebastiaan J. van Zelst, and Wil MP van der Aalst. “Supporting automatic system dynamics model generation for simulation in the context of process mining.” International Conference on Business Information Systems. Springer, Cham, 2020.
- Parameters:
log – Event log / Event stream / Pandas dataframe
parameters – Parameters of the algorithm, including: - Parameters.GROUPER_FREQ => the time interval to be used for the grouping - Parameters.ARRIVAL_RATE => column of the dataframe which is going to host the arrival rate - Parameters.FINISH_RATE => column of the dataframe which is going to host the finishing rate - Parameters.SERVICE_TIME => column of the dataframe which is going to host the service time - Parameters.WAITING_TIME => column of the dataframe which is going to host the waiting time - Parameters.SOJOURN_TIME => column of the dataframe which is going to host the sojourn time - Parameters.CASE_ID_COLUMN => case ID column in the dataframe (default: case:concept:name) - Parameters.ACTIVITY_COLUMN => activity column in the dataframe (default: concept:name) - Parameters.TIMESTAMP_COLUMN => timestamp column in the dataframe (default: time:timestamp) - Parameters.RESOURCE_COLUMN => resource column in the dataframe (default: org:resource) - Parameters.START_TIMESTAMP_COLUMN => start timestamp column in the dataframe (if not provided, the timestamp column is used)
- Returns:
Dataframe with temporal features
- Return type:
features_df