backend.conformance_checking.log_skeleton¶
Contains the LogSkeleton class.
This module is used to create a log skeleton from a given event log and to compute various metrics related to the log skeleton.
Classes¶
Represents a log skeleton. |
Module Contents¶
- class backend.conformance_checking.log_skeleton.LogSkeleton(log: pandas.DataFrame, case_id_col: str | None = None, activity_col: str | None = None, timestamp_col: str | None = None)¶
Represents a log skeleton.
- log¶
The event log.
- _skeleton¶
The log skeleton.
- case_id_col¶
The name of the case ID column. Only needed if the log is read as csv file.
- Type:
optional
- activity_col¶
The name of the activity column. Only needed if the log is read as csv file.
- Type:
optional
- timestamp_col¶
The name of the timestamp column. Only needed if the log is read as csv file.
- Type:
optional
- log: pandas.DataFrame¶
- case_id_col: str | None = None¶
- activity_col: str | None = None¶
- timestamp_col: str | None = None¶
- compute_skeleton(noise_thr: float = 0.0) None ¶
Computes the log skeleton.
- Parameters:
noise_thr – The noise threshold. Value between 0 and 1.
- check_conformance_traces(traces: pandas.DataFrame) List[Set[Any]] ¶
Computes the conformance of traces with the log skeleton.
- Parameters:
traces – A DataFrame containing the traces to be checked.
- Returns:
A list of sets containing the results of the conformance. The conformance checking results for each trace include: - Outputs.IS_FIT: boolean that tells if the trace is perfectly
fit according to the model.
- Outputs.DEV_FITNESS: deviation based fitness (between 0 and 1;
the more the trace is near to 1 the more fit is).
Outputs.DEVIATIONS: list of deviations in the model.
- get_equivalence_relation() Set[Tuple[str, str]] ¶
Returns the equivalence relation of the log skeleton.
- Returns:
A set of tuples representing two activities that are equivalent.
- get_always_after_relation() Set[Tuple[str, str]] ¶
Returns the always after relation of the log skeleton.
- Returns:
A set of tuples representing two activities where the first activity always happens before the second activity.
- get_always_before_relation() Set[Tuple[str, str]] ¶
Returns the always before relation of the log skeleton.
- Returns:
A set of tuples representing two activities where the first activity always happens after the second activity.
- get_never_together_relation() Set[Tuple[str, str]] ¶
Returns the never together relation of the log skeleton.
- Returns:
A set of tuples representing two activities that never happen together.
- get_activity_frequencies() Dict[str, Set[int]] ¶
Returns the activity frequencies.
For each activity, it returns the number of possible occurences per trace.
- Returns:
A dictionary where the keys are the activities and the values are sets of integers representing the number of possible occurences per trace.
- get_skeleton() Dict[str, Any] ¶
Returns the log skeleton.
- Returns:
The log skeleton.