pm4py.algo.transformation.log_to_features.variants.event_based module#
- class pm4py.algo.transformation.log_to_features.variants.event_based.Parameters(*values)[source]#
Bases:
Enum- STR_EVENT_ATTRIBUTES = 'str_ev_attr'#
- NUM_EVENT_ATTRIBUTES = 'num_ev_attr'#
- FEATURE_NAMES = 'feature_names'#
- MIN_NUM_DIFF_STR_VALUES = 'min_num_diff_str_values'#
- MAX_NUM_DIFF_STR_VALUES = 'max_num_diff_str_values'#
- pm4py.algo.transformation.log_to_features.variants.event_based.extract_all_ev_features_names_from_log(log: EventLog, str_ev_attr: List[str], num_ev_attr: List[str], parameters: Dict[str | Parameters, Any] | None = None) List[str][source]#
Extracts the feature names from an event log.
- Parameters:
log – Event log
str_ev_attr – (if provided) list of string event attributes to consider in extracting the feature names
num_ev_attr – (if provided) list of integer event attributes to consider in extracting the feature names
parameters –
- Parameters, including:
MIN_NUM_DIFF_STR_VALUES => minimum number of distinct values to include an attribute as feature(s)
MAX_NUM_DIFF_STR_VALUES => maximum number of distinct values to include an attribute as feature(s)
- Returns:
List of feature names
- Return type:
feature_names
- pm4py.algo.transformation.log_to_features.variants.event_based.extract_features(log: EventLog, feature_names: List[str], parameters: Dict[str | Parameters, Any] | None = None) Tuple[Any, List[str]][source]#
Extracts the matrix of the features from an event log
- Parameters:
log – Event log
feature_names – Features to consider (in the given order)
- Returns:
data – Data to provide for decision tree learning
feature_names – Names of the features, in order
- pm4py.algo.transformation.log_to_features.variants.event_based.apply(log: EventLog, parameters: Dict[str | Parameters, Any] | None = None) Tuple[Any, List[str]][source]#
Extracts all the features for the traces of an event log (each trace becomes a vector of vectors, where each event has its own vector)
- Parameters:
log – Event log
parameters –
- Parameters of the algorithm, including:
STR_EVENT_ATTRIBUTES => string event attributes to consider in the features extraction
NUM_EVENT_ATTRIBUTES => numeric event attributes to consider in the features extraction
FEATURE_NAMES => features to consider (in the given order)
- Returns:
data – Data to provide for decision tree learning
feature_names – Names of the features, in order