pm4py.stats.get_stochastic_language#
- pm4py.stats.get_stochastic_language(*args, **kwargs) Dict[List[str], float] [source]#
Retrieves the stochastic language from the provided object.
The stochastic language represents the probabilities of different traces or sequences within the process.
- Parameters:
args – The input object, which can be a pandas DataFrame, EventLog, accepting Petri net, or ProcessTree.
kwargs – Additional keyword arguments.
- Returns:
A dictionary mapping sequences of activities to their probabilities.
import pm4py # From an event log log = pm4py.read_xes('tests/input_data/running-example.xes') language_log = pm4py.get_stochastic_language(log) print(language_log) # From a Petri net net, im, fm = pm4py.read_pnml('tests/input_data/running-example.pnml') language_model = pm4py.get_stochastic_language(net, im, fm) print(language_model)