pm4py.statistics.traces.generic.log package¶
Submodules¶
pm4py.statistics.traces.generic.log.case_arrival module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.statistics.traces.generic.log.case_arrival.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
ATTRIBUTE_KEY= 'pm4py:param:attribute_key'¶
-
BUSINESS_HOURS= 'business_hours'¶
-
CASE_ID_KEY= 'pm4py:param:case_id_key'¶
-
TIMESTAMP_KEY= 'pm4py:param:timestamp_key'¶
-
WEEKENDS= 'weekends'¶
-
WORKCALENDAR= 'workcalendar'¶
-
WORKTIMING= 'worktiming'¶
-
-
pm4py.statistics.traces.generic.log.case_arrival.get_case_arrival_avg(log: pm4py.objects.log.obj.EventLog, parameters: Optional[Dict[Union[str, pm4py.statistics.traces.generic.log.case_arrival.Parameters], Any]] = None) → float[source]¶ Gets the average time interlapsed between case starts
Parameters: log – Trace log
parameters –
- Parameters of the algorithm, including:
Parameters.TIMESTAMP_KEY -> attribute of the log to be used as timestamp
Returns: Average time interlapsed between case starts
Return type: case_arrival_avg
-
pm4py.statistics.traces.generic.log.case_arrival.get_case_dispersion_avg(log: pm4py.objects.log.obj.EventLog, parameters: Optional[Dict[Union[str, pm4py.statistics.traces.generic.log.case_arrival.Parameters], Any]] = None) → float[source]¶ Gets the average time interlapsed between case ends
Parameters: log – Trace log
parameters –
- Parameters of the algorithm, including:
Parameters.TIMESTAMP_KEY -> attribute of the log to be used as timestamp
Returns: Average time interlapsed between the completion of cases
Return type: case_dispersion_avg
pm4py.statistics.traces.generic.log.case_statistics module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.statistics.traces.generic.log.case_statistics.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
ATTRIBUTE_KEY= 'pm4py:param:attribute_key'¶
-
BUSINESS_HOURS= 'business_hours'¶
-
CASE_ID_KEY= 'pm4py:param:case_id_key'¶
-
ENABLE_SORT= 'enable_sort'¶
-
INDEXED_LOG= 'indexed_log'¶
-
MAX_RET_CASES= 'max_ret_cases'¶
-
MAX_VARIANTS_TO_RETURN= 'max_variants_to_return'¶
-
SORT_ASCENDING= 'sort_ascending'¶
-
SORT_BY_INDEX= 'sort_by_index'¶
-
TIMESTAMP_KEY= 'pm4py:param:timestamp_key'¶
-
VARIANTS= 'variants'¶
-
VAR_DURATIONS= 'var_durations'¶
-
WEEKENDS= 'weekends'¶
-
WORKCALENDAR= 'workcalendar'¶
-
WORKTIMING= 'worktiming'¶
-
-
pm4py.statistics.traces.generic.log.case_statistics.get_all_case_durations(log: pm4py.objects.log.obj.EventLog, parameters: Optional[Dict[Union[str, pm4py.statistics.traces.generic.log.case_statistics.Parameters], Any]] = None) → List[float][source]¶ Gets all the case durations out of the log
Parameters: - log – Log object
- parameters – Possible parameters of the algorithm
Returns: List of all duration values
Return type: duration_values
-
pm4py.statistics.traces.generic.log.case_statistics.get_all_casedurations(log, parameters=None)[source]¶ Deprecated since version 2.2.11: This will be removed in 3.0.0. please use get_all_case_durations instead
-
pm4py.statistics.traces.generic.log.case_statistics.get_cases_description(log: pm4py.objects.log.obj.EventLog, parameters: Optional[Dict[Union[str, pm4py.statistics.traces.generic.log.case_statistics.Parameters], Any]] = None) → Dict[str, Dict[str, Any]][source]¶ Get a description of traces present in the log
Parameters: log – Log
parameters – Parameters of the algorithm, including: Parameters.CASE_ID_KEY -> Trace attribute in which the case ID is contained Parameters.TIMESTAMP_KEY -> Column that identifies the timestamp Parameters.ENABLE_SORT -> Enable sorting of traces Parameters.SORT_BY_INDEX -> Sort the traces using this index:
0 -> case ID 1 -> start time 2 -> end time 3 -> difference
Parameters.SORT_ASCENDING -> Set sort direction (boolean; it true then the sort direction is ascending, otherwise descending) Parameters.MAX_RET_CASES -> Set the maximum number of returned traces
Returns: Dictionary of traces associated to their start timestamp, their end timestamp and their duration
Return type: ret
-
pm4py.statistics.traces.generic.log.case_statistics.get_events(log: pm4py.objects.log.obj.EventLog, case_id: str, parameters: Optional[Dict[Union[str, pm4py.statistics.traces.generic.log.case_statistics.Parameters], Any]] = None) → List[Dict[str, Any]][source]¶ Get events belonging to the specified case
Parameters: log – Log object
case_id – Required case ID
parameters –
- Possible parameters of the algorithm, including:
Parameters.CASE_ID_KEY -> Trace attribute in which the case ID is contained Parameters.INDEXED_LOG -> Indexed log (if it has been calculated previously)
Returns: List of events belonging to the case
Return type: list_eve
-
pm4py.statistics.traces.generic.log.case_statistics.get_first_quartile_case_duration(log: pm4py.objects.log.obj.EventLog, parameters: Optional[Dict[Union[str, pm4py.statistics.traces.generic.log.case_statistics.Parameters], Any]] = None) → float[source]¶ Gets the first quartile out of the log
Parameters: - log – Log
- parameters – Possible parameters of the algorithm
Returns: First quartile value
Return type: value
-
pm4py.statistics.traces.generic.log.case_statistics.get_first_quartile_caseduration(log, parameters=None)[source]¶ Deprecated since version 2.2.11: This will be removed in 3.0.0. please use get_first_quartile_case_duration instead
-
pm4py.statistics.traces.generic.log.case_statistics.get_kde_caseduration(log, parameters=None)[source]¶ Gets the estimation of KDE density for the case durations calculated on the log
Parameters: log – Log object
parameters –
- Possible parameters of the algorithm, including:
Parameters.GRAPH_POINTS -> number of points to include in the graph
Returns: - x – X-axis values to represent
- y – Y-axis values to represent
-
pm4py.statistics.traces.generic.log.case_statistics.get_kde_caseduration_json(log, parameters=None)[source]¶ Gets the estimation of KDE density for the case durations calculated on the log (expressed as JSON)
Parameters: log – Log object
parameters –
- Possible parameters of the algorithm, including:
Parameters.GRAPH_POINTS -> number of points to include in the graph Parameters.CASE_ID_KEY -> Column hosting the Case ID
Returns: JSON representing the graph points
Return type: json
-
pm4py.statistics.traces.generic.log.case_statistics.get_median_case_duration(log: pm4py.objects.log.obj.EventLog, parameters: Optional[Dict[Union[str, pm4py.statistics.traces.generic.log.case_statistics.Parameters], Any]] = None)[source]¶ Gets the median case duration out of the log
Parameters: - log – Log
- parameters – Possible parameters of the algorithm
Returns: Median duration value
Return type: value
-
pm4py.statistics.traces.generic.log.case_statistics.get_median_caseduration(log, parameters=None)[source]¶ Deprecated since version 2.2.11: This will be removed in 3.0.0. please use get_median_case_duration instead
-
pm4py.statistics.traces.generic.log.case_statistics.get_variant_statistics(log: pm4py.objects.log.obj.EventLog, parameters: Optional[Dict[Union[str, pm4py.statistics.traces.generic.log.case_statistics.Parameters], Any]] = None) → Union[List[Dict[str, int]], List[Dict[List[str], int]]][source]¶ Gets a dictionary whose key is the variant and as value there is the list of traces that share the variant
Parameters: log – Log
parameters –
- Parameters of the algorithm, including:
Parameters.ACTIVITY_KEY -> Attribute identifying the activity in the log Parameters.MAX_VARIANTS_TO_RETURN -> Maximum number of variants to return Parameters.VARIANT -> If provided, avoid recalculation of the variants
Returns: List of variants along the statistics
Return type: variants_list
-
pm4py.statistics.traces.generic.log.case_statistics.index_log_caseid(log, parameters=None)[source]¶ Index a log according to case ID
Parameters: log – Log object
parameters –
- Possible parameters of the algorithm, including:
Parameters.CASE_ID_KEY -> Trace attribute in which the Case ID is contained
Returns: Dictionary that has the case IDs as keys and the corresponding case as value
Return type: dict
Module contents¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.