pm4py.algo.transformation.log_to_features.algorithm module#

class pm4py.algo.transformation.log_to_features.algorithm.Variants(*values)[source]#

Bases: Enum

EVENT_BASED = <module 'pm4py.algo.transformation.log_to_features.variants.event_based' from '/Users/chris/Desktop/PIS/pm4py2/pm4py/pm4py/algo/transformation/log_to_features/variants/event_based.py'>#
TRACE_BASED = <module 'pm4py.algo.transformation.log_to_features.variants.trace_based' from '/Users/chris/Desktop/PIS/pm4py2/pm4py/pm4py/algo/transformation/log_to_features/variants/trace_based.py'>#
TEMPORAL = <module 'pm4py.algo.transformation.log_to_features.variants.temporal' from '/Users/chris/Desktop/PIS/pm4py2/pm4py/pm4py/algo/transformation/log_to_features/variants/temporal.py'>#
pm4py.algo.transformation.log_to_features.algorithm.apply(log: EventLog | DataFrame | EventStream, variant: Any = Variants.TRACE_BASED, parameters: Dict[Any, Any] | None = None) Tuple[Any, List[str]][source]#

Extracts the features from a log object

Parameters:
  • log – Event log

  • variant – Variant of the feature extraction to use: - Variants.EVENT_BASED => (default) extracts, for each trace, a list of numerical vectors containing for each

    event the corresponding features

    • Variants.TRACE_BASED => extracts for each trace a single numerical vector containing the features

      of the trace

    • Variants.TEMPORAL => extracts temporal features from the traditional event log

Returns:

  • data – Data to provide for decision tree learning

  • feature_names – Names of the features, in order