pm4py.util.nx_utils module#
- class pm4py.util.nx_utils.Parameters(*values)[source]#
Bases:
Enum- SHOW_PROGRESS_BAR = 'show_progress_bar'#
- pm4py.util.nx_utils.neo4j_upload(nx_graph: DiGraph, session, clean_db: bool = True, parameters: Dict[Any, Any] | None = None)[source]#
Uploads a NetworkX DiGraph obtained from a traditional/object-centric event log to a Neo4J session
- Parameters:
nx_graph – NetworkX graph
session – Neo4J session
clean_db – Cleans the database before uploading
parameters – Other optional parameters of the method, including: - Parameters.SHOW_PROGRESS_BAR => shows the percentage of nodes/edges uploaded to Neo4J
- pm4py.util.nx_utils.neo4j_download(session, parameters: Dict[Any, Any] | None = None) DiGraph[source]#
Downloads a NetworkX DiGraph starting from a Neo4J database.
- Parameters:
session – Neo4J session
parameters – Optional parameters of the method.
- Returns:
NetworkX DiGraph
- Return type:
nx_graph
- pm4py.util.nx_utils.nx_to_ocel(nx_graph: DiGraph, parameters: Dict[Any, Any] | None = None)[source]#
Transforms a NetworkX DiGraph representing an OCEL to a proper OCEL.
- Parameters:
nx_graph – NetworkX DiGraph
parameters – Optional parameters of the method
- Returns:
Object-centric event log
- Return type:
ocel
- pm4py.util.nx_utils.nx_to_event_log(nx_graph: DiGraph, parameters: Dict[Any, Any] | None = None)[source]#
Transforms a NetworkX DiGraph representing a traditional event log to a proper event log.
- Parameters:
nx_graph – NetworkX DiGraph
parameters – Optional parameters of the method
- Returns:
Traditional event log.
- Return type:
event_log