Skip to content

General Indicators

process_performance_indicators.indicators.general.activities

activity_instance_count(event_log: pd.DataFrame, activity_name: str) -> int

The number of times that a specific activity has been instantiated in the event log.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
activity_name str

The name of the activity.

required
Source code in process_performance_indicators/indicators/general/activities.py
def activity_instance_count(event_log: pd.DataFrame, activity_name: str) -> int:
    """
    The number of times that a specific activity has been instantiated in the event log.

    Args:
        event_log: The event log.
        activity_name: The name of the activity.

    """
    return len(activities_utils.inst(event_log, activity_name))

human_resource_count(event_log: pd.DataFrame, activity_name: str) -> int

The number of human resources that are involved in the execution of the activity.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
activity_name str

The name of the activity.

required
Source code in process_performance_indicators/indicators/general/activities.py
def human_resource_count(event_log: pd.DataFrame, activity_name: str) -> int:
    """
    The number of human resources that are involved in the execution of the activity.

    Args:
        event_log: The event log.
        activity_name: The name of the activity.

    """
    return len(activities_utils.hres(event_log, activity_name))

resource_count(event_log: pd.DataFrame, activity_name: str) -> int

The number of resources that are involved in the execution of the activity.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
activity_name str

The name of the activity.

required
Source code in process_performance_indicators/indicators/general/activities.py
def resource_count(event_log: pd.DataFrame, activity_name: str) -> int:
    """
    The number of resources that are involved in the execution of the activity.

    Args:
        event_log: The event log.
        activity_name: The name of the activity.

    """
    return len(activities_utils.res(event_log, activity_name))

process_performance_indicators.indicators.general.cases

activity_count(event_log: pd.DataFrame, case_id: str) -> int

The number of activities that occur in the case.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_id str

The case id.

required
Source code in process_performance_indicators/indicators/general/cases.py
def activity_count(event_log: pd.DataFrame, case_id: str) -> int:
    """
    The number of activities that occur in the case.

    Args:
        event_log: The event log.
        case_id: The case id.

    """
    return len(cases_utils.act(event_log, case_id))

activity_instance_count(event_log: pd.DataFrame, case_id: str) -> int

The number of times that any activity has been instantiated in the case.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_id str

The case id.

required
Source code in process_performance_indicators/indicators/general/cases.py
def activity_instance_count(event_log: pd.DataFrame, case_id: str) -> int:
    """
    The number of times that any activity has been instantiated in the case.

    Args:
        event_log: The event log.
        case_id: The case id.

    """
    return len(cases_utils.inst(event_log, case_id))

human_resource_count(event_log: pd.DataFrame, case_id: str) -> int

The number of human resources that are involved in the execution of the case.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_id str

The case id.

required
Source code in process_performance_indicators/indicators/general/cases.py
def human_resource_count(event_log: pd.DataFrame, case_id: str) -> int:
    """
    The number of human resources that are involved in the execution of the case.

    Args:
        event_log: The event log.
        case_id: The case id.

    """
    return len(cases_utils.hres(event_log, case_id))

resource_count(event_log: pd.DataFrame, case_id: str) -> int

The number of resources that are involved in the execution of the case.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_id str

The case id.

required
Source code in process_performance_indicators/indicators/general/cases.py
def resource_count(event_log: pd.DataFrame, case_id: str) -> int:
    """
    The number of resources that are involved in the execution of the case.

    Args:
        event_log: The event log.
        case_id: The case id.

    """
    return len(cases_utils.res(event_log, case_id))

role_count(event_log: pd.DataFrame, case_id: str) -> int

The number of human resource roles that are involved in the execution of the case.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_id str

The case id.

required
Source code in process_performance_indicators/indicators/general/cases.py
def role_count(event_log: pd.DataFrame, case_id: str) -> int:
    """
    The number of human resource roles that are involved in the execution of the case.

    Args:
        event_log: The event log.
        case_id: The case id.

    """
    return len(cases_utils.role(event_log, case_id))

process_performance_indicators.indicators.general.groups

activity_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int

The number of activities that occur in the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def activity_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int:
    """
    The number of activities that occur in the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    count = 0
    for case_id in case_ids:
        count += len(cases_utils.act(event_log, case_id))
    return count

activity_instance_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int

The number of times that any activity has been instantiated in the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def activity_instance_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int:
    """
    The number of times that any activity has been instantiated in the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    count = 0
    for case_id in case_ids:
        count += general_cases_indicators.activity_instance_count(event_log, case_id)
    return count

case_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int

The number of cases belonging to the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def case_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int:
    """
    The number of cases belonging to the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    event_log_unique_case_ids = set(event_log[StandardColumnNames.CASE_ID].unique())
    case_ids = set(case_ids)  # sanity check to ensure no duplicates if input is a list
    return len(case_ids.intersection(event_log_unique_case_ids))

expected_activity_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> float

The expected number of activities that occur in a case belonging to the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def expected_activity_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> float:
    """
    The expected number of activities that occur in a case belonging to the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    sum_of_activity_counts = 0
    for case_id in case_ids:
        sum_of_activity_counts += len(cases_utils.act(event_log, case_id))

    numerator = sum_of_activity_counts
    denominator = case_count(event_log, case_ids)
    return safe_division(numerator, denominator)

expected_activity_instance_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> float

The expected number of times that any activity has been instantiated in a case belonging to the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def expected_activity_instance_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> float:
    """
    The expected number of times that any activity has been instantiated in a case belonging to the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    sum_of_activity_instance_counts = 0
    for case_id in case_ids:
        sum_of_activity_instance_counts += general_cases_indicators.activity_instance_count(event_log, case_id)

    numerator = sum_of_activity_instance_counts
    denominator = case_count(event_log, case_ids)
    return safe_division(numerator, denominator)

expected_human_resource_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> float

The expected number of human resources that are involved in the execution of a case belonging to the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def expected_human_resource_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> float:
    """
    The expected number of human resources that are involved in the execution of a case belonging to the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    sum_of_human_resources_counts = 0
    for case_id in case_ids:
        sum_of_human_resources_counts += general_cases_indicators.human_resource_count(event_log, case_id)

    numerator = sum_of_human_resources_counts
    denominator = case_count(event_log, case_ids)
    return safe_division(numerator, denominator)

expected_resource_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int | float

The expected number of resources that are involved in the execution of a case belonging to the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def expected_resource_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int | float:
    """
    The expected number of resources that are involved in the execution of a case belonging to the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    sum_of_resource_counts = 0
    for case_id in case_ids:
        sum_of_resource_counts += general_cases_indicators.resource_count(event_log, case_id)

    numerator = sum_of_resource_counts
    denominator = case_count(event_log, case_ids)
    return safe_division(numerator, denominator)

expected_role_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int | float

The expected number of human resource roles that are involved in the execution of a case belonging to the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def expected_role_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int | float:
    """
    The expected number of human resource roles that are involved in the execution of a case belonging to the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    sum_of_role_counts = 0
    for case_id in case_ids:
        sum_of_role_counts += general_cases_indicators.role_count(event_log, case_id)

    numerator = sum_of_role_counts
    denominator = case_count(event_log, case_ids)
    return safe_division(numerator, denominator)

human_resource_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int

The number of human resources that are involved in the execution of the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def human_resource_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int:
    """
    The number of human resources that are involved in the execution of the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    count = 0
    for case_id in case_ids:
        count += len(cases_utils.hres(event_log, case_id))
    return count

resource_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int

The number of resources that are involved in the execution of the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def resource_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int:
    """
    The number of resources that are involved in the execution of the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    count = 0
    for case_id in case_ids:
        count += len(cases_utils.res(event_log, case_id))
    return count

role_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int

The number of human resource roles that are involved in the execution of the group of cases.

Parameters:

Name Type Description Default
event_log DataFrame

The event log.

required
case_ids list[str] | set[str]

The list or set of case ids.

required
Source code in process_performance_indicators/indicators/general/groups.py
def role_count(event_log: pd.DataFrame, case_ids: list[str] | set[str]) -> int:
    """
    The number of human resource roles that are involved in the execution of the group of cases.

    Args:
        event_log: The event log.
        case_ids: The list or set of case ids.

    """
    _is_case_ids_empty(case_ids)
    count = 0
    for case_id in case_ids:
        count += len(cases_utils.role(event_log, case_id))
    return count