pm4py.algo.enhancement.resource_profiles.variants package

Submodules

pm4py.algo.enhancement.resource_profiles.variants.log 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.algo.enhancement.resource_profiles.variants.log.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
CASE_ID_KEY = 'pm4py:param:case_id_key'
RESOURCE_KEY = 'pm4py:param:resource_key'
START_TIMESTAMP_KEY = 'pm4py:param:start_timestamp_key'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
pm4py.algo.enhancement.resource_profiles.variants.log.activity_completions(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) int[source]

The number of activity instances completed by a given resource during a given time slot.

Metric RBI 2.1 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.log.activity_frequency(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, a: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) float[source]

Fraction of completions of a given activity a, by a given resource r, during a given time slot, [t1, t2), with respect to the total number of activity completions by resource r during [t1, t2)

Metric RBI 1.3 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

  • a – Activity

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.log.average_case_duration(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) float[source]

The average duration of cases completed during a given time slot in which a given resource was involved.

Metric RBI 4.4 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.log.average_duration_activity(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, a: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) float[source]

The average duration of instances of a given activity completed during a given time slot by a given resource.

Metric RBI 4.3 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

  • a – Activity

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.log.average_workload(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) float[source]

The average number of activities started by a given resource but not completed at a moment in time.

Metric RBI 2.4 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.log.case_completions(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) int[source]

The number of cases completed during a given time slot in which a given resource was involved.

Metric RBI 2.2 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.log.distinct_activities(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) int[source]

Number of distinct activities done by a resource in a given time interval [t1, t2)

Metric RBI 1.1 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Distinct activities

Return type

distinct_activities

pm4py.algo.enhancement.resource_profiles.variants.log.fraction_case_completions(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) float[source]

The fraction of cases completed during a given time slot in which a given resource was involved with respect to the total number of cases completed during the time slot.

Metric RBI 2.3 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.log.get_dt_from_string(dt: Union[datetime.datetime, str]) datetime.datetime[source]

If the date is expressed as string, do the conversion to a datetime.datetime object

Parameters

dt – Date (string or datetime.datetime)

Returns

Datetime object

Return type

dt

pm4py.algo.enhancement.resource_profiles.variants.log.interaction_two_resources(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r1: str, r2: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) float[source]

The number of cases completed during a given time slot in which two given resources were involved.

Metric RBI 5.1 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r1 – Resource 1

  • r2 – Resource 2

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.log.multitasking(log: pm4py.objects.log.obj.EventLog, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) float[source]

The fraction of active time during which a given resource is involved in more than one activity with respect to the resource’s active time.

Metric RBI 3.1 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • log – Event log

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.log.social_position(log: pm4py.objects.log.obj.EventLog, t1_0: Union[datetime.datetime, str], t2_0: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.log.Parameters], Any]] = None) float[source]

The fraction of resources involved in the same cases with a given resource during a given time slot with respect to the total number of resources active during the time slot.

Metric RBI 5.2 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1_0 – Left interval

  • t2_0 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas 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.algo.enhancement.resource_profiles.variants.pandas.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
CASE_ID_KEY = 'pm4py:param:case_id_key'
RESOURCE_KEY = 'pm4py:param:resource_key'
START_TIMESTAMP_KEY = 'pm4py:param:start_timestamp_key'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
pm4py.algo.enhancement.resource_profiles.variants.pandas.activity_completions(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) int[source]

The number of activity instances completed by a given resource during a given time slot.

Metric RBI 2.1 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas.activity_frequency(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, a: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) float[source]

Fraction of completions of a given activity a, by a given resource r, during a given time slot, [t1, t2), with respect to the total number of activity completions by resource r during [t1, t2)

Metric RBI 1.3 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

  • a – Activity

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas.average_case_duration(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) float[source]

The average duration of cases completed during a given time slot in which a given resource was involved.

Metric RBI 4.4 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas.average_duration_activity(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, a: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) float[source]

The average duration of instances of a given activity completed during a given time slot by a given resource.

Metric RBI 4.3 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

  • a – Activity

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas.average_workload(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) float[source]

The average number of activities started by a given resource but not completed at a moment in time.

Metric RBI 2.4 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas.case_completions(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) int[source]

The number of cases completed during a given time slot in which a given resource was involved.

Metric RBI 2.2 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas.distinct_activities(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) int[source]

Number of distinct activities done by a resource in a given time interval [t1, t2)

Metric RBI 1.1 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Distinct activities

Return type

distinct_activities

pm4py.algo.enhancement.resource_profiles.variants.pandas.fraction_case_completions(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) float[source]

The fraction of cases completed during a given time slot in which a given resource was involved with respect to the total number of cases completed during the time slot.

Metric RBI 2.3 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas.get_dt_from_string(dt: Union[datetime.datetime, str]) datetime.datetime[source]

If the date is expressed as string, do the conversion to a datetime.datetime object

Parameters

dt – Date (string or datetime.datetime)

Returns

Datetime object

Return type

dt

pm4py.algo.enhancement.resource_profiles.variants.pandas.interaction_two_resources(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r1: str, r2: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) float[source]

The number of cases completed during a given time slot in which two given resources were involved.

Metric RBI 5.1 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r1 – Resource 1

  • r2 – Resource 2

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas.multitasking(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) float[source]

The fraction of active time during which a given resource is involved in more than one activity with respect to the resource’s active time.

Metric RBI 3.1 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

pm4py.algo.enhancement.resource_profiles.variants.pandas.social_position(df: pandas.core.frame.DataFrame, t1: Union[datetime.datetime, str], t2: Union[datetime.datetime, str], r: str, parameters: Optional[Dict[Union[str, pm4py.algo.enhancement.resource_profiles.variants.pandas.Parameters], Any]] = None) float[source]

The fraction of resources involved in the same cases with a given resource during a given time slot with respect to the total number of resources active during the time slot.

Metric RBI 5.2 in Pika, Anastasiia, et al. “Mining resource profiles from event logs.” ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.

Parameters
  • df – Dataframe

  • t1 – Left interval

  • t2 – Right interval

  • r – Resource

Returns

Value of the metric

Return type

metric

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/>.