Modalities package
Submodules
sax.core.causal_process_discovery.modalities.base_anchor module
- class sax.core.causal_process_discovery.modalities.base_anchor.BaseAnchor
Bases:
object
Parent class for all causal discovery modalities. Please extend this class to add more modalities. Different modalities are described here <>
- abstract apply(dataObject: RawEventData, variant: Algorithm | None = Algorithm.POSITIVE_LINGAM, prior_knowledge: bool | None = False, threshold: float | None = 0.5) CausalResultInfo
Apply the chosen algorithm variant with the current modality on the process data object.
- Parameters:
dataObject (RawEventData) -- event log
variant (Optional[Algorithm], optional) -- the chosen algorithm variant to apply, defaults to LINGAM
- Returns:
causal discovery result
- Return type:
sax.core.causal_process_discovery.modalities.chain_anchor module
- class sax.core.causal_process_discovery.modalities.chain_anchor.ChainAnchorTransformer
Bases:
BaseAnchor
Causal chain modality transformer - transforms process data object from event log format to a tabular format which represents each activity as a column in the data frame, where the value of the column is the accumulated duration of this activity from trace start time. The chain modality is described here <>
- apply(dataObject: RawEventData, variant: Algorithm | None = Algorithm.POSITIVE_LINGAM, prior_knowledge: bool | None = False, threshold: float | None = 0.5) CausalResultInfo
Transform raw event log in tabular form (the provided event log) to row format, so that each trace is represented by a row and each activity column value holds the accimulated duration from trace start time. After the transformation, applies the chosen causal discovery algorithm variant to discover causal execution dependencies among chained durations.
- Parameters:
dataObject (RawEventData) -- event log
variant (Optional[Algorithm], optional) -- algorithm variant to apply, defaults to LINGAM
prior_knowledge (Optional[bool], optional) -- whether to apply prior knowledge, defaults to False
- Raises:
TypeError -- _description_
- Returns:
_description_
- Return type:
sax.core.causal_process_discovery.modalities.parent_anchor module
- class sax.core.causal_process_discovery.modalities.parent_anchor.ParentAnchorTransformer
Bases:
BaseAnchor
Parent Causal Modality - methods to apply causal discovery on event log with PARENT modality
- apply(dataObject: RawEventData, variant: Algorithm | None = Algorithm.POSITIVE_LINGAM, prior_knowledge: bool | None = False, depth: int = 1) CausalResultInfo
Transpose the original event log so that each column is activity name and the value is the timestamp of the activity. Calculate all possible pairs of activities within this process and all its variants which happen one after the other. For each part, across all variants holding this pair, compute the time diff with the parent activity of the pair. Apply causal discovery algorithm of the subframe defined by the parent activity and the pair of activities and the time diff between them. This will be a single coefficient in the adjacenty matrix of the whole process. At the end create global adjacency matrix out of all coefficients.
Parameters
- dataObjectRawEventData
event log data object
- variantOptional[Algorithm], optional
algorithm variant to apply, defaults to LINGAM
- prior_knowledgeOptional[bool], optional
whether to apply prior knowledge, defaults to False
- depthint, optional
depth of the distance between activities to consider as pair, defaults to 1
Raises
- TypeError
The method can be applied only to an object of type RawEventData!
Returns
- CausalResultInfo
causal discovery result