pm4py.objects.stochastic_petri package#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions Contact: info@processintelligence.solutions
Submodules#
pm4py.objects.stochastic_petri.ctmc module#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions Contact: info@processintelligence.solutions
- pm4py.objects.stochastic_petri.ctmc.get_corr_hex(num)[source]#
Gets correspondence between a number and an hexadecimal string
Parameters#
- num
Number
Returns#
- hex_string
Hexadecimal string
- pm4py.objects.stochastic_petri.ctmc.get_color_from_probabilities(prob_dictionary)[source]#
Returns colors from a dictionary of probabilities
Parameters#
- prob_dictionary
Dictionary of probabilities
Returns#
- color_dictionary
Dictionary of colors
- pm4py.objects.stochastic_petri.ctmc.get_tangible_reachability_and_q_matrix_from_dfg_performance(dfg_performance, invisible_firing_rate=1000.0, parameters=None)[source]#
Get the tangible reachability graph and the Q matrix from the performance DFG
Parameters#
- dfg_performance
Performance DFG
- invisible_firing_rate
Firing rate for invisible transitions
- parameters
Parameters
Returns#
- reachab_graph
Reachability graph
- tangible_reach_graph
Tangible reachability graph
- stochastic_info
Stochastic information
- q_matrix
Q-matrix from the tangible reachability graph
- pm4py.objects.stochastic_petri.ctmc.get_tangible_reachability_and_q_matrix_from_log_net(log, net, im, fm, parameters=None)[source]#
Gets the tangible reachability graph from a log and an accepting Petri net
Parameters#
- log
Event log
- net
Petri net
- im
Initial marking
- fm
Final marking
Returns#
- reachab_graph
Reachability graph
- tangible_reach_graph
Tangible reachability graph
- stochastic_info
Stochastic information
- q_matrix
Q-matrix from the tangible reachability graph
- pm4py.objects.stochastic_petri.ctmc.transient_analysis_from_petri_net_and_smap(net, im, s_map, delay, parameters=None)[source]#
Gets the transient analysis from a Petri net, a stochastic map and a delay
Parameters#
- log
Event log
- delay
Time delay
- parameters
Parameters of the algorithm
Returns#
- transient_result
Transient analysis result
- pm4py.objects.stochastic_petri.ctmc.get_q_matrix_from_tangible_exponential(tangible_reach_graph, stochastic_info)[source]#
Gets Q matrix from tangible reachability graph and stochastic map where the distribution type has been forced to be exponential
Parameters#
- tangible_reach_graph
Tangible reachability graph
- stochastic_info
Stochastic map for each transition
Returns#
- q_matrix
Q-matrix from the tangible reachability graph
- pm4py.objects.stochastic_petri.ctmc.transient_analysis_from_tangible_q_matrix_and_single_state(tangible_reach_graph, q_matrix, source_state, time_diff)[source]#
Do transient analysis from tangible reachability graph, Q matrix and a single state to start from
Parameters#
- tangible_reach_graph
Tangible reachability graph
- q_matrix
Q matrix
- source_state
Source state to consider
- time_diff
Time interval we want to investigate
Returns#
- transient_result
Transient analysis result
- pm4py.objects.stochastic_petri.ctmc.transient_analysis_from_tangible_q_matrix_and_states_vector(tangible_reach_graph, q_matrix, states_vector, time_diff)[source]#
Do transient analysis from tangible reachability graph, Q matrix and a vector of probability of states
Parameters#
- tangible_reach_graph
Tangible reachability graph
- q_matrix
Q matrix
- states_vector
Vector of states probabilities to start from
- time_diff
Time interval we want to investigate
Returns#
- transient_result
Transient analysis result
- pm4py.objects.stochastic_petri.ctmc.nullspace(a_matrix, atol=1e-13, rtol=0)[source]#
Compute an approximate basis for the nullspace of A.
The algorithm used by this function is based on the singular value decomposition of A.
Parameters#
- a_matrixndarray
A should be at most 2-D. A 1-D array with length k will be treated as a 2-D with shape (1, k)
- atolfloat
The absolute tolerance for a zero singular value. Singular values smaller than atol are considered to be zero.
- rtolfloat
The relative tolerance. Singular values less than rtol*smax are considered to be zero, where smax is the largest singular value.
If both atol and rtol are positive, the combined tolerance is the maximum of the two; that is:
tol = max(atol, rtol * smax)
Singular values smaller than tol are considered to be zero.
Returns#
- nsndarray
If A is an array with shape (m, k), then ns will be an array with shape (k, n), where n is the estimated dimension of the nullspace of A. The columns of ns are a basis for the nullspace; each element in numpy.dot(A, ns) will be approximately zero.
pm4py.objects.stochastic_petri.tangible_reachability module#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions Contact: info@processintelligence.solutions
- pm4py.objects.stochastic_petri.tangible_reachability.get_tangible_reachability_from_log_net_im_fm(log, net, im, fm, parameters=None)[source]#
Gets the tangible reachability graph from a log and an accepting Petri net
Parameters#
- log
Event log
- net
Petri net
- im
Initial marking
- fm
Final marking
Returns#
- reachab_graph
Reachability graph
- tangible_reach_graph
Tangible reachability graph
- stochastic_info
Stochastic information
- pm4py.objects.stochastic_petri.tangible_reachability.get_tangible_reachability_from_net_im_sinfo(net, im, stochastic_info, parameters=None)[source]#
Gets the tangible reacahbility graph from a Petri net, an initial marking and a stochastic map
Parameters#
- net
Petri net
- im
Initial marking
- fm
Final marking
- stochastic_info
Stochastic information
Returns#
- reachab_graph
Reachability graph
- tangible_reach_graph
Tangible reachability graph
- pm4py.objects.stochastic_petri.tangible_reachability.get_tangible_reachability_from_reachability(reach_graph, stochastic_info)[source]#
Gets the tangible reachability graph from the reachability graph and the stochastic transition map
Parameters#
- reach_graph
Reachability graph
- stochastic_info
Stochastic information
Returns#
- tangible_reach_graph
Tangible reachability graph
pm4py.objects.stochastic_petri.utils module#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions Contact: info@processintelligence.solutions