pm4py.llm.abstract_log_features#
- pm4py.llm.abstract_log_features(log_obj: DataFrame | EventLog | EventStream, max_len: int = 10000, include_header: bool = True, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name') str[source]#
Abstracts the machine learning features obtained from a log by reporting the top features until the desired length is achieved.
- Return type:
str- Parameters:
log_obj – The log object from which to extract features.
max_len (
int) – Maximum length of the string abstraction (default: constants.OPENAI_MAX_LEN).include_header (
bool) – Whether to include a header in the abstraction.activity_key (
str) – The column name to be used as activity.timestamp_key (
str) – The column name to be used as timestamp.case_id_key (
str) – The column name to be used as case identifier.
- Returns:
The log features abstraction as a string.
import pm4py log = pm4py.read_xes("tests/input_data/roadtraffic100traces.xes") print(pm4py.llm.abstract_log_features(log))