# pm4py.algo.discovery.inductive package

## pm4py.algo.discovery.inductive.algorithm module

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.inductive.algorithm.Variants(value)[source]

Bases: enum.Enum

An enumeration.

IM = <module 'pm4py.algo.discovery.inductive.variants.im.algorithm' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\discovery\\inductive\\variants\\im\\algorithm.py'>
IM_CLEAN = <module 'pm4py.algo.discovery.inductive.variants.im_clean.algorithm' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\discovery\\inductive\\variants\\im_clean\\algorithm.py'>
IMd = <module 'pm4py.algo.discovery.inductive.variants.im_d.dfg_based' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\discovery\\inductive\\variants\\im_d\\dfg_based.py'>
IMf = <module 'pm4py.algo.discovery.inductive.variants.im_f.algorithm' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\discovery\\inductive\\variants\\im_f\\algorithm.py'>
pm4py.algo.discovery.inductive.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.IM_CLEAN) [source]

Apply the chosen IM algorithm to a log obtaining a Petri net along with an initial and final marking

Parameters
• log – Log

• variant – Variant of the algorithm to apply, possible values: - Variants.IMd

• parameters

Parameters of the algorithm, including:

Parameters.ACTIVITY_KEY -> attribute of the log to use as activity name (default concept:name)

Returns

• net – Petri net

• initial_marking – Initial marking

• final_marking – Final marking

pm4py.algo.discovery.inductive.algorithm.apply_dfg(dfg: Dict[Tuple[str, str], int], start_activities: Dict[str, int], end_activities: Dict[str, int], activities: Dict[str, int], parameters=None, variant=Variants.IM_CLEAN) [source]

Apply the chosen IM algorithm to a DFG graph obtaining a Petri net along with an initial and final marking

Parameters
• dfg – Directly-Follows graph

• variant – Variant of the algorithm to apply, possible values: - Variants.IMd

• parameters

Parameters of the algorithm, including:

Parameters.ACTIVITY_KEY -> attribute of the log to use as activity name (default concept:name)

Returns

• net – Petri net

• initial_marking – Initial marking

• final_marking – Final marking

pm4py.algo.discovery.inductive.algorithm.apply_tree(log: Union[pm4py.objects.log.obj.EventLog, pm4py.objects.log.obj.EventStream, pandas.core.frame.DataFrame], parameters: Optional[Dict[Any, Any]] = None, variant=Variants.IM_CLEAN) [source]

Apply the chosen IM algorithm to a log obtaining a process tree

Parameters
• log – Log

• variant – Variant of the algorithm to apply, possible values: - Variants.IMd

• parameters

Parameters of the algorithm, including:

Parameters.ACTIVITY_KEY -> attribute of the log to use as activity name (default concept:name)

Returns

Process tree

Return type

tree

pm4py.algo.discovery.inductive.algorithm.apply_tree_dfg(dfg: Dict[Tuple[str, str], int], start_activities: Dict[str, int], end_activities: Dict[str, int], activities: Dict[str, int], parameters: Optional[Dict[Any, Any]] = None, variant=Variants.IM_CLEAN) [source]

Apply the chosen IM algorithm to a DFG graph obtaining a process tree

Parameters
• dfg – Directly-follows graph

• variant – Variant of the algorithm to apply, possible values: - Variants.IMd

• parameters

Parameters of the algorithm, including:

Parameters.ACTIVITY_KEY -> attribute of the log to use as activity name (default concept:name)

Returns

Process tree

Return type

tree

pm4py.algo.discovery.inductive.algorithm.apply_tree_variants(variants: Dict[Union[str, List[str]], int], parameters: Optional[Dict[Any, Any]] = None, variant=Variants.IM_CLEAN) [source]

Apply the chosen IM algorithm to a dictionary/list/set of variants a log obtaining a process tree

Parameters
• variants – Dictionary/list/set of variants in the log

• variant – Variant of the algorithm to apply, possible values: - Variants.IMd

• parameters

Parameters of the algorithm, including:

Parameters.ACTIVITY_KEY -> attribute of the log to use as activity name (default concept:name)

Returns

Process tree

Return type

tree

pm4py.algo.discovery.inductive.algorithm.apply_variants(variants: Dict[Union[str, List[str]], int], parameters: Optional[Dict[Any, Any]] = None, variant=Variants.IM_CLEAN) [source]

Apply the chosen IM algorithm to a dictionary/list/set of variants obtaining a Petri net along with an initial and final marking

Parameters
• variants – Dictionary/list/set of variants in the log

• variant – Variant of the algorithm to apply, possible values: - Variants.IMd

• parameters

Parameters of the algorithm, including:

Parameters.ACTIVITY_KEY -> attribute of the log to use as activity name (default concept:name)

Returns

• net – Petri net

• initial_marking – Initial marking

• final_marking – Final marking

## pm4py.algo.discovery.inductive.parameters module

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.inductive.parameters.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
CASE_ID_KEY = 'pm4py:param:case_id_key'
CONCURRENT_KEY = 'concurrent'
EMPTY_TRACE_KEY = 'empty_trace'
NOISE_THRESHOLD = 'noiseThreshold'
ONCE_PER_TRACE_KEY = 'once_per_trace'
START_TIMESTAMP_KEY = 'pm4py:param:start_timestamp_key'
STRICT_TAU_LOOP_KEY = 'strict_tau_loop'
TAU_LOOP_KEY = 'tau_loop'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'