pm4py.algo.discovery.heuristics package

Subpackages

Submodules

pm4py.algo.discovery.heuristics.algorithm 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.discovery.heuristics.algorithm.Variants(value)[source]

Bases: enum.Enum

An enumeration.

CLASSIC = <module 'pm4py.algo.discovery.heuristics.variants.classic' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\discovery\\heuristics\\variants\\classic.py'>
PLUSPLUS = <module 'pm4py.algo.discovery.heuristics.variants.plusplus' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\discovery\\heuristics\\variants\\plusplus.py'>
pm4py.algo.discovery.heuristics.algorithm.apply(log: Union[pm4py.objects.log.obj.EventLog, pm4py.objects.log.obj.EventStream, pandas.core.frame.DataFrame], parameters: Optional[Dict[Any, Any]] = None, variant=Variants.CLASSIC) Tuple[pm4py.objects.petri_net.obj.PetriNet, pm4py.objects.petri_net.obj.Marking, pm4py.objects.petri_net.obj.Marking][source]

Discovers a Petri net using Heuristics Miner

Parameters
  • log – Event log

  • parameters – Possible parameters of the algorithm, including:

    • Parameters.ACTIVITY_KEY

    • Parameters.TIMESTAMP_KEY

    • Parameters.CASE_ID_KEY

    • Parameters.DEPENDENCY_THRESH

    • Parameters.AND_MEASURE_THRESH

    • Parameters.MIN_ACT_COUNT

    • Parameters.MIN_DFG_OCCURRENCES

    • Parameters.DFG_PRE_CLEANING_NOISE_THRESH

    • Parameters.LOOP_LENGTH_TWO_THRESH

  • variant

    Variant of the algorithm:
    • Variants.CLASSIC

    • Variants.PLUSPLUS

Returns

  • net – Petri net

  • im – Initial marking

  • fm – Final marking

pm4py.algo.discovery.heuristics.algorithm.apply_dfg(dfg: Dict[Tuple[str, str], int], activities=None, activities_occurrences=None, start_activities=None, end_activities=None, parameters=None, variant=Variants.CLASSIC) Tuple[pm4py.objects.petri_net.obj.PetriNet, pm4py.objects.petri_net.obj.Marking, pm4py.objects.petri_net.obj.Marking][source]

Discovers a Petri net using Heuristics Miner

Parameters
  • dfg – Directly-Follows Graph

  • activities – (If provided) list of activities of the log

  • activities_occurrences – (If provided) dictionary of activities occurrences

  • start_activities – (If provided) dictionary of start activities occurrences

  • end_activities – (If provided) dictionary of end activities occurrences

  • parameters – Possible parameters of the algorithm, including:

    • Parameters.ACTIVITY_KEY

    • Parameters.TIMESTAMP_KEY

    • Parameters.CASE_ID_KEY

    • Parameters.DEPENDENCY_THRESH

    • Parameters.AND_MEASURE_THRESH

    • Parameters.MIN_ACT_COUNT

    • Parameters.MIN_DFG_OCCURRENCES

    • Parameters.DFG_PRE_CLEANING_NOISE_THRESH

    • Parameters.LOOP_LENGTH_TWO_THRESH

  • variant

    Variant of the algorithm:
    • Variants.CLASSIC

Returns

  • net – Petri net

  • im – Initial marking

  • fm – Final marking

pm4py.algo.discovery.heuristics.algorithm.apply_heu(log: Union[pm4py.objects.log.obj.EventLog, pm4py.objects.log.obj.EventStream, pandas.core.frame.DataFrame], parameters: Optional[Dict[Any, Any]] = None, variant=Variants.CLASSIC) pm4py.objects.heuristics_net.obj.HeuristicsNet[source]

Discovers an Heuristics Net using Heuristics Miner

Parameters
  • log – Event log

  • parameters – Possible parameters of the algorithm, including:

    • Parameters.ACTIVITY_KEY

    • Parameters.TIMESTAMP_KEY

    • Parameters.CASE_ID_KEY

    • Parameters.DEPENDENCY_THRESH

    • Parameters.AND_MEASURE_THRESH

    • Parameters.MIN_ACT_COUNT

    • Parameters.MIN_DFG_OCCURRENCES

    • Parameters.DFG_PRE_CLEANING_NOISE_THRESH

    • Parameters.LOOP_LENGTH_TWO_THRESH

  • variant

    Variant of the algorithm:
    • Variants.CLASSIC

Returns

  • net – Petri net

  • im – Initial marking

  • fm – Final marking

pm4py.algo.discovery.heuristics.algorithm.apply_heu_dfg(dfg: Dict[Tuple[str, str], int], activities=None, activities_occurrences=None, start_activities=None, end_activities=None, parameters=None, variant=Variants.CLASSIC) pm4py.objects.heuristics_net.obj.HeuristicsNet[source]

Discovers an Heuristics Net using Heuristics Miner

Parameters
  • dfg – Directly-Follows Graph

  • activities – (If provided) list of activities of the log

  • activities_occurrences – (If provided) dictionary of activities occurrences

  • start_activities – (If provided) dictionary of start activities occurrences

  • end_activities – (If provided) dictionary of end activities occurrences

  • parameters – Possible parameters of the algorithm, including:

    • Parameters.ACTIVITY_KEY

    • Parameters.TIMESTAMP_KEY

    • Parameters.CASE_ID_KEY

    • Parameters.DEPENDENCY_THRESH

    • Parameters.AND_MEASURE_THRESH

    • Parameters.MIN_ACT_COUNT

    • Parameters.MIN_DFG_OCCURRENCES

    • Parameters.DFG_PRE_CLEANING_NOISE_THRESH

    • Parameters.LOOP_LENGTH_TWO_THRESH

  • variant

    Variant of the algorithm:
    • Variants.CLASSIC

Returns

  • net – Petri net

  • im – Initial marking

  • fm – Final marking

pm4py.algo.discovery.heuristics.parameters 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.discovery.heuristics.parameters.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
AND_MEASURE_THRESH = 'and_measure_thresh'
CASE_ID_KEY = 'pm4py:param:case_id_key'
DEPENDENCY_THRESH = 'dependency_thresh'
DFG_PRE_CLEANING_NOISE_THRESH = 'dfg_pre_cleaning_noise_thresh'
HEU_NET_DECORATION = 'heu_net_decoration'
LOOP_LENGTH_TWO_THRESH = 'loop_length_two_thresh'
MIN_ACT_COUNT = 'min_act_count'
MIN_DFG_OCCURRENCES = 'min_dfg_occurrences'
START_TIMESTAMP_KEY = 'pm4py:param:start_timestamp_key'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'

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