diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/.github/workflows/codeql-analysis.yml b/source_data/pinned/pm4py-process/tag-2.7.23.11/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000000000000000000000000000000000000..de6350385e689e6f80f3b605a6be9ede209b87a8
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,71 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ release ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ release ]
+ schedule:
+ - cron: '25 5 * * 4'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'python' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
+ # Learn more:
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v1
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v1
+
+ # ℹ️ Command-line programs to run using the OS shell.
+ # 📚 https://git.io/JvXDl
+
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v1
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/.gitignore b/source_data/pinned/pm4py-process/tag-2.7.23.11/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..b014dd8aa7c594f12022261cb190b01d5b34cff4
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/.gitignore
@@ -0,0 +1,140 @@
+/.idea
+.vscode/
+
+*.mps
+*.sol
+*debug.log*
+
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+coverage.json
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# Renovate bot
+renovate.json5
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/CHANGELOG.md b/source_data/pinned/pm4py-process/tag-2.7.23.11/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..ad809d9d89cbfa36e56266cae2ef2ca3f8d201a6
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/CHANGELOG.md
@@ -0,0 +1,4292 @@
+# Changelog of pm4py
+
+# pm4py 2.7.22 (2026.03.20)
+
+### Added
+* 865063cead75f630fa806adab2bd7835149ebffd
+ * CI/CD test cases
+* 78a2b4516fce5b7d089093e62ba38de37ecc5c2e
+ * added test case for Woflan
+* 8787819fd54cdb7893fe7261406004e94ae805c6
+ * added MURATA test cases
+
+### Changed
+* ab5dc93321918c267d51a66a161d4105f6838e05
+ * improvement format_dataframe for Polars
+* 4293158672bbcf10a9cce0b0b33ee42ee1ac846f
+ * performance improvement WOFLAN
+* a8482a2f0609e943c3184db59077733283f7b0e9
+ * keep NAN values in attributes
+* 681107a108ffb2c51a2367e2f8e09d7f33815aec
+ ce8585807fbc3ca6640f8032a4eecca12923d202
+ 7a8baf1d7bd665258695c62019f97fe4a919535c
+ 03be978c75b9f804fe64d8fed57732e0197c419f
+ * updates for Numpy 2.4 and Pandas 3.x
+* f70e9a6fb45357f1d65d75e620e515714253ccc3
+ * revised BPMN layouting (nicer)
+
+### Deprecated
+
+### Fixed
+* 1d0d186d1ec7d68bec44866a0d02001b49bd4222
+ * bug fix temporal profile on Polars
+* 47a6b7fa5dfe2c0be078e41c3d4338ec6093b8f4
+ * fixed fea extraction and process cube
+* 403861b6637a338fca3034e978ecf25470bc8c24
+ * bug fixes Heuristics Net to Petri Net conversion
+* 72ef9a29e377d1d36c842a6109e6477005949133
+ * bug fix alignments approximation on process trees
+* 52c8f3c2e96b99641d544f5a8763c5868ebfaf83
+ 677e6f700f3bfa1df6990a19118c7df205223b58
+ b4ee504e6a20c0cca42530943cfa2d0821854168
+ a44a70bea4af654994e0e624923f9fc8d361ee8a
+ d7cf2dbc5c40372fa775894c531a8864f57ef178
+ d29139419ffc2169c5f7b247a04051ca3617184d
+ b52f2b9e01b47c9aba50d9ee70dfcf20ca1107dc
+ 4f6d52a6d56373ebdde40bc078e14a972d86c677
+ 413236077caa978f304e8b23c2e6524fe55031ef
+ 56d13ad9f586415a36020233d81dd513f053209f
+ ff2e22815ffc7e469edae17bc9d111cb44e98b45
+ bffd377abb3304a7650296724fef96dc9fdb2036
+ * bug fixes OCEL 2.0 importing/exporting
+* c611e9957ad78003053477677798ef56819e8182
+ * Incorrectly calculating cycle time and waiting time
+* 6f11809aaf1748460ef08afeb018b54adfa313b4
+ * bug fix DECLARE discovery/conformance
+* a34c250c4c135bb3470d030efa3ea43ca8311444
+ 5486e7fc7fa69a453c45f4dc117a094651c147ea
+ * bug fixes Murata
+* 14fb5321da7de2bb04a1df4bd455427c4d183985
+ * LTL checking filtering bug fix
+* a3fd52911d1f8bd19932369b00f8874c4185db4f
+ * paths performance filter bug fix
+* 44c93eb2441a03f1df17b6a7ee4bd77185dede8d
+ 64beb6f9d45e0580124ec5d3391410f1dd88658b
+ * fixed extended Cyclomatic and Cardoso metrics
+
+### Removed
+
+### Other
+* 12c17ca6e287143f41d782e086f83dc8627ea1f3
+ d8ea730cc526f5e36dc99f5d0c347156ba504c28
+ * update generate dependencies script
+
+
+# pm4py 2.7.21 (2025.10.10)
+
+### Added
+* cc97057cb5ac19c080e37bddb3ccba09d135a94b
+ * Polars stats/filters in simplified interface.
+* 82d169c96e2b5d4fc5292755bcdc5c0fca22e220
+ 0744e58a58242a73f9edd845e352321d8173ab59
+ * DFG computation in Polars
+* 3d1fcd007fba7fc25970a71d660dbb663f4500ba
+ * Performance spectrum computation in Polars
+* 99b56bdf1ea17401c384baf2a3fe6b195405edb4
+ fca1ee8432008436860ad9234185f592f6f408f2
+ e0f2b4d00f0ab6f7292a5a37ca63a74f1a59e04c
+ * different process discovery algorithms on Polars
+* e0f2b4d00f0ab6f7292a5a37ca63a74f1a59e04c
+ * first alignments on Polars lazyframes
+* c1a45f25f91f28e98a71660b023e18f05b872cc4
+ * porting project_on_event_attribute util to Polars
+* 47dab1429c5e9775984b7e20f0a2af465d1cc53e
+ * miscellaneous process discovery on Polars lazy
+* e00af66654565b70bc6e3ac8cb6ec2ff380e1b97
+ * batch detection on Polars lazy
+* 53af236f39b8fd865011a08cc51ff803d00402d8
+ * MSD for Polars lazyframes
+* 1f4c041a5f5c90934548b17c0a77ea0d990741c0
+ * footprints on Polars
+* e92447af5b33dd1fbf1f9174ea78f51933309b06
+ * Polars feature extraction
+* 3b4afd4cb8fcb07ffad9f91b74bad011d455eb46
+ * process cubes in Polars
+
+### Changed
+* bd96b5cfda406c3d5cc654acb8bef57c6e13acaf
+ * example for process cubes
+
+### Deprecated
+
+### Fixed
+* 1bb9fa3abb223c944413013298e686c7a1c9b48f
+ * Bug fix filter_paths_performance
+* 3ce5fbe917742a3a1d717a81ca14c96d7611968a
+ * Fix Python-3.11-specific issue on variants duration graph visualization
+* b4df572e46ff17eae0446b84bfa930e9da0af2dd
+ * fixed citation for structural equation metric
+* 66121b4920a1ce2c345858127032eaf54a8595a5
+ * space management in Pandas feature extraction
+
+### Removed
+
+### Other
+
+
+# pm4py 2.7.20 (2025.08.31)
+
+### Added
+* 0fd2714a6ca38189aabee43bb5b84d63eaba5492
+ * added object-centric causal nets and object-centric Petri nets as objects
+ * added genetic miner
+* de34c822fbca2a1a0b86515fb7c69d068a0706c6
+ * New timeframe filters
+* 3e5fb309c2af7d696ff8d6e1e3752f2116eb5c02
+ * Polars statistics
+* 07acb5f36c8a40b4b2c8df4e700ba5cf4367795a
+ * Chaotic activities detection
+* d50fb4a492127193c7d8b18f8fccc94e1013b104
+ * Approaches for object-centric conformance checking
+* b6190a7b4424f8820a38697f73e2937214ec1b92
+ 20a5cf543b86cbc1b4d5a218d7244bd087fc93e0
+ * Variant of Align-ETConformance faithful to the original paper's conclusions
+
+### Changed
+* 5057455f90b3c68e348c662b205842611fb6b205
+ * flanking 'rustxes' with 'r4pm'
+
+### Deprecated
+
+### Fixed
+* 7d381f15208ec27800a5eaf6d07c91e8bd4dffeb
+ * bug fixes IMd
+
+### Removed
+
+### Other
+
+
+# pm4py 2.7.19 (2025.06.27)
+
+### Added
+* 94d4ab12330ba8e62d3ff732e64a5fb88ce91196
+ * LLM-based clustering
+* 56b530e457b59fcd67a02c68b2d8652131111d5d
+ * introducing textual embeddings at the case/event level
+
+### Changed
+* c7dc88ca733241271e7bd88498c4087899bc99c7
+ * improving the extraction of temporal features
+* de4f05b4b7236082c6c47944595f496934742c53
+ * warning users on the filtering level for filtering event logs
+* 67685623663a8f39f72673bdfb3de1a963c94d19
+ * revised Outlook calendar event log extraction
+* 005df4ae5b41de410718bc036c98f55308a0f12d
+ * revised Outlook mail extraction
+* 7062f1d38cda0e86e03ec0dfdc21c9021397e71b
+ * revised Chrome history extraction
+* 9d4b2108ac9eac1e1777ae706e39d12e1581929f
+ * revised Firefox history extractor
+* 8efcf9ea8575b3098e0e69a8d663d6ce66fb470c
+ * Pivot table for temporal distribution (+ feature table)
+* 619145a15cb9a584e3e80bbc91b84e9656fc2d0a
+ * partial translation filters from Pandas to Polars LazyFrame
+
+### Deprecated
+
+### Fixed
+* c20c6a070fea14491011845cd79d1dabfe18d5b9
+ * Missing event log conversion in get_diagnostics_dataframe
+* 4059ebe07a2f1d4e3eb0df1b6a3d8eb43993b6de
+ * Missing activity and edge threshold in OC-DFG ELKJS visualization
+* 6601a9745c4d9fffa3fc0b268de4f9772a32b192
+ * Timeframe filter sampling is revised
+
+### Removed
+* df906cb68b144d003beef4e03034bc393bf2fac9
+ * removed extra documentation files
+
+### Other
+
+
+---
+
+# pm4py 2.7.18.1 (2025.05.08)
+
+### Added
+* c02d02d7d146f8760c82ae9cf096ca7832008ab2
+ * example for label replacement in models
+* 0255f91f83ec4f6ff1fcc8a91082746951ac1710
+ * example computation M2M similarities
+
+### Changed
+* 5a661bb3a7498d3cfc5efaac2b4eee8ff1a27864
+ da9aa0cf8e40607570307425567939ab00f08411
+ d410501438c42ddfe945168e628fd3c533b64bc0
+ * Updated examples directory
+* 03964b640a73daaabf79a988d35f46a8f1b6de51
+ * parameter for extensive visit of the state space
+ to traverse invisibles.
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.7.18 (2025.05.05)
+
+### Added
+* 0a5118729e076dbdc3ef4990fb50b1594cae8698
+ * process cubes discovery in the simplified interface
+* b7aac259b074d42022a5763cb343db60697b89e7
+ * BPMN.IO auto layouting visualizer
+* 3ec1423ad6e87257c687a0c7b875deb53cd5e29d
+ * visualizer of variants paths durations
+
+### Changed
+* f9e7e015698f4af1e4cb37dc293d7e0381ddd493
+ * configuration for start/end symbols in graphs
+* 6827378d1d724c0ec8da04af10ae13f72ea9d995
+ * changing soundness check in the simplified interface
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+* aaad23ac060ed92e79c822008264519fd3bceb24
+ * roadtraffic.parquet example
+
+---
+
+
+## pm4py 2.7.17 (2025.04.11)
+
+### Added
+* 7d5bc959e15d74a8e4f1ddb2bb8eb8089bfecaf6
+ * calculating edit distance with POT
+* 11450e4b5dcbf81e33804ff371b39d91bd347ebe
+ * significantly revised decision mining
+* 5af9ef45714c9c6df8e9cf6704b05029d82ac587
+ * significantly revised Monte Carlo simulation
+* 339-concept-drift-detection-bose
+ * Concept drift detection (method by Bose)
+* 5489d3bbf1362b324d428663d11a111e22bc5488
+ * process cubes detection
+* 107c2530270168d5eaf826e28244ceb154f16587
+ * using RustXES by default when importing/exporting XES. users is warned.
+
+### Changed
+* cdee940e1825194c54edadb61a69ef97785f46e1
+ * Small update Anthropic connector
+* 7b5d15db8f63e17edee6e8b518bcf998c6dcbe60
+ * increased timeout of requests in LLM module
+* 190cb87688bfb788609c32a5fda074f0d98bdaf3
+ * optimization OCEL CSV importing
+* d816b469348acdb8dc354518bbece4fe31f9e18d
+ * updated footprints algorithm entrypoint
+
+### Deprecated
+
+### Fixed
+* 426d33eac42a5d2a0f142ff10bcbf92fba4ad28f
+ * fixed execution on CUDA dataframes
+* 68ed19a05fe233ffc80ed9074750fb2d647b531a
+ * fixed execution of examples
+* fd73f17c37b619883f039e44e8cb9e83aa8f00e4
+ * revised test
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.7.16 (2025.03.17)
+
+### Added
+* c3400ac1f3cc3bc23ff66980f39c7c5c6458d2b7
+ * added linting to pipelines
+* 4ba50b071493387be5f7f65be6f2d0e9920592ad
+ * possibility for read.py read methods to accept URIs
+
+### Changed
+* 016926ee785351c98c6397c6e6519c1033ea6e9f
+ * slight improvement reduction rules for Petri nets
+* 8e6f441fdf6067953c93bb034cc5da1646fd9854
+ * refactoring business hours for improving performance
+* e1558c11f6781fd1228f4d1a971589ab715b228d
+ * make DFG filtering more efficient
+* 6f535baa0eff00730099e6363121dc5ec2a2ec77
+ * make DFG playout more efficient
+* d16b068b4b2d88792b42f6fe43e1269ceb095106
+ * optimizing DFG calculation
+
+### Deprecated
+
+### Fixed
+* a6f52380e597a70ceea8dd1e4bc27654ed72e56f
+ * fix exporting OCEL to SQLite (timestamps)
+* f5e78bb0d34cda8f8895c1d3b060a9a87279039e
+ * bug fix POWL
+* 538e6707b6ec10976e411e902d77fa90fbe08d0e
+ * removed unnecessary conversion in powl discovery
+* 4ebd734f4e4c8706b57bd8bb102143437c0369a1
+ * small fix ocel2 sqlite importing
+
+### Removed
+
+### Other
+
+---
+
+
+## pm4py 2.7.15 (2025.01.10)
+
+### Added
+* 861cb56c478ed7fd485f88a2304506af33c180e4
+ * DFG filtering in simplified interface
+* 5085c6f1506a4f0f588706bc0287702e5e78c7ea
+ * added the plain .gv as output format for Graphviz visualizations
+* 113b5dd51a3ca2d526e9689dadcb817e4e730e29
+ * hash function OCEL object
+* 6130257779b6a5afeb8cf02610bdaba6e3034ada
+ * hash function prefix tree object
+* 51f469ca087e82d2bdc4290d1453de2fb53c9647
+ * hash function for the transition system object
+* 2c216554fc13f9741eb4a3d36f29f97b9c148f0a
+ * correlation miner in the simplified interface
+* fce422fe29585f5b94c401c80438a10dc36d3e82
+ * visualization variant for OC-DFG
+* 581d65a7ff46432a98a3e987a18e4cd47b9b6feb
+ * color arcs performance DFG visualization
+* 8434b2fcf3669030e71f9d4f718b921363dd810d
+ * simplified interface Petri net visualization
+* 8b2415e5e02b25b51a4f70785aec2ad2cf599260
+ * possibility to specify the title in some visualizations
+* 47fefe1fb53414f54c2e62d973aecb2fa293f238
+ * prefix tree to Petri net converter
+* 05a67b30c313d90570911a52662d346ac3814e59
+ * improved LLM integration
+* b81acabb754af91fb4369eab66f9514571379164
+ * performance aggregation key in discover_performance_dfg
+* 1ae6e6513c5597f13135986f09cf45cb2bb21c70
+ * streaming conformance checking on DECLARE models
+* d008b267bea269e7723baa0642929542c29284b8
+ * max length parameter to prefix tree generation
+* aec4de4220434a6c87d956d07bda4c7c093069b8
+ * possible visualization formats specified in the simplified interface vis.py
+* 7045e33774946387eb2c180e088262437234bfd1
+ * Git pipeline for tests execution
+
+### Changed
+* 102c5fa10a5755b45b6ed5c8e6e3587c609defbe
+ * updated connectors in pm4py.llm package
+* 589fc151b78b41a18fc4d7767b9ee9f84d8ef10c
+ * fix problem with BPMN importing
+* f4e87f752074e32cf117daf3fd4d683b47a12398
+ * module pre-importing on-request
+* a832282e7b95a3010a7c5a41f08d447a6d5fc004
+ * simplified simplified interface imports
+* bf0087b9cb7898e93d9a9c58ec0176f559675692
+ * updated RSTs
+* 9771d21db743250b02ba0202d8f65735a24f67ee
+ * revised documentation of pm4py
+* f64288071c31f986c61ce68990b4656867f7aec2
+ * replaced pyEMD
+* 4e0c4426d1f8010d409859210ab1f58552da6b7f
+ * max_tokens specification in pm4py.llm connectors.
+* df6c9708966ea254f3263adb9ed637f7df773e73
+ * deterministic order of children in prefix tree visualization.
+* 128166de99303f86d72fc2bd3e2d3a850411e0c1
+ * improved inductive miner fallthrough
+* 7057b867b394d311eff3f09e03aac659c67e90c5
+ * performance improvement search_graph_pt
+* 85e029f12dd66434e2032537ddaffab121c3586f
+ * removed unused variant tweaked_state_equation_a_star
+* 8f70c60d11e1a3afec94f3f36445c40cc5a46f0a
+ * extended examples for DFG interaction
+
+### Deprecated
+
+### Fixed
+* 57a4cbecf1fb1f58368bdc0ea6862c6aa42ef147
+ * escaping activities names before adding them to regex
+* ab2aa78a46b08edb10665f72dab82fec2d4fd89d
+ * refactored simplified interface docstrings
+* e750451515444877e7e85ae25adbfbac77bf0048
+ * updated URLs in getting started
+* ddbd25a0e10e13ec861ff5da89bcabbb6e468827
+ * hotfix BPMN layouting
+
+### Removed
+
+### Other
+
+
+---
+
+
+## pm4py 2.7.14 (2024.07.16)
+
+### Added
+
+### Changed
+* 561fd6c07d089679c1317a8d27bb28225e21cf76
+ * improved DFG sorting for visualization based on reachability from start/end activities
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+
+
+---
+
+
+## pm4py 2.7.13 (2024.07.11)
+
+### Added
+
+### Changed
+* 75c893999e32b3a1a6081db854b9a3cd10eaaa44
+ * Dockerfile refactoring
+* 7b80dad1fcc6955730357f46754c4a511b83ee58
+ * updating requirements list
+* 52459f95d42e2fc39568b0d685bd794c319f205a
+ * refactoring dependencies generation script
+* 928ecf5f8192ff1ef7944c5b0a7be7c530814ad9
+ * refactoring OpenAI query interface
+* 5fee9b4ac61c227ac77cbd28b888a7321ba401bf
+ * refactor OCEL object repr
+* 6c1ea7a38b3ef18fe9d490164ecebd85c432915f
+ * possibility to set the title in pm4py visualizations
+
+### Deprecated
+
+### Fixed
+* 954c2fbdc258b90bcba85001592a5d2950a79724
+ * bug fix temporal profile conformance checking
+* cd8f9fb9f49a5955f0a26f547770aefa8ff222b8
+ * issue with closing in-memory files when parsing a XES from string
+* d51bd9e24aed442f011917d6b77793b118bbf89f
+ * minor fix OCEL interleavings computation
+* 39d769cad1327c47d5948b0c40be4a90e41fcce7
+ * removed indeterminism in TBR with duplicate transitions
+* 2fb8e6bffcac11b14fe13f152ac0b096cdc0d03a
+ * penwidth assignation in DFG edges
+* c753425ffd63da55fc0d3e71ab5b5fb62a2bf359
+ * OCEL exporters consistency check
+* e98d795c977348dcbe7495d62c8975fae0b9499c
+ * LTL filters documentation in the simplified interface
+
+### Removed
+
+### Other
+* ed708047252f96f3bf103ba81d6139b433c39b85
+ * printing Python versions in tests and examples
+* c48882b88326608dc5c6a4101b8123c71a852e18
+ * parameter to enable/disable visualizations
+* 607d2eb601299a23335f8c1976cc59f63bcae5f2
+ * added example for Inductive Miner LC
+
+---
+
+
+## pm4py 2.7.12.1 (2024.04.17)
+
+### Added
+
+### Changed
+* 5641f9f2c830b567c138524a0b5e705a3836102a
+ * minor change OCEL names_stripping
+* c48882b88326608dc5c6a4101b8123c71a852e18
+ * parameter to enable/disable visualizations' view
+
+### Deprecated
+
+### Fixed
+* 1c6887fda74d2b0a36f483351a6978738517e61e
+ * bug fix inductive miner infreuent
+* e7e8ebf6894d9bc85febc43c82613d185e16ee3b
+ * solving performance bottleneck in IM
+* 4811bbde07f6639deb7c87bdda61504de0889873
+ * resolved indeterminism in IM fallthroughs
+* df1db968adf8bb5f483410be0ceef2928c2b3e6c
+ * missing tree sort in IM
+* 4958e2b8407c01923e5b65c7e46a5f89d8f927dc
+ * missing fold of PT objects in IM
+* 8e404c6c2b53cf14687d1f82d53a4a0fc4ac99d6
+ * fixed folding of PTs
+* a871cbc4bdeaa81013fbfa7a6ec5054d494cb329
+ * fixed parsing of PTs
+* a72cd92410653bf2f0b2ff35ab5d06bf73a95305
+ eddae51259114caf4e1447beee4981f2e00bcb9c
+ 69dcf7a836a5af3ab5da64701f43e3d8cf6b07aa
+ * fixed WF-net-to-PT conversion
+* 0980ac460d69beb9ede4403a3ed002c1cd30536e
+ * fixed docstring OCEL flattening
+* 6f9c67f48ad89e88d58c2481e85c6f3de9e6e1a5
+ * fix small issues with stochastic Petri net
+* 6781a90df2ba8d90155e7b5135520076843cac33
+ * bug fix DECLARE discovery and conformance checking
+* 7330d5100c8b8916eba9e4b0f31e8fa1f9157c98
+ * bug fix log skeleton discovery (always after, always before)
+* ec2f0b5b43d83a7b9fa154456241e3c685fcb721
+ * bug fix log-to-prefix-tree discovery (final nodes)
+* d580fedd4b770ed85f6864cd6d435db2477684f2
+ * bumping release number. forcing numpy<2 and pandas<3
+* 4f8bbf6d884e25c5474479fd86fe7331076ac2fe
+ * bug fixes for Pandas >= 3.0 future support
+
+### Removed
+
+### Other
+
+
+---
+
+
+## pm4py 2.7.12 (2024.03.21)
+
+### Added
+* 458ee9abf2fc155a7531be96992c9a0c27f8cb81
+ * maximum number of consecutive occurrences of the same activity in pm4py.get_variants
+* b4c914722605b37f787e156f407ea9333a8dd959
+ * more general between and activity split filters
+
+### Changed
+* 100b95c22a47eace59fc631541b2c34c9179765d
+ 09d4e7a07f92fddd90c1b1bbe572308380d7c8f3
+ * changed BPMN visualizer
+* f7b44a41a79760e4f092be2bf98087ea48b63de4
+ * changed BPMN conversion
+* db98b6fbf16847eceab4b53216cc1a1096936785
+ * improved BPMN support (collaboration, gateways, ...)
+
+### Deprecated
+
+### Fixed
+* e3b8172e4c005dcb633c9018b9b9439d84580f7b
+ * fixing random variables support
+* bb759da149b434d0e279256c8c6d397b06079729
+ * fixing sampling
+* a816fb5f000a907b603b44aba1470463109028f0
+ * bug fix OC-DFG visualization
+* 419a95362472c0807b73f4eb3d601f70b3d7c986
+ * bug fix POWL visualizer
+
+### Removed
+
+### Other
+
+
+---
+
+
+## pm4py 2.7.11 (2024.03.01)
+
+### Added
+* 0fcb1dc2939db30b7129f62bda0d235bd5242428
+ * improved string representation of hierarchical models
+* 0b0d09226574916c5d33c000cbc2a4ffa0a13e7a
+ b56ff781c99ce3126c1ec45d502c16d1c2f3b0b6
+ * BPMN layouting in the frontend
+* b39a7326faf2afb55b8880ce420cdda4a03ffa5c
+ * activity split filter (Pandas dataframes)
+* 6a7cfeaa06d405591d13b6055bf890b8b4a6b3b9
+ * float dtype and padding in log_to_target transformaiton methods
+
+### Changed
+* 56799b618ad1ab727705e24f40aa13a793552326
+ * refactoring BPMN-GraphViz visualization method
+* c56bd55b83133d231f37ac8c89190efb440bb826
+ * moving hierarchical models indentation to separate class
+* d865660c5370640b4c5c013239f6940f145d9e93
+ * refactoring log-to-OCEL
+
+### Deprecated
+
+### Fixed
+* c2278110acbbbf36e8fe5055e0b76f867e833da4
+ * bug fix POWL package
+* d36d0d2ff8133bc979638b7f3405f96225e06ced
+ * bug fix discover_dfg_clean
+* 64ce3341d40c073f274bdda9842fd92a0798a33f
+ * fixed typing of get_variants method
+* ffd0761e8f5490382b33de4fa8187f1ed80ce802
+ * fixed stochastic Petri net PNML importing
+* c9654d8089c5aa0e930ee932b222cc09be25d8a5
+ * fixed typing of pm4py.filter-variants
+* 8475c194929f74bf4e402b24c637299d8c28042a
+ * fixed export of multi-swimlanes BPMNs
+* d32e236cc99ec1b5de198466fe0966752adeb805
+ * fixed incongruency in BPMN visualizer
+* b40821da2612ae1921aec30da2333dc4e1151f1a
+ * fixed exception handling in OpenAI requests
+* e8f0b84bc7de65f090e0e96799486acaaad7572f
+ * fixed incongruency between filter on EventLog
+* 771cfcd6f2321a9106781e15c97895b26d5acbf3
+ * fixing behavior of between filter when act1 == act2
+* e1c84d7f6d6425f40a23ea3c539a0c110c331a3c
+ * ensuring float return for feature extraction methods in pm4py
+* 1b5a2932a60131f648ae476e6b97230c241f5d6e
+ * fixing POWL visualization image importing
+
+### Removed
+
+### Other
+* c4d24d54013e2a18856af840ffbad7c76e86c371
+ 81fa8017fbd25352fd87961bc4dcc1406c4e0dda
+ * Process tree to POWL utility
+
+---
+
+
+## pm4py 2.7.10 (2024.01.29)
+
+### Added
+* f5316b9e856e16a0a7a25c27f11b73546654c4e9
+ * methods for simplicity and generalization in the simplified interface
+* c874ba919de25a2a0a69bc1adb324a25484ddc07
+ * key/mouse events logger for Windows with screenshots recording
+
+### Changed
+* 1c93795884140f27d5eae5d2eade1823c93a92d2
+ * refactoring Scikit-Learn usage throughout the project
+* bd1ac4fd04019b3022bfff55553e590aefbd21cb
+ * refactoring NetworkX usage throughout the project
+
+### Deprecated
+
+### Fixed
+* 25ca20af830df69a983c6fd53bb2e456ccc11c25
+ * removed circular dependency on pm4py.util
+* 0da8c5f04f89dab8b9f5a3d31d8f5beb927e71d4
+ * fixing OCEL 2.0 support
+* 7b2c8ffee70c94c1acce7c28a7b366d5ed95bb6b
+ * fixing TBR diagnostics computation
+
+### Removed
+
+### Other
+
+
+---
+
+
+## pm4py 2.7.9.2 (2024.01.16)
+
+### Added
+
+### Changed
+* ab48f194ed0bbcd864683d313285e0db6a3ae570
+ * refactoring DECLARE discovery
+* ba3dd14250f3b713c495833d1ed16d42efb74c7a
+ * moved LLM descriptions to separate methods
+
+### Deprecated
+
+### Fixed
+* 99efc597545a1f0f717c90303db8ca3825062e63
+ * bug fix DECLARE discovery
+* 4e3cedf1dfdaa70da1e381930812676afc103b22
+ * additional PNGs for POWL visualization
+
+### Removed
+
+### Other
+* 73edc01f9e7d986d72dc90b88fe92c5265a5d09b
+ * utility to convert live event stream to static event stream
+* 8ba3e4868b4da409f46559abbb716256517712ee
+ * annotating the SearchTuple alignments class with the description of its properties
+* 847cf991df054edf81e2b13b70b0e6679a9a15ca
+ * check if get_best_worst_cost calculation is always needed
+
+---
+
+
+## pm4py 2.7.9.1 (2023.12.14)
+
+### Added
+* efff63955c1dfd3a3c04c6bf5aecc53042da3b4c
+ 9ec7578c95d78f91c6c8fcb906f979b6e8680b10
+ * description of POWL and process tree models
+
+### Changed
+* 3173effdb98dfe37ca3b6770d55aadbbd61b6b7c
+ a48390b8be4495177d2e641fc6ae6e868f3544cb
+ 95853c91ed0c9dbba61fecedac2fd98c793b6933
+ 864052795e24494023a8b0c76c342db7c8a9305c
+ abd315e4c37701dbbf540726496dfb45b3625992
+ 979cc906c9da648face900141be5f355821ffe61
+ 4feb5c2000ce82df38294ff3459a25e358d2e69e
+ b13ea6458bbea9cc4099109cc28978aa2513a394
+ 293c282dd8a90eb89273f2f8b98b1279b6e46051
+ c672a770bb1a7c58dee0f4f509a93126d0a6f11f
+ 5545895f299599799222ce90ff7b446caaf9e3bf
+ 6328037090236e6640a4efa51011e19001a5d300
+ ef3de4c7b7803d80b8599d84426badca0c7dfc5d
+ * major refactoring pm4py
+* 8f494f541b5337ae6abc152afea9b6f09b81fef9
+ 691aa7d31ae401b16058220a656ffee89fc30eff
+ 6366dcb3bc08859d4f435b8ad44bdb38c515361d
+ * refactoring OpenAI connector
+* 376996620052fc23586edc393c73a43288e64164
+ * refactoring POWL class and methods
+
+### Deprecated
+
+### Fixed
+* 093637828f08618f2d149145dc1740cc2b631ecd
+ * fixed BPMN 2.0 exporting (according to the specification)
+
+### Removed
+
+### Other
+* f6d15493110e613321214fbf4465fc561e42a698
+ * method to project DFG/edit distance alignments on log
+
+---
+
+
+## pm4py 2.7.9 (2023.11.20)
+
+### Added
+* e5bb3b43b47217128763157c9e64ba6b39b1672f
+ * OCEL event types-to-object types visualizer
+* be7e28440da6f69bfdad43b724931277f04efdbc
+ * NetworkX visualization utility
+* a17bb8e103b3ee46e46bef17885149070bf7e048
+ * Context-based activity label splitting approach (BPM 2023)
+* 6583504c6056c43868fe1158744fcc7655270dec
+ * Filtering on trace segments
+* 9dedaba837e561640a122e50927f7f5b13d4a334
+ * Utility to get frequent trace segments
+* 19c53e1fcf06c0566a3c697aec37f13345365d04
+ * Utility for the computation of service times
+
+### Changed
+* fb0d9fb049f128bd979c962db54e3a305ecf5f09
+ * Refactoring Pandas calls in pm4py
+* 36e19d3f48dabf03509cf87ae6508c0576b089b4
+ c38d10574587a3efa21d521f25de40e5ade4409b
+ * adapt openai calls to v1 migration
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+* 19c53e1fcf06c0566a3c697aec37f13345365d04
+ * refactored 'sojourn time' mis-spelling to 'service time' throughout the project
+
+---
+
+
+## pm4py 2.7.8.4 (2023.11.15)
+
+### Added
+
+### Changed
+* a18ed64b90881e15d3ce561dcd7ecc0a56fe5039
+ * refactor default XES importer variant specification
+* b0d6fbd1c5c23506fb3648511326e83a3c3f89fe
+ * refactor default alignments variant specification
+* 0b7489571184096bacd195dd824af7c88a57c551
+ * refactoring examples (default image format specification)
+* de7ab79e285ed5aeb4f4b447fd7f8f1eabb9669c
+ d6ef339b32c2e8439815ea589dab1bc0a9e5c851
+ * refactoring unit tests entrypoint
+* 47407dfdba5976abb78559072905745eb5d37e92
+ 51993c9a2282f0096e113dfc76b76b46b608bd33
+ 28f891287d0d61280fb745854c30dc7c301a4c36
+ * small changes OCEL to NetworkX conversion
+
+### Deprecated
+
+### Fixed
+* e74700dd9d8b965f7cfdb355d03cd582f8da4b2b
+ * fixed POWL objects conversion
+* e56444ad44a94ece5bd239983165d0754b15a713
+ 7205aeaa94ad885a9271c359780aa9fac00dee39
+ * bug fix JSON-OCEL(2.0) importer/exporter
+
+### Removed
+
+### Other
+* 911d5f8630504c3234b716713a58498ead38d2bb
+ * converting back NX DiGraph to OCEL/EventLog
+
+---
+
+
+## pm4py 2.7.8.3 (2023.11.09)
+
+### Added
+* d06e2d36558e600208e182f096f07ea86923c1c4
+ * RUSTXES importer variant
+* 7026be7476ed34c138b1046781847cdd9e104715
+ * POWL discovery and visualization in the simplified interface
+* 40cd57230a5b0a9fd7821c71cbc2a17b0608e962
+ * POWL parser from model string
+
+### Changed
+* 3f45baf9c0730d90ab35bce4d715b67306b24168
+ * artificial start/end activity symbols specification in the simplified interface
+* 215d6a67065074fb516b397a6b9e018cb41cf114
+ * ocel_to_nx is now OCEL 2.0 compliant
+
+### Deprecated
+
+### Fixed
+* 2e5d06da05e8e961b3f99a0194bd8bf072ce1e32
+ * fixed rebase with timestamp format specification
+* 753202cee239e62e47a29fd1bc8658f8f36a39d1
+ * removed warnings (deprecation) in tests execution
+* a209f0df4c16812ac1109150046357c625253106
+ * unneeded workaround in managing datetimes inside Pandas
+* be4b724582512a8bea207252d565b0ee62715f55
+ * PNML importer now returns correctly the parsed stochastic map
+* d587e49961dd9b3db76205da5ce9a9fee893dd79
+ * dropping newlines in process tree parsing
+
+### Removed
+
+### Other
+* 6e3b855c30479d2311458f9732732fc30a248270
+ * changed execute_tests.py format
+* c62f6fd480b67e466e4c906927413b9f2c87aff4
+ * in tests and examples, provide possibility to try with different Pandas backends
+* 5424eb9ed576a1ef4f0485ce186b0300bf1ace03
+ * example to locate the features for a specific case using pm4py.extract_features_dataframe
+* f72e73285e6309df1d5413b4afa7c821facae2e7
+ * help desk log
+
+---
+
+
+## pm4py 2.7.8.2 (2023.10.18)
+
+### Added
+
+### Changed
+* d219db5ece5ce68239b217072bf04ac576ded062
+ * refactoring DFG utility to also output
+ variant-specific paths statistics on request
+* 86cbdb103410a692c15e35a1723f7107e573656e
+ * removing unused imports throughout the code
+* c37cdd31bfbd5742d769fa7a00cea2615e679e2e
+ * increased test coverage by testing also the old EventLog methods
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+* 26ee9d9311f353327184f3f4b91378a1aa2cdc9d
+ * dependencies sheet script
+
+
+---
+
+
+## pm4py 2.7.8.1 (2023.10.12)
+
+### Added
+
+### Changed
+* b3d88dcfa6553beae4b289191d6aa29020daeeb2
+ * refactor pm4py.llm.abstract_log_features (split in two methods)
+* b9f74be6ffb68ac1b8c32d6c2cfb3cb3ae5d173c
+ * playout variant selection in the simplified interface
+* 5aedd3048a9780816f37ad7f89c65a3e56b5229c
+ * support for log2log alignments in the simplified interface
+* b254210f09d1844dee11b9ccd262baf62779edca
+ * return legacy log option in pm4py.parse_event_log_string
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+* 9717be4fc6be34c9278ddd7f2d39a0cb8efc4ec2
+ * verbose option configuration
+* 671688effb5ccf01d5653726de6725810333af0a
+ * support to OCEL 2.0 JSON specification
+
+
+---
+
+
+## pm4py 2.7.8 (2023.10.06)
+
+### Added
+
+### Changed
+* 634b6a5ac1b40963baa76a42a10c3c22176aaf84
+ f6993293d665e2f7b69c27ce0f09d2df4e889b0b
+ f0240670292086cb3b6fe523b1646dcfa4c71ddc
+ * Refactoring OCEL import/export
+* c1379120480539f5578a52ce6d76effb4819b3c6
+ * centralized enabling/disabling of TQDM progress bar + Disabling progress bar in tests
+* 08c2c16d17d2cbe26224662032a298f6b0a409a9
+ * avoiding the necessity of re-creating setup.py when new packages are added to pm4py
+* a7dc86f7fd821b5dd229ff404b5afa3b5ad919b4
+ * disable IM fallthroughs in the simplified interface
+
+### Deprecated
+
+### Fixed
+* 063a6d64bae61f1b54444e0b34ec0926b504aa34
+ * properly closing file objects in different pm4py importers/exporters (XES, PNML, PTML, ...)
+* 35f13b65a0523f889748679fbe90cf2d041e1038
+ * fixing XES importing warnings in obtaining the resulting pd.DataFrame
+* ef548ef18f514ad6ad0a32a104f380b322ab72e7
+ * fixing test/examples execution
+* d1b39bde1b14f160c0fff42bdc6b172bb0ae760e
+ * fix Petri net serialization
+* e51c5e1e084a7fd7d13cb8d1381f868435762cca
+ * fixing TBR diagnostics when the methods are called on pd.DataFrame
+
+### Removed
+
+### Other
+* 49a472d002890b35e3f59ef93fd75f2e35455715
+ * storing stable pm4py Python requirements for the old Python 3.8
+
+---
+
+
+## pm4py 2.7.7 (2023.09.22)
+
+### Added
+* 056d9e5714e2ad0a21fbcac0725ea4fb7aae260c
+ * encoding specification in pm4py.read and pm4py.write classes
+
+### Changed
+* f81d62ad8dc8a76aabdf90763a8bd8b8e2ea2aa9
+ * fixed compatibility with Python 3.12 (removed deprecation warnings)
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+
+
+---
+
+
+## pm4py 2.7.6 (2023.08.28)
+
+### Added
+* 69e6692ff08868586f9d4d29c6b8e7dd6609c732
+ * rankdir option for simplified interface's visualizations (and fixing here and there support in main methods).
+
+### Changed
+* 95bbaee94e177644ac12d526abbba0eafdf6eb00
+ * refactoring of the textual abstractions of the DFG and variants (split in two methods + provision of primary and
+ secondary performance metrics).
+* 710b09619ebff74a0166e9518e2390289b0f686d
+ * refactoring OC-Petri nets discovery and visualization.
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.7.5.2 (2023.08.30)
+
+### Added
+* 889f0531c0e307bfe56d933a294c61470a001e13
+ * POWL feature
+
+### Changed
+
+### Deprecated
+
+### Fixed
+* 9105eb375cb2fee7d731862b3fe5bf1ce88d455c
+ * various bug fixes OCEL import
+* 0c483e52b6ea41a4df8b83ad5e39e3c1e2dc5539
+ * bug fix OCEL 2.0
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.7.5.1 (2023.08.28)
+
+### Added
+* 6760518dea19334a21442200bef647e4c07f3636
+ * LLM abstraction of the temporal profile model
+* 13d001c76e3de40786dce75e76e56a13a821173a
+ * set of event logs for fairness assessment (hospital, hiring, lending, renting)
+* e3044278b3e7d984c7fdf9e39554cc4551332739
+ 50f59379fb8f49bbe6eb1796c6664a6057225b95
+ * added OCEL filters:
+ * length of a connected components
+ * presence of at least an object of a given object type
+ * activity executed
+
+### Changed
+* 84629e2ea342348e30aa04a7d41ad7b39159b400
+ * changed case-based text abstraction header text
+* c3886beff7abc82db56c60835479f47a76e545d6
+ * refactored log_to_interval_tree methods in two methods
+ (log to intervals, and intervals to tree)
+ * added queue-related examples
+* da3a12f615dba3c46793a2d9977dfca11dad85b0
+ * avoid annotation start/end edges in DFG with performance metrics
+* 37fba9285cfde95309142e4404f9cfbcb2b9296c
+ * visualizations support nanoseconds granularity when needed
+* afb6f6ba74c03f422ce8d8417f840f6eb6aa3a6e
+ * inductive miner - parameter to disable the computation of fall-throughs
+ and the strict sequence cut.
+* 49e738a7aee6e05ecf0ec50cd6aaa4cd0668687d
+ * inductive miner - optimization in the computation of the transitive relations
+
+### Deprecated
+
+### Fixed
+* 12c9d877e5fb27b709d06c21310ab32868c2ea74
+ * bug fix textual abstraction attributes LLM
+* 3b9fb1ffc9646cf56a0b84a9b95dfdfd9b7fd565
+ * small fixes pre-existing Jupyter notebooks
+* 17f1340cc8a1095e6cdd8a8d85b92a3800a1e7f9
+ * bug fix textual abstraction log skeleton
+* 1217473888b97a00f34834b4746bb7f7e4744df3
+ * bug fix PuLP solver with extremely low weights
+* badbff239cf8a703e7d05c1cc2fc6d51af8aa7d7
+ * bug fix WOFLAN when no basis vectors are identified
+* f528509c6b5117aca6285686e78175dbcf4ba057
+ * fixed path to Graphviz.JS
+* ca79aa9b9e51ba3a95665d5d53c8e5ab5028bf12
+ * minor fix TBR generalization parameters
+* 57a30fb452a759bc71f707e67bf0f63118194b7f
+ * method to sample OCEL connected components is fixed
+* 051d98cd0bfbf86419fe68f6cb0c1f139855cfdf
+ * fixed divergence from Github repo
+* e0cbce6b90a16ef1e21edca45b83d69e1743674c
+ * fixed typo in OCPN discovery method
+* 0af7368ce306678466df759ca15359c1e3901bcd
+ * fixed discover_petri_net_inductive multi_processing parameter
+ default value.
+* 23aae39adf83f199a3b53533c45cbae4c7a9354e
+ * bug fixes OCEL feature extraction
+* a3faf71ac4eddb22f1bc80a35c752b6b9d98df99
+ * bug fix direct conversion process tree -> BPMN (loops with several REDOs)
+* fa242485e6c99dded04d1d9c10ee1ed81ea96252
+ * bug fix OCEL2.0 SQLite importer
+* 0e1b0daad489eb8100cddd2105e6405862a184de
+ * fixed parameters in OCPN discovery
+
+### Removed
+* bf5574a34a31b93024dd9feb54acc5cc475640bd
+ * change-of-mind on format_dataframe deprecation warning
+
+### Other
+* 916ea3163119afe7aa0fc9f6c43624147d6c0f9f
+ * reference to published paper in OCEL feature extraction
+* 549aa7c6766f1a51425a7a65673173c55d9731e9
+ * updated reference to PM4Py website
+* 20ce84db4e195937c77280c950ff12083fc5833b
+ * example for log granularity change
+* 0de0be4fa11183f034fbb61e936dee365bbdea4a
+ * example for the management of stochastic Petri nets
+* 570df6c21a03e6ac37ba2d7c9af160e8b175a68f
+ * manual creation of the constraints of the log skeleton (example)
+* 959a685696da725180be0675fd00aaede9bb17bd
+ * examples for LLM-based fairness
+* 7a98fe6b943db9d2402a4b867e8f6a441cdde243
+ * docstring for OC-DFG discovery
+
+---
+
+## pm4py 2.7.5 (2023.06.30)
+
+### Added
+* f6d5a343808b350e83caac8cb0480e2ca671bfb4
+ * method in the simplified interface to get the curently enabled transitions
+* 44964d19b7052350f21d637c1a55048026d2b165
+ * replay prefix using TBR (to obtain a marking)
+* eb49b29863c65102ada2443ae66d7fe529a3d91e
+ * OCEL relational validation
+* a128100af8182070453df161a22dbb54d1c08458
+ * LLM textual abstraction of a single case object
+* 0f5b5668a8f134a36e65349f835bf4e1835ae9ea
+ * LLM textual abstraction of the log skeleton
+* 3287c53c83f0198b47c56a3ef7b15ed8d6e09b3f
+ * LLM textual abstraction of EventLog features
+* 7892697f04e14bbfecb7842139a82daf939aefbe
+ * restored OpenAI query executor
+
+### Changed
+* e414949a69e0376c0299955ecf7cb7d27f7cf349
+ * removed deprecation warning dotted chart and performance spectrum' packages
+* 8f4ebdf93c3cbb57e7427238871d4b2e048f357c
+ * added warning for dropping rows with empty case ID/activity/timestamp in format_dataframe
+* 1b35a81e58ee145d5c82029c1110234ac3899856
+ * added the possibility to specify the cae ID in project_on_event_attribute
+* 6a4025f9a430ea32da29dd4142a51473ba16c5ef
+ * optimization connected components filtering OCEL
+* c1028d56269e775167c3cb89827e02a57d263384
+ * minor changes OCEL 2.0 XML importers/exporters
+* 3287c53c83f0198b47c56a3ef7b15ed8d6e09b3f
+ * max_num_edges parameter in simplified interface's DFG visualization
+* 8e04c243a2de3e344832f719e085a0630b3a5f1c
+ * removing point border in dotted chart
+* c5056add3101b7a846a630d67062f5ca9b8c84d3
+ * deug parameter for Petri nets visualization in simplified interface
+* b11d3ae66c1ddf3be244f233efd8c7b1a02124e2
+ * moved "pm4py.algo.querying.openai" to "pm4py.algo.querying.llm"
+ * moved "pm4py.openai" to "pm4py.llm" (simplified interface)
+
+### Deprecated
+
+### Fixed
+* 437a8c8b885b8e11557ff20e9a5635eeaf4c919c
+ * fix problem OCEL copy/deepcopy
+* 2705b6b6be171bf821570f58027db531e7290801
+ * small fixes feature extraction event log
+* 8a588ff40143f585faf643a5f9cb9f7137ab32e6
+ * small fix textual abstraction OCEL features
+* 63108ee30c05a60a99f58a1fbb31dd33228c76fc
+ * fixing DFG visualization when some activities do not appear in the DFG (single activity cases)
+* 30932c4de18ea55dace9678cb87a784d7eb438af
+ * bug fix Alpha Miner on Pandas dataframes
+* 5cc3ded30c7f15ebe13d0a74894ca7f18f8a96e4
+ * fix heuristics net visualization's background color issue
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.7.4 (2023.05.08)
+
+### Added
+* 546cff5c7d91810b068777870ae20dab2b110150
+ * pm4py.openai.abstract_log_attributes method in the simplified interface
+* e9ee619300f59713c481d9fd592b3eeefc489175
+ * added get_diagnostics_dataframe method for temporal profile-based conformance checking
+* 7a410f6cb33773cb218c5ce7df37ded4844df7b9
+ * possibility to get GraphvizJS HTML output
+
+### Changed
+* 45dcc3de2ddf4348f8a7e31bae54529ec2ab9ad7
+ * consistency checks when importing/exporting OCELs
+* 9c4eb3a8512fbd20f7352341131ec2855b108b95
+ * consistency checks OCEL feature extraction
+* 091908c11a62b6708bb64adafa7a4168099b140d
+ * footprints visualization in the simplified interface - comparison
+* 69d50384784f67a74823a4a0af99a1ebf9f0c302
+ * minor improvement log2ocel conversion
+* 3e88d920caf8d0dc902af2dcc2c3dcb3d752bfe8
+ * removed hard-coded prompts from OpenAI API
+ * added abstract_ocel_ocdfg and abstract_ocel_variants abstractions
+
+### Deprecated
+
+### Fixed
+* f8b77348b47c782a709cb6ee5646715c20e35710
+ * fixed performance spectrum computation on Pandas dataframes
+
+### Removed
+
+### Other
+
+
+--
+
+## pm4py 2.7.3 (2023.04.12)
+
+### Added
+* e561089945951e91b2ecfe0f223b35bd2d351630
+ * other NLP/LLM abstractions
+* 42b0d2a6f6fe7430d382117bf0ce54e8fd60ce23
+ * return diagnostics dataframe in pm4py.conformance methods&
+
+### Changed
+* 44fc2aecd0885534dd2083a4011be9e031c3a04a
+ * improved integration possibilities with PowerBI
+* f805fd46673be291584ce489bf9def73df1dba71
+ * read constants from environment variables
+* 6737019a6de4e15d6063506e5a7ea2e571fc167d
+ * added DEFAULT_RETURN_DIAGNOSTICS_DATAFRAME option in constants
+* 0ba6b34c19587357425cb27cccb23b12d70978a7
+ * workaround for inconsistencies in pm4py.stats.get_trace_attribute_values
+
+### Deprecated
+
+### Fixed
+* 7dfeac5ddc4f4f6a8b5410fc2e04016590b6f22a
+ * fixed OCEL2 XML importer
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.7.2 (2023.04.03)
+
+### Added
+
+### Changed
+* c617471c12c1f07c092e32ccf6d76d5aa6c4ec2a
+ * change X Axis in pm4py.view_events_distribution_graph
+* cf744cb22cd6affb0a8d7ce26b9827c3e8b0b903
+ * changes/fixes to the alignments table representation
+
+### Deprecated
+
+### Fixed
+* d0ee4a8c8db76900444bc3e0026b0ea54581e9e7
+ * fixed OCEL deepcopy
+* 5fd45bdf5d3cf17f364669cba7a5fab549236e7a
+ * major fix WOFLAN
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.7.1 (2023.03.28)
+
+### Added
+* af4f00bca1ec7a3b0acc0421efe4bf895b324995
+ * insertion graph-based O2O relationships in the OCEL
+* 0bb0bad37311fd45113440d97f53a5c8255ce89c
+ * insertion lifecycle-based E2O relations in the OCEL
+* e6076a50216de31fdbd4dd00edd631a01c9e1bb7
+ * another algorithm to split/sample OCELs (ancestors/descendants based)
+* 564e2c0ec976291c283fc1b24c5ebc2b6e452f12
+ * algorithm for textual representation of OCEL
+* 3e5164b72835aaa29051f4fd6ce4329253a17f95
+ * algorithm to cluster OCEL based on the lifecycle/interactions similarity
+* 70131091d88e5e8f2627b4ff7f70f8d479bd7738
+ * new GPT-4 queries
+* f584641df13504f71c796752da1befc963f3ce3b
+ * included some simplified single-SQL-query extractors
+
+### Changed
+* 70198faa1b674c3a4e4351ff251a9af504e16a4e
+ * changing alignments interfacing in the simplified interface
+
+### Deprecated
+
+### Fixed
+* 8f5d5057f24bce7c3825e3f6d34b15e15bc15025
+ * wrong condition in the visualization of the alignments table
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.7.0 (2023.03.23) -- Million Edition --
+
+### Added
+* ba126d3f4211cb237dae4b09dec5574224666237
+ * initial OpenAI integration
+* 05b6425637768312bf4768a252ee410c3bd5a35c
+ * easy-to-use (local computer) log extractors for Outlook, Windows events registry, Mozilla Firefox and Google Chrome
+
+### Changed
+* b3c17fe017bd57889845f398e08fa95d94a8c800
+ * add flow id to silent transitions in BPMN Petri net conversion
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.6.1 (2023.03.14)
+
+### Added
+* c9eac43f4b55883056a3540857b470ac18cc922e
+ * extract_ocel_features method in the simplified interface
+* d2744bf87b0ce80ddc8d42a5b935424c36ffb82f
+ * possibility to conisder additional event attributes in the convert_log_to_ocel method
+
+### Changed
+* 84e85c6e4715fe58159f6cfb83248d1cfa28bc8e
+ * possibility to return additional information during the conversion of BPMN to Petri net
+
+### Deprecated
+
+### Fixed
+* e1b126c5adca8d5767375a6737a9d9378a9093c6
+ * bug fix object-centric Petri nets discovery
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.6.0 (2023.03.13)
+
+### Added
+* 73254a80b3430140fac2ff023a6e356edc48dd0f
+ * ILP miner (process discovery in ILP)
+* 7016026a2a514d529fe5cf9a49b4aa607d30183c
+ * "timestamp grouping filter" and "consecutive activities"
+ filters for Pandas dataframes
+* 4ba2a9e873c972c96fed8f3912f0dbaa8dfc96a1
+ * added pm4py.insert_case_arrival_finish_rate,
+ pm4py.insert_case_service_waiting_time,
+ pm4py.extract_outcome_enriched_dataframe
+ methods to the simplified interface (Pandas dataframes)
+* 18b250e38bcfeb08cda549df94de98ce5c5b484e
+ * added baseline log clustering based on profiles
+ (Song, Minseok, Christian W. Günther, and Wil MP Van der Aalst.
+ "Trace clustering in process mining."
+ Business Process Management Workshops: BPM 2008. )
+* 690716015f2452702b8f045e35e2029659bbd226
+ * log to target vectors (for ML purposes): next_activity, next_time, remaining_time
+
+### Changed
+* d6d2301dd0d2ea57cba76015eba124f726f4544e
+ * introduced optional "lifecycle paths" feature
+ in OCEL feature extraction
+
+### Deprecated
+
+### Fixed
+* 0a1c6f9c6e0ff45a0e732978589ed17513899be8
+ * fixed dependency on Simpy in __init__.py
+
+### Removed
+
+### Other
+* a313db141148a960d7eb5126831bc1f8829a2ca4
+ * made fundamental and optional requirements clearer
+
+---
+
+## pm4py 2.5.3 (2023.03.05)
+
+### Added
+
+### Changed
+* ea0da47ff6faaddb087ffa2344c6139c30978dca
+ * SVG position parser utility (replacing text-based parsing in Graphviz BPMN-based layout)
+* 9ea35fe209982f87f478262e1398e8474b3be1ba
+ * working variant for generator of all optimal alignments
+* 3f07223236eb350a72db87c8a708dcea13c1a5a3
+ * refactored df_statistics.get_dfg_graph method and DFG visualization
+* 268311a99ee7d2df245026371ab7449538ffcff8
+ * support for object versioning in OCEL
+
+### Deprecated
+
+### Fixed
+* 5d4bbb60bf940f8c5d654de0c8ecaec8cbb44d48
+ * fixes for Pandas 2.0
+* ea09b4910874dbb165277a4de93286c05ac0ba5c
+ * carefully performing SQLite3 import (DLL compatibility issues with Anaconda)
+* 06217786793dc7fa22706ecc143778d8ebbe3d2e
+ * fixed indeterminism in edges filtering during paths percentage filter
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.5.2 (2023.02.11)
+
+### Added
+
+* be6ac2f1c611da6abcb6ea10df0280f7b9ecb0f0
+ * added internal conversion method for Petri net type (classic, reset, inhibitor, reset_inhibitor)
+
+### Changed
+* 87280959eb1612d01bbd4183d951f2c33750fed6
+ * added ADD_ONLY_IF_FM_IS_REACHED parameter to Petri net playout
+* 38af1dabd9cf3478a6b728be5a602150ed837c7c
+ * playout Petri net simplified interface: detecting the correct Petri semantics to be used
+* ffffc623e6c52af2df0a4f3bb33fff5aa49b5588
+ * added FM_LEQ_ACCEPTED parameter to Petri playout
+* df84b4702fc81ab3427330f05c6b5dfb572f595e
+ * possibility to decorate heuristics nets with performance from the simplified interface
+* e418e25a0008828337a92b23f57a0980baa8f24a
+ * changed convert_log_to_ocel to include automatically additional object types from the dataframe
+* fbe086eaff9683562ada39a14fb6bdd86d52c50b
+ * added constant for the default Gviz representation format in the simplified interface
+* f746d8811fad34c082ddac3028f0269bdade0a15
+ * more efficient WIP implementation for OCEL
+* 57167b094edcaeb01fc14e7d495a6bbc2d9907eb
+ * raising warning when parsing a XES log below Python 3.11 because of potential ISO-format parsing problems
+
+### Deprecated
+
+### Fixed
+* b012df622c9bf28c3adf8cf4b53eaa2d6ec5efad
+ * fixed JSON/XML-OCEL importing (missing coherency check)
+* 5a4d5a276c0a6c2dd33ebe930cdf60b5183c48a1
+ * setting correct variant when applying pm4py.discover_process_tree_inductive on a DFG object
+* a5bc0b96d9b79ae8d4ea26be03f4b8154837f567
+ * bug fix Murata (removal place from IM)
+* 91c20ccd0d6c88d76519e174b7e11ab82ac6a180
+ * bug fix process tree obj get_leaves function
+* 480c4fd1a3f35f8312927defd09b4a89665e6f71
+ * bug fix convert_ocel_to_networkx variant
+* fc941525842a41bc5d712526ef17177d7f8be763
+ 12ef518b00f16c5e1b6b8d5d3fc749959bc836ad
+ * fixed SNA visualization (variant & HTML)
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.5.1 (2023.01.30)
+
+### Added
+* 23d5b0a81bbffbb69175aaa7cfa78e1ea0b78b6d
+ * adapted OCEL object to optionally support O2O/E2E relationships.
+
+### Changed
+* 284bd275ae444a72e3c81662b7aded4921befde4
+ * updating Scipy adopted LP solver from simplex to highs (4x faster)
+* bc1f21ef4e83af66f1202ef82e389e5b5cb38ae8
+ * moving utilities for sojourn/service/waiting/arrial/finish times computation on Pandas dataframes
+* 7e59696b0d4c9fd659dc0594cff3c07fc504df5e
+ * OCPN discovery - specification of the variant of inductive miner to be used
+* b32cada268fea2a9fdfb420821d9877d9144770d
+ * removed deprecation warning on Petri semantics
+
+### Deprecated
+
+### Fixed
+* a6a1f14cfc1714a5039dd445ea14091e3e8579c7
+ * removed extra parameters in pm4py.discover_petri_net_heuristics
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.5.0 (2023.01.19)
+
+### Added
+* e246a681298282e280d0a5d8c90958e1e4bfa139
+ * add cadoso and extended cardoso simplicity metrics
+* 34303df3a72e8d0c699f9cb61938c6c08a989274
+ * add discovery of Stochastic Arc Weight nets based on OCEL logs.
+* 32b74bb6125e1e914caab404514b606ac119d4f0
+ * add Murata simplification to the simplified interface (implicit place removal)
+
+### Changed
+* e7f79a47d6349644ef33c137a9eea34e57b7224b
+ * changed process tree conversion to Petri net to follow the standard DO-REDO paradigm instead of DO-REDO-EXIT
+* 9adf32e3c934f9d9f458a1d87dfdda869358e79f
+ * scaling positioning nodes BPMN layouter
+* cc34a30e5a7dbac292f0bb784df28ade94215140
+ * removed searchbox in docs theme (not working with current version of sphinx)
+
+### Deprecated
+
+### Fixed
+* 479dc5c1afef98b2ae3b67b918568465b1c7c72b
+ * bug fix inductive miner DFG missing parameters in LoopCutDFG
+
+### Removed
+
+### Other
+
+
+---
+
+## pm4py 2.4.1 (2023.01.09)
+
+### Added
+
+### Changed
+* 9e815620924b2bae5a83b85539f38f344d4293d2
+ * fontcolor support in visualizing invisibles.
+
+### Deprecated
+
+### Fixed
+* 26fe3ea4ec65b668002163ae451436a4452f0b20
+ * improved compatibility with Pandas 1.5.x (faster date processing)
+* 93ee76af7cd23816d8891d6e7925011dc4d0399e
+ * fixed compatibility with Python 3.8 in typing
+
+### Removed
+
+### Other
+
+---
+
+
+## pm4py 2.4.0 (2023.01.06)
+
+### Added
+* 7d3b0cb107452b9f7fa3d3c3e1c3609e3c5827dd
+ * Murata algorithm (Berthelot implementation) to remove the structurally redundant places
+* 6fc781328a550a339e6e48d03f0e75464ad5249a
+ * expose in the simplified interface the reduction of invisible transitions
+* 21a79b0132aaf5e2d6ac4efbb31995fba91dd46b
+ * add support for calcuating stochastic languages of process models
+ * add support for calculating EMD between two stochastic languages
+* 9186c5bac228383e3b2addba6e5205e6e0ce2a8d
+ * add visualization of alignments in simplified interface
+ * add visualization of footprint table in simplified interface
+* 82e20325229a3ae4e9c045ab2cfec3070ab02005
+ * add conversion of Petri net object to networkX
+* dfbd6c27c09ecb45c3dcf7edb35093455c09c429
+ * add support for stochastic Petri nets
+ * add support for stochastic arc-weight nets
+
+### Changed
+* c56c3ca6dd1068380ac7a0dc79f6fe64410e8d78
+ * changed Petri net visualization in order to provide decorations for places/transitions/arcs
+* 63371dbad1f9e9cf2e53a6b38977fd22f02661df
+ * changed xes importer to support returning the legacy event log object
+
+### Deprecated
+
+### Fixed
+* 0bc31a7406f961122c3a124710d1a1ce8b6c74db
+ * fixed Scipy lp solver in order to allow for variables integrality specification.
+
+### Removed
+
+### Other
+
+---
+
+
+## pm4py 2.3.4 (2022.12.23)
+
+### Added
+* 89ca01e1378cb2cfac21f5d58e0e4fea44ca2186
+ * extraction of temporal features (system dynamics log) in pm4py
+
+### Changed
+* 7a40a3cff6b0b4a12b2fe4ca7bd08bf963917443
+ * Improving the performance of streaming DFG discovery
+* ec766d97c9b8557324ab11a862d6630091a92059
+ * Removed Pyvis and Jsonpickle as explicit dependencies of the project
+* 04691455f47bc4ec84bb26ec7c5f6d187db1d41f
+ * Removed Sympy requirement (re-implemented null space in WOFLAN)
+* b4fac01dff29ff34d6f0bb97e4398a101139d5b1
+ * Enabling disable_variants by default in TBR when place fitness is required
+
+### Deprecated
+
+### Fixed
+* 4b5c035f4a744c8de4efb7969a6f0abcfdd966d2
+ * bug fix between filter on EventLog
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.3.3 (2022.12.09)
+
+### Added
+* e2e4d357e2218a48f9b2d6b89690fbbe61cd6906
+ * importing/exporting from/to SQLite
+
+### Changed
+* 246be6c1aa1a3216faebf1440c38d59485621f4b
+ * Visualization of heuristics net - avoid totally unconnected nodes
+
+### Deprecated
+
+### Fixed
+* 2e560757b4717a94e8f774de4b42bbb26bcdfc12
+ * bug fix TBR decorations in Petri net
+* 743151159a3f240ea6cf0756bd9ae24ac5cac10b
+ * cope with changes in the deprecation/packaging packages
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.3.2 (2022.12.02)
+
+### Added
+* 55cf77276573efcc6d67ed1a51871914ba34f84e
+ * instantiation of some objects directly from the pm4py module.
+
+### Changed
+* f887397e9abf2e9f85b48b941aa2bd4a892600a0
+ * parametrization scale factors current BPMN layouter
+* 35171256a7378f55713cec3b835b3418ecf4d356
+ * bug fix heuristics miner ++ on Pandas dataframes - Parameters are not passed
+
+### Deprecated
+
+### Fixed
+* 523589e13dfb6f5a8070478c245fc2a8058751ec
+ * raise exception when unsupported OCEL file format during read/write
+* 394960d9eabcc0ac2eb40520b2866a3e21178d7c
+ * fixed statistics.traces.generic.pandas.case_statistics.get_cases_description to support the start timestamp column
+* 0bd2caf62742627f840a5cde5486a0b92eaafeeb
+ * bug fix discovery DFG typed
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.3.1 (2022.11.26)
+
+### Added
+* cde09b3bdc122e0f38d62c5cecba26a6d1d9e4b6
+ * new variants of alignments - generating all optimal alignments
+
+### Changed
+
+### Deprecated
+
+### Fixed
+* 37dc750566da858c738a94ea242160cada28a43d
+ 37e7e92db973497b23b30610a005512bd2d3268a
+ * fixed tests and examples
+* 75ae8d12555d0fe354b55e3f99d09287ef4c5fd6
+ * fixed pm4py.read_xes problem with some conversions to DF
+* ea72675caf93f5e32bc146f6cef7f86d0769c747
+ * fixed inductive miner entrypoint function
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.3.0 (2022.11.25)
+
+### Added
+* 00a7ab36bda245d16a35ae6fff2bfb51d8ff8aea
+ Adding several methods to the simplified interface (process discovery/conformance checking using log skeleton, temporal profile, batch detection).
+* feeb1891f82014b3e86a4c5301c237226acc8fad
+ OCEL - Visualization of object graphs (object interaction, object descendants, ...)
+* 15964a428e2e0fc50dcc96570fba39f2e0d40099
+ OCEL - Added some filters in the simplified interface
+* fefe740338b702eafb7049a8f777f48f464d157d
+ * OCEL - insertion of an attribute pointing to the parent object
+* 88c58a1c6809388be58db2ea6e64fb9b58d913d6
+ * OCEL - sampling objects
+* 40c741c8298584402cd9ea8e86bcca09f2bfd857
+ OCEL - Method to get a temporal description of an object-centric log
+* d63929cc36b1aba941f88efac05af3b25a384787
+ OCEL - method for objects summary
+* fdd87eb41e54ce8d179ae3030fd9e15ea74320e8
+ OCEL - expansion of the set of objects during filtering on object identifiers
+* 908d0aa843f1a4e9f4a6c69139a3be755c2e8555
+ * OCEL - conversion to NetworkX DiGraph
+* 5c7cc41b94810ec93f388f8014f2a3820d0063f2
+ * EventLog - conversion to NetworkX DiGraph
+* e7b4f712e1bd9475c73be5bc82c9a22eb0b745b5
+ * OCEL - objects interactions summary
+* 43b5976f7040a77c0aa32f5a28c508eb19966fa1
+ * OCEL - methods to merge duplicates
+* 3cc1a19f42420e034a7489f1c695fea788e9087f
+ * OCEL - methods to manage duplicates, sorting and time-delta for events
+* 2c729e28e7f536acbd0919d88cf035a23542a3ae
+ * OCEL - conversion event log to OCEL accepts several object types
+
+### Changed
+* f6b7714eaf79e1c57e4283163a51631f0ea8d964
+ default variant representation is now a tuple of activities instead of a comma-separated string
+* 642dcdf2cc538d384c1869436879d7d0602e3fa0
+ refactoring PNML importing: auto-detection of final marking shall be optional
+* 85cea58442348684440890612db8b5511491e0d2
+ refactoring XES exporting in the simplified interface
+* f60fd1ded3210adb91345be49343cd0dceaecc6d
+ refactoring usage of type() and isinstance() throughout the code
+* faabe5ee17ae6fb10e77637e614db5d764d66e93
+ introduced proper ResetNet, InhibitorNet, and ResetInhibitorNet classes
+* 070d0467bda22d81b4166c2b3646333a23897f81
+ different OCEL exporters methods are now available for different outputs, instead of having a single method accepting a path with an extension
+* c614474e477a02836bd36f0b40db4b8ef37b78a6
+ made extension optional to write methods
+* f89a1dfa797da4581c4cbbd8cde482caf2402ca4
+ c768e5a33e5e2f872fd2dc0d45a11d589a130629
+ documentation is taken inside docstrings and formatted using Sphinx
+* 7640c79932ef974524ca4424f91c6b9416401a8d
+ brand new implementation of the inductive miner, also with multi-processing support.
+ the .apply method of the inductive miner is now returning a process tree object.
+* cc74d5ebcd7181626d79d60b2a883ad061cd85ba
+ re-implementation of business hours in a slot-based way.
+
+### Deprecated
+
+* 6184f7f9e4e323a222a28ed046686eb9f0d6b3e8
+ deprecating the usage of the EventLog class
+* fddc1c0936514d819be77c993913a96172680f0e
+ deprecating some packages for removal in future release (hierarchical clustering, comparison, alignments with edit distance, decision mining, earth mover distance, log to interval tree)
+ * 000f23ca65226d66f52d85f9b876ec68669f03e0
+ deprecating the format_dataframe function.
+
+### Fixed
+* d066d3f49a996c30d151031d66de90db4f4d9a2e
+ * Fixed issue with OCEL-CSV importing (Pandas index_col)
+* c38348df9cf165fd94a2e69ba29601e1643e80ae
+ * Fixed issue with OCEL-CSV importing (relations dataframe timestamp)
+
+* 22ec9ab7220088ef7535760dd93197092d6bf04a
+ 5c0b0d439c1a613ff78d4d24b7a05b7aa4150ce3
+ 9b90c2c18b708d39e3c75f8b2e25433c7e8b447f
+ ba6b55b84d1f7191d578e0d5535c49ef1930ce65
+ 4d5765052fe4085fc8f8340e72a353369705b878
+ making methods directly working on Pandas dataframes
+* ba6b55b84d1f7191d578e0d5535c49ef1930ce65
+ 4d5765052fe4085fc8f8340e72a353369705b878
+ aea15814ba8f67a51fce1ec0beebd9a4a3721a19
+ adding common parameters to simplified interface methods
+* f8482b9e9aa4376543ad5d66d22fb04de0639530
+ missing parameters in heuristics net discovery
+
+### Removed
+
+* d2a95d306362f54e08070b98193abbf8498ba70e
+ removed all deprecated code for this release; standardized object definitions
+
+### Other
+
+---
+
+## pm4py 2.2.32 (2022.11.10)
+
+### Added
+
+### Changed
+* cfb9f37a15a6b990f32ceaab28f1e2153e36c23d
+ * Update WOFLAN to include diagnostics in output
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.31 (2022.11.06)
+
+### Added
+
+### Changed
+* cc232ddc00528a0e7d568565c6b8fe76e2e38f71
+ * fine tuning existing BPMN layouter
+
+### Deprecated
+
+### Fixed
+* 43026f0d22605bafd104c9c752511b3a00c3988c
+ * missing encoding parameter in PNML importing/exporting
+* 07493cc94e40652983eeb7b25f911654937f0ae6
+ * bug fix Alpha Miner - check if the new place candidate pair has
+ causal relations between all elements of the first and second part
+ of the pair.
+
+### Removed
+
+### Other
+
+---
+
+
+## pm4py 2.2.30 (2022.10.13)
+
+### Added
+
+### Changed
+
+### Deprecated
+
+### Fixed
+* 32a4fc9e4ab23418493f281fc262615f2ff4c436
+ * Fixed trace filter
+* 4c5599ff60f4e448198a1971a669c4bf3a4154fe
+ * fixed issue with SNA HTML visualization
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.29 (2022.09.16)
+
+### Added
+
+### Changed
+
+### Deprecated
+
+### Fixed
+* d066d3f49a996c30d151031d66de90db4f4d9a2e
+ * Fixed issue with OCEL-CSV importing (Pandas index_col)
+* c38348df9cf165fd94a2e69ba29601e1643e80ae
+ * Fixed issue with OCEL-CSV importing (relations dataframe timestamp)
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.28 (2022.09.02)
+
+### Added
+
+### Changed
+
+### Deprecated
+
+### Fixed
+* 1343827595d4cfd9f6b5743bb378443079ce281c
+ * fixed sorting in DFG filtering
+* acea877fd9000c8e6a62424c15d4a29c33d08eba
+ * fixed bug of LocallyLinearEmbedding(s) with newer version of Scipy
+* 55acf9c08d25886f384bb2e993d653af90874f3b
+ * fixed construction of tangible reachability graph
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.27 (2022.08.19)
+
+### Added
+* 58e266610e82cfcc41868313f7b9ccfd9975d49c
+ * discover_objects_graph utility for OCELs.
+
+### Changed
+* 1cbd37ac4b54a4c0e943b506ed685435f003640b
+ * performance improvement batch detection on Pandas dataframes.
+* 94dd96e0095f7cb1ef8d1eb48bd3da0a3cd85793
+ * minor changes to DFG variants simulation.
+
+### Deprecated
+
+### Fixed
+* 98fd3c740d8b6ae2dfde4d7a018f181030f22175
+ * fixed reflexivity in EventLog eventually_follows filter.
+* 9423897cdf0ea293ff1b032a0d4fa49ba746709c
+ * fixed chunk_regex XES importer.
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.26 (2022.08.05)
+
+### Added
+* 2146fc42020f11a364a98b724d6c6a44fcbcbb41
+ * trace filter
+
+### Changed
+* 5c06d520182317d140bd1b82d9d986c3edc81cf7
+ 6a2eb404ba240b2c04eb91e7cf1407f72c5ae3e5
+ * minor fixes to DFG simulation
+* fe1aa9c5efa7dc274e728a769625a784d7f87c6f
+ * added default option for background color setup
+* ac080d2702192b588cf80444dd44fe447d14ede9
+ * background color as parameter in the simplified interface visualizations
+
+### Deprecated
+
+### Fixed
+* 9c12ffba4e4d1043fa4ad2ffe8349b13d7fa06f3
+ * fixed the exporting of Petri nets (Petri net name property)
+* 7fdb3074c6924e5957f973a76ff34ae5dc7bc815
+ * fixed the visualization of heuristics nets
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.25 (2022.07.29)
+
+### Added
+
+### Changed
+* ce94110076e3269c96a6eee61d7618f08f44472a
+ * optimization in the calculation of the eventually-follows graph on Pandas dataframes.
+* 3cca8f97bbd09f4ae5644dcc156489d4b2037028
+ * optimization in the calculation of the performance directly-follows graph on Pandas dataframes.
+* 4d8721787a50da397b265678be614c94894ea851
+ * column reduction in DFG calculation on top of Pandas dataframes
+
+### Deprecated
+
+### Fixed
+* d754ccdac680f610b2b628dc9830d92da6954dc1
+ cb76238c29b986026f07261c11a1c09a667c9ab9
+ 54970a58927ad0e17b173bff17705a10f5344d92
+ ef575a8bf0519655bcf8a57b981c7fa3c018db7a
+ * small fixes in OCEL utilities
+* d0094fa4ccc815b57ccc519d15ccbda6399c2ef7
+ * bug fix eventually_follows filter in LTL checker when timestamp_diff_boundaries is provided.
+* eb8617de0cfcfebf7374b4545660158e4b4291b6
+ * bug fix eventually_follows filter in LTL checker on EventLog objects.
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.24 (2022.07.12)
+
+### Added
+* 43800f763a2aede807ad40231f771c6ef19e0098
+ * added some examples for XES and OCEL generation out of a database
+
+### Changed
+* f72e011d38cec44823c00248039812a3fa0cfc7b
+ * application of the strict sequence cut in inductive miner (IMCLEAN)
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.23.1 (2022.07.01)
+
+### Added
+
+### Changed
+* 43e55f63d86e424e882617af7b0a483ffe653069
+ * setting default alignments variant to Dijkstra when no linear solver (Scipy, CVXOPT) is available
+* 5ff00475659c38792ebab685fb23b282c75c36c0
+ 209558a0d6d4c43708389a0002fc7c62bd9f89e9
+ * optimizing retrieval and filtering of start/end activities from Pandas dataframes.
+
+### Deprecated
+
+### Fixed
+* dc94e82825bd5994667dd9c6cf2e1908379db923
+ * fixed problem(s) with the log skeleton
+* 1bd50ff5354317d57297e63d140618ffa7a58ef6
+ * bug fix in exporting OCEL(s)
+* 7c6c30ffcff04d3151f249556af9405402fdee83
+ * fixed problem with WOFLAN algorithm (LP solving)
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.23 (2022.06.24)
+
+### Added
+* 09c97115cfaafa033c595ddff089701a28bf1599
+ * added starts-with and ends-with filter on Pandas dataframes.
+* f373955163ad58e6da3d762380b4f9802ac806f0
+ * new OCEL filters made available (event identifiers, object identifiers, collection of object types, connected component per object)
+* 2051ff1f5985ec34362a16d1f369e062220d7d1b
+ * new footprints visualizer (symmetric comparison between differences in footprint matrix)
+* 0c6d023535f18318f1f7f78fec21f3565ce229cd
+ * new OCEL statistics made available (temporal summary of the log, objects summary)
+
+### Changed
+* 1f36b168d33d6dd48f4e20fd16b7a71e25c6de67
+ * allow exporting trace-by-trace to disk in .xes
+
+### Deprecated
+
+### Fixed
+* 3396465f6d6944c84bbdfcf2bbe380b80c442350
+ * fixed inductive miner example's path
+
+### Removed
+
+### Other
+
+---
+
+
+## pm4py 2.2.22 (2022.06.10)
+
+### Added
+* c7e04d3e8d4a3fc1859e50793a0693040602dd3c
+ * add starts-with and ends-with filter
+
+### Changed
+* 9bb6ad473bf46b2ca6a378193e2e3042bed98d31
+ * added the possibility to provide additional parameters to Matplotlib's plots
+* 0489353a21ce7a4044d775ed505f476556d2b4e4
+ * increased performance of the PM4Py's insert_partitioning method
+* ab196c5a2ee1430dfd7cef4943f7275aa5405873
+ * increased performance of dotted chart / performance spectrum representation
+ by disabling automatic layouting in neato.
+
+### Deprecated
+
+### Fixed
+* f45883421423ca49139adf24490625ad2980fc92
+ * Fixing OCEL processing when an event has empty object map
+* e45a136198b7dbf546d97a65095d2b126133a754
+ * Fixed problem with footprints discovery on loops (process tree / Petri nets)
+* 3b2082f744966e9c453013df41c15828b971e94d
+ * Alignments: Timeout results in an exception on fitness calculation
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.21 (2022.05.12)
+
+### Added
+* 65ff8ae3d9bca71f0cf7be507c9e0eba68b85c42
+ * add chunk-based xes importer (CHUNK_REGEX)
+
+### Changed
+* d982c534aac373c347a083739b68fd3ac2b29e42
+ * changed dimension of endpoints in BPMN models layouting
+* 7473a72877e29261780adf746d134b406a912dd7
+ * interventions to increase PM4Py's compatibility across different platforms
+
+### Deprecated
+
+### Fixed
+* 882aa20b20ec593e0a7d01e027a6f1afa8d44f84
+ * fixed XES line-by-line importer for booleans attributes
+* f6542cd12413f073eb51173804f68502e3026f46
+ * fixes XES line-by-line deserialization
+* 363580b757c027ff583d33dcff83e00b3be97659
+ * fixed issues with Pandas dataframe's index usage in the library
+* 58a763b4099b40c67f23a6eb45c621d1b9a9d324
+ * fixed OCEL default constructor to set default columns in the dataframes
+* 8470f22047667d1d30415a08965af1015d66adbb
+ * fix division by zero error in alignment-based fitness (side case for empty trace/model combination)
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.20.1 (2022.04.10)
+
+### Added
+
+### Changed
+* 344fb7258df17ce0d4ffe7425b678943f6f2ff11
+ * Minor refactoring to management of inhibitor / reset arcs (importing)
+
+### Deprecated
+
+### Fixed
+* ad2cba1d8f9487dbb03ec418643b329b30e80ee0
+ * Minor fixes to the retrieval of the parameters in several parts of the code
+* 65e1f1b0bbd0747fe81eb049780874608a395d6e
+ * Fixed bug in eventually follows filter (simplified interface)
+* 60cd060edeeaa17c8b5bdaba7bb1035fc385d514
+ * Fixed XES exporting when attribute value type is a Numpy type (numpy.int64, numpy.float64, numpy.datetime64)
+* cd5e55e712697a28cbfe0182e96556531b520667
+ * Bug fix feature selection and extraction on Pandas dataframes
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.20 (2022.04.01)
+
+### Added
+
+### Changed
+* 762fa3ec987705f12a42decb13862323f600e3c9
+ * apply explicit conversions to event log throughout pm4py code base
+
+### Deprecated
+
+### Fixed
+* 1bcadff3acacfda2463cf9325f873004e15ed915
+ * Bug fix / efficiency change on the format_dataframe utility function.
+* d8797f574d605ad1591c66a96c1f54346c856878
+ * Fixed missing import in DFG performance visualization.
+* f4f5a0eee8218be5c575fe8b42ab59e335979d53
+ * Fixed hardcoded parameter in feature extraction interface
+* e61fb3f7a763a89cfb221b3c37c1b140620f5df9
+ * Fixed performance DFG visualization when all values are provided
+* fb9c152afdf6b91c3b26efa09d8233e99c55b907
+ * Fixed progress bar behavior in TBR-based ET-Conformance
+
+### Removed
+* 639aeb64bf5febf5f5719622d6d90c4a3c5cd8be
+ * Removed ORTOOLS as available linear solver.
+
+### Other
+
+---
+
+## pm4py 2.2.19.2 (2022.03.04)
+
+### Added
+
+### Changed
+* f5575aa8
+ * Cleaning unused parameters in PTAndLogGenerator
+* 65137038
+ * Changed WOFLAN linear problem solving to default interface
+
+### Deprecated
+
+### Fixed
+* 150184d3
+ * Small bug fixes BPMN importer
+* 7221385a
+ * Issue in DFG visualization when the provided start/end activities are not in the graph
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.19.1 (2022.02.11)
+
+### Added
+* a193603e
+ * Event-Object Feature Extraction on OCEL
+* 8da05972
+ * Prefixes and Suffixes filters for Event Logs + Exposition in Simplified Interface
+
+### Changed
+
+### Deprecated
+
+### Fixed
+* cbf848ef
+ * Bug fix BPMN importer
+* ff0dfc4b
+ * Closed security issue within dependencies
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.19 (2022.01.25)
+
+### Added
+* eea18398
+ * possibility to return the Pydotplus graph inner object in the Heuristics Net visualization.
+* 52ddbf75
+ * support for different attribute keys for the source / target events in the DFG discovery and paths filtering on Pandas dataframes.
+* 29bd86a6
+ * possibility to specify different shifts for the different working days of the week, inside the business hour module.
+* f1e124a4
+ * possibility to move an attribute at the event level in an OCEL to the object type level.
+* 0da4c3f6
+ * custom semantics for Petri net to reachability graph conversion.
+* c7c7ed5f185b492f7b6206b04f037a119b80541b
+ * add "week of the year" option in get_events_distribution method
+* 5b5c04874e449bda60463ade6e2cf1a8218e6908
+ * add prefix/suffix filter for pandas data frames
+* 877701fa0e348a5bd58eb84ed984b60292db9f55
+ * add additional features (useful for instance-spanning constraints) in trace-based feature extraction
+* 7359807b60aa3b1ece798d1ef0cdd6a19fac9f6b
+ * add rebase functionality to pm4py (changing the default activity/case identifier)
+* 84742ce331dec418841d99fafb24a82c48c21e7f
+ * add support for interleaved operator
+* d7e232a987e4a0c15e28b9cf2ae6c15ce324031f
+ * added various additional interaction feature extraction methods for OCEL
+* 9caf5597d59ff9eb70879ba42dbfccd9785009af
+ * add new thirdparty dependency structure in third_party folder
+
+### Changed
+* 74ce9b95
+ * setting all the arcs of the Petri net visible when there is at least an arc with weight != 1, for coherence reasons.
+* 21832737
+ * inferring the activity frequency from the DFG in a more generic way with regards to the type of the inputs.
+* 87fe5afd
+ * changed tau printing in process tree to string representation, from *tau* to tau, for coherency with the parse_process_tree operator.
+* effce8d8
+ * changed BPMN namespace in BPMN exporting to ensure compatibility with BPMN modelers.
+* 2200a0f5d6d23a1f797199cb834b37e07d8d396e
+ * add pn to nx converter that returns two dicts for node mappings (pn->nx and nx->pn)
+* f9ad1a400846dbdb01f48714df0a3119069a05ea
+ * ```pm4py.format_dataframe(df)``` no longer replaces columns, rather, it copies the data into fresh columns
+
+### Deprecated
+
+### Fixed
+* 0ad488b1
+ * Fixed problem in PTAndLogGenerator: silent transitions were added in some context also when the parameter "silent" was provided to 0.
+
+### Removed
+* d07a90873be85d95b15e562aabc6ab1f93b6b109
+ * removed ```pm4py.general_checks_classical_event_log()```
+* 034abb0d7a442572f8bd52109ac6ed5cba109d0c
+ * remove dependency on ciso8601
+
+### Other
+
+---
+
+## pm4py 2.2.18 (2022.01.06)
+
+### Added
+* c15c8897
+ * add utility function to convert SNA results to NetworkX
+* 8b300dbb
+ * add several new statistics for OCEL logs
+* 8da0f41a
+ * add frequency-based visualization (using alignments) for process trees
+* 54261cbb
+ * add progress bar to token-based replay
+* 225dcad7
+ * add OCEL schema validators
+* da6a4787
+ * add reduction rules for R/I nets
+* fefcd453
+ * additional support for BPMN functionalities: exceptions and markings
+* 417274fd
+ * add support for feature extraction from OCEL logs
+* 5f5ff573
+ * add filter that checks relative occurrence of a specified attribute
+
+### Changed
+* b82dd92e
+ * revised implementation of the business hours module, now supports input of work calendars (workalendar package)
+* 434e66af
+ * allow arbitrary arc weights visualized (reported at https://github.com/pm4py/pm4py-core/issues/303)
+
+### Deprecated
+
+### Fixed
+* 76563e4b
+ * fix bug in process tree alignment that generates NoneTypeError when multiple leaves have the same label
+* 3b6800d0
+ * minor bugfix in process tree playout (reported at: https://github.com/pm4py/pm4py-core/issues/305)
+
+
+### Removed
+
+### Other
+
+
+
+## pm4py 2.2.17.1 (2021.12.18)
+
+### Fixed
+* 2eb36ce5
+ * Bug fix in OCEL importing (timestamp parsing)
+* 512c071e
+ * Resolved security issue in data Petri nets' PNML parsing
+
+---
+
+## pm4py 2.2.17 (2021.12.14)
+
+### Added
+* 9b795123
+ * add converter from data frame to activity/case table
+* f28fc490
+ * add possibility to add the case identifier in the feature table (see: https://github.com/pm4py/pm4py-core/issues/292)
+* 12b6ec24
+ * add interleaving DFG visualizer for visualizing inter-process dependencies
+* af9c3262
+ * add first/last occurrence index per activity in the feature table
+* 9231a5d7
+ * add support for conversion of interleaving data structure
+* 06f54287
+ * add support to merge two separate logs using an n:m case-relation table
+* 146f49c2
+ * add the possibility to stream OCEL events and define object-specific listeners
+* 573c26c2
+ * add feature extraction functionality that records the position of activities
+* ff62d665
+ * add case and event sampling to the simplified interface
+* d8f71bc3
+ * add activity-position summary in the simplified interface
+* d4011ff1
+ * add link analysis code for OCEL
+
+### Changed
+* 79920a18
+ * improved string representation of Petri net objects
+* 9358fdf4
+ * minor refactoring for interval detection in event log
+### Deprecated
+
+### Fixed
+* 5dccbe61
+ * fix faulty conversion of process trees to binary equivalent.
+* 976cc601
+ * fix for: https://github.com/pm4py/pm4py-core/issues/293
+* 1e4f602b
+ * fix for: https://github.com/pm4py/pm4py-core/issues/295
+* be629d97
+ * fix for visualizing multiple tokens in the initial marking in the same place
+* a06cc1c8
+ * fix for the correct use of the triangular distribution on generating process trees
+* 51181d6c
+ * fix support for generating multiple process trees in one go
+* 9a0e2be1
+ * general revision of the process tree generator code
+
+
+### Removed
+
+### Other
+
+---
+
+
+## pm4py 2.2.16 (2021.11.16)
+
+### Added
+
+* 32af0c81
+ * time-stamp based interleaving mining for OCEL logs
+* 10dffb58
+ * support probability visualization in transition system visualizer
+* 51c069fb
+ * add discovery of object-centric directly follows multigraphs
+* fa3031aa
+ * add several filters for OCEL.
+* d4747f71
+ * implementation of OCEL-based process discovery according to Reference paper: van der Aalst, Wil MP, and Alessandro
+ Berti. "Discovering object-centric Petri nets." Fundamenta informaticae 175.1-4 (2020): 1-40.
+* 9fbd1c45
+ * add the support for generic network creation based on a given IN/OUT column in which events are connected if the
+ columns match.
+* 2b867f0d
+ * add projection utility to fetch lists of event attributes
+
+### Changed
+
+* 43a076c8
+ * add artificial timestamps to artificial start and end events
+* d65f8077
+ * case attributes are replicated in events of an event stream (for xes input)
+* 9075cbfc
+ * add trace attributes to the interval tree
+
+### Deprecated
+
+### Fixed
+
+### Removed
+
+### Other
+
+---
+
+## pm4py 2.2.15 (2021.10.15)
+
+### Fixed
+
+* 6e26b003
+ * fixed pandas performance DFG discovery
+* 92153184
+ * fixed parameters usage in simulation packages
+* ca6750d4
+ * fixed hardcoded parameters in dataframe_utils
+
+### Removed
+
+* 53af01f6
+ * removed strong dependencies on intervaltree and stringdist
+
+### Deprecated
+
+### Changed
+
+* dcebaf8e
+ * moving networkx dependency
+* f19762ac
+ * update IMD cut detection to use IM_CLEAN cuts (correct implementation of IM CUTS)
+* d5d0b49c
+ * change the visualization of initial and final markings
+* fcc4eeb0
+ * variant separator (between activities of the same variant) is now a pm4py constant, for increased compatibility
+ with other tools, e.g., celonis.
+
+### Added
+
+* 32c396b8
+ * add sanity checks on event logs objects in simplified interface
+* 5b85d5dc
+ * add utility to parse a collection of traces in string form to an event log
+* a87a39c9
+ * add support for importing XES 2.0
+* b43d425b
+ * add artificial start and end events to event logs
+* d22dd490
+ * add initial support for OCEL 1.0
+* 829f091c & 56fca738
+ * support for business hours in the pandas dfg calculation
+ * support for business hours in the temporal profiles for pandas dataframes
+ * support for business hours in pandas df case duration
+ * support for business hours in filtering for case performance (pandas)
+ * support for calculating of sojourn time with different aggregation metrics
+* 841e3e55
+ * add etc conformance for dfg models
+* 04caa3d3
+ * add dfg filtering that keeps the dfg connected
+
+### Other
+
+---
+
+## pm4py 2.2.14 (2021.10.01)
+
+### Fixed
+
+* 706d42c0
+ * bug fix paths filter for Pandas
+* c5ecaa4f
+ * bug fix numeric attribute filter XES (custom case attribute glue)
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+* 8ba67034
+ * added random variables that are able to check gamma and log normal distributions
+* 1d22d99d
+ * added dfg -> petri net translation that has unique labels (routing is performed by invisible transitions)
+* 004ec93f
+ * add support for log-level fitness in the alignment output
+* 56efe270
+ * add fitness value for the dfg-based alignments
+* d9da1ab8
+ * add raw performance values for the elements of the performance-based dfg
+* 0eeda19d
+ * when visualizing a dfg without log attached to it, i.e., incoming edges are used to count
+* 03ee6b8e
+ * allow counting of occurrences of activities/open cases/resource activities in a given time range
+* ae5a3973
+ * add various new filtering functionalities
+
+### Other
+
+* ac00be2f
+ * added the specification of Python 3.9.x among the supported versions.
+ * not suggesting anymore Python 3.6.x
+
+---
+
+## pm4py 2.2.13.1 (2021.09.21)
+
+### Fixed
+
+* 816fb4ad
+ * fixed a bug in the Pandas case size filter (the constraints were not applied correctly).
+* 40f142c4
+ * fixed a bug in the format_dataframe function (columns were duplicated if already existing with the same name).
+* 00d1a7de
+ * reverted stream converter to old variant (in a slightly slower but safer way).
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 991a09d4
+ * introduce a time limit in the DFG playout.
+* ae5d2a07
+ * return the state of the process tree along with the alignment for the process tree alignments.
+* 8b77384f
+ * refactoring of the calculation of the fitness for Petri net alignments (scattered code).
+
+### Added
+
+### Other
+
+* d58d34fd
+ * upgraded Dockerfile to Python 3.9
+* 50114175
+ * resolved issue with the upcoming Python 3.10 release
+* 89314905
+ * security issue in requirements
+
+---
+
+## pm4py 2.2.13 (2021.09.03)
+
+### Fixed
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 5723df7b
+ * xes exporter now reports on xes features and xmlns
+* 3b632548
+ * graphviz based visualizations now expose background color as a parameter
+
+### Added
+
+* 0592157b
+ * new dfg playout including performance specification
+* 85739ba0
+ * allow pandas df to be used as an iterable for streaming simulation
+* 2fa9993f
+ * path filter that filters the cases of an event log where there is at least one occurrence of the provided path
+ occurring in a given time range.
+* a7ee73a8
+ * added filter based on rework detection
+* c03b6188
+ * add petri net, reset/inhibitor net and data petri net semantics
+
+### Other
+
+---
+
+## pm4py 2.2.12 (2021.08.19)
+
+### Fixed
+
+* a374bad3
+ * https://github.com/pm4py/pm4py-core/issues/251
+* e88a6546
+ * https://github.com/pm4py/pm4py-core/issues/249
+* 84511628
+ * fix minor bug in the calculation of the handover and subcontracting metrics.
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 01fd0402
+ * The ```pm4py.view_petri_net()``` method now uses ```None``` as a default initial and final marking.
+* 72ed7d0d
+ * Improved performance of variant discovery of dataframes.
+
+### Added
+
+* 9a04357e
+ * Add rework measurement at the case level in the ```pm4py.statistics.rework``` package.
+* b725ca0b
+ * add 'between' filter for ```pandas dataframes``` in the ```pm4py.algo.filtering.pandas``` package. The filter
+ returns subsequences between the two given activities. It creates subtraces for every possible match.
+* 211e3c56
+ * added local linear embeddings to ```log_to_features.util```.
+* 4b594228
+ * add support for adding decision points to data petri nets.
+* 9261270e
+ * add support for performance dfg discovery in ```pm4py.discover_performance_dfg()```.
+
+### Other
+
+---
+
+## pm4py 2.2.11 (2021.08.06)
+
+### Fixed
+
+* 207d69bd
+ * bug fix in application of the filtering threshold in the IMf algorithm
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* d98cbb1c
+ * changed deepcopy and copy functionality of logs for performance improvement
+* f3b78a49
+ * minor performance optimization in log conversion (log to dataframe)
+* 71c0919f
+ * improved performance for pands -> stream conversion
+
+### Added
+
+* f2101a72
+ * added various additional features in log-based feature extraction
+* 41873655
+ * possiblity to directly get all performance metrics of the DFG elements
+* 886b44ea
+ * detection method for trace-level attributes stored at event level
+* d5f9f866
+ * add transition names to events, based on a given alignment
+* 4802e7d8
+ * add support for importing reset/inhibitor arcs and transition guards
+* cc6488f7
+ * add general support for reset/inhibitor nets
+* e805cf5f
+ * add support for data petri nets
+* 1d3a2e7b
+ * added case termination statistics for pandas data frames
+
+### Other
+
+---
+
+## pm4py 2.2.10.2 (2021.07.26)
+
+### Fixed
+
+* 50ad39fa
+ * Fixed blocking issue with properties of Pandas dataframes when format_dataframe is used (case ID column)
+* 3708b98f
+ * Fixed variants filter, when the output of get_variants_as_tuples is used
+
+### Removed
+
+### Deprecated
+
+* Deprecated support to Pandas < 0.25 (due to future dropping)
+* Deprecated auto-filters (due to future dropping)
+
+### Changed
+
+* Different interventions to fix the internal coherency of the project (usage of deprecated functions + missing imports)
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 2.2.10 (2021.07.09)
+
+### Fixed
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 4964d6ea
+ * minor refactoring (rename) in attribute statistics querying; ```get_attributes()```
+ --> ```get_event_attributes()```
+* 1148f6c0
+ * use revised implementation of IM and IMf everywhere, deprecate old implementations
+
+### Added
+
+* 6750bf3a
+ * add support for start time and end-time in timstamp conversion
+* e24f5b70
+ * computation of event-level overlap
+* 8cec5f9e
+ * add several case/event level statistic functions at the simplified interface level
+
+### Other
+
+---
+
+## PM4PY 2.2.9 (2021.06.25)
+
+### Fixed
+
+* daf74e83
+ * update imports in feature extraction
+* 74be3e3c
+ * minor bug fix in alpha plus (place that was created was not always added to the resulting Petri net)
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* d97b1790
+ * drop deepcopy in event log sorting (enhances performance)
+* 1d4e625b
+ * revised IMf implementation (more close to ProM / PhD thesis Sander Leemans)
+* 20aabd95
+ * calculation of minimum self distance now adheres to the standard invocation structure
+
+### Added
+
+* 598c6ecb
+ * simplified interface now stores properties (using attr attribute) to dataframes
+* 1f7a3fa8
+ * add computation of rework statistic (cases containing the same activity more than once)
+* 32c7d330
+ * add computation of cycle time (active time of process divided by the number of instances of the process)
+* 8187f0e9
+ * add distribution plots over different time-frames (matplotlib)
+* 269d826c
+ * add batch detection based on Martin, N., Swennen, M., Depaire, B., Jans, M., Caris, A., & Vanhoof, K. (2015,
+ December). Batch Processing: Definition and Event Log Identification. In SIMPDA (pp. 137-140).
+* d5326d46
+ * compute case overlap of a case with all other cases
+
+### Other
+
+* 92a70586
+ * performance optimization for calculation of performance spectrum
+* b0fc57c4
+ * performance optimization for Pandas datetime conversion non-ISO8601 (regular formats)
+
+---
+
+## PM4PY 2.2.8 (2021.06.11)
+
+### Fixed
+
+* c11bab8f
+ * bug fix in eventually-follows filter
+* d3fd1bc1
+ * bug fix in activity frequency constraints of the log skeleton conformance checking
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* d96d9d69
+ * improved performance of the df-based performance spectrum code
+* 499d8a1c
+ * improved performance of log conversions when (for internal use) deep copy is not required
+
+### Added
+
+* 4d679934
+ * allow the possibility to filter on a trace attribute that has a type date (e.g., does the planned start date of
+ the case fall in a given time window?)
+* b7ef36e8
+ * add properties object to trace attributes (used for internal storage of statistics, will not be exported to disk)
+* d7029365
+ * added some basic ML utilities for event logs, e.g., getting all prefixes of traces, get a train/test split
+* 1ec5802e
+ * new subtrace selection mechanism that gets all events inbetween two given activity labels (uses first match on
+ both 1st and 2nd label)
+* 9b65bbd9
+ * allow specification of business hours in sojourn time computation of the DFG
+* 4d529d6e
+ * generic support for feature extraction
+
+### Other
+
+---
+
+## PM4PY 2.2.7 (2021.04.30)
+
+### Fixed
+
+* 908e06d7
+ * fix error in loop detection of inductive miner
+* b7b63e0b
+ * add internal log conversion in the flexible heuristics miner
+* e9d61bdb
+ * fix minor bug in bpmn model importing
+* 52cc0c7a
+ * fix minor bug in xes exporting (type of concept:name was not checked)
+
+### Removed
+
+### Deprecated
+
+* 9c1a9610
+ * various old utility functions are now deprecated
+
+### Changed
+
+* 424c9ad9
+ * avoid warnings when visualizing long place names in debug visualization mode
+
+### Added
+
+* c2a9633e, 52e340b1
+ * add simple visualization of performance spectrum.
+* b6ae4b25
+ * add simple dotted chart visualization to the simplified interface.
+* 6e3a0bac
+ * add properties attribute to event logs and event streams for storage of custom meta-data that is not exported to
+ xes.
+* fb142359
+ * add version of dfg discovery that adds case-level attributes to nodes and edges
+* d902609d
+ * add basic visualization of events per time and cas distribution graphs
+
+### Other
+
+---
+
+## PM4PY 2.2.6 (2021.04.23)
+
+### Fixed
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 766fafa7
+ * minor refactoring and more generic invocation style for eventually follows-based filtering
+
+### Added
+
+* 353c7d6f
+ * Heuristics miner is now able to filter on edges connecting to/from start/end activity
+* d6412339
+ * Parallel alignment computation can be directly invoked
+ using ```pm4py.conformance_diagnostics_alignments(..., multi_processing=True)```
+* de84e5f4
+ * add ```pm4py.discover_bpmn_inductive(log)```
+
+### Other
+
+---
+
+## PM4PY 2.2.5 (2021.04.16)
+
+### Fixed
+
+* 9854f62d
+ * minor bug fix in etree xes exporter avoiding faulty None values
+* bfe8fb32
+ * support non-standard attribute symbols in line-by-line event log exporter
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 3631fe58
+ * default xes importer is set back to iterparse
+* a7ff695a
+ * large-scale restructuring of the underlying pm4py architecture
+* 201879ad
+ * changed the default maximum number of edges to be visualized in the DFG visualization to 100000 (was: 75)
+
+### Added
+
+* 66283964
+ * sojourn-time-based coloring for dfgs
+* 6639d3f3
+ * organizational mining, e.g., ```pm4py.discover_handover_of_work_network(log)```
+* 9c9ca14a
+ * allow multiprocessing in alignment computation
+* 279fd31f
+ * add prefix tree vizualiation
+* 748c768d
+ * add 'old' pm4py visualization of the process tree as an alternative visualziation
+* 408b37a9
+ * add filter to check multiple ocurrences of certain attribute values in a case.
+
+### Other
+
+---
+
+## PM4PY 2.2.4 (2021.04.01)
+
+### Fixed
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 56317d81
+ * process tree based alignments no longer use trace-based process tree reduction (can still be used through utils)
+* c1c1ffc8
+ * minor optimizations to state-equation based alignment computation
+* c95d45c9
+ * large (internal) refactoring of pm4py object files and algorithms
+
+### Added
+
+* d14d3d27
+ * added resource profiles to pm4py taken from Pika, Anastasiia, et al. "Mining resource profiles from event logs."
+ ACM Transactions on Management Information Systems (TMIS) 8.1 (2017): 1-30.
+* ab56d899
+ * organizational mining according to https://arxiv.org/abs/2011.12445; contains several organizational group-based
+ metrics
+* 6a77a948
+ * add serialization and deserialization to various pm4py objects; available through ```pm4py.serialize()```
+ and ```pm4py.deserialize()```
+
+### Other
+
+---
+
+## PM4PY 2.2.3 (2021.03.19)
+
+### Fixed
+
+* d1285706
+ * fixed the consistency (w.r.t ProM) of align-etc conformance results
+
+### Removed
+
+### Deprecated
+
+* c3cde455
+ * deprecated (moved internally) the evaluation and simulation pacakges.
+* a756f1fa
+ * pm4py.objects.process_tree.pt_operator.py
+
+### Changed
+
+* 8474507b
+ * make timestamp and performance-based trace filters inclusive on the boundaries provided
+* b6154457
+ * changed the equals functionality for event logs
+* 9eff5646
+ * classical inductive miner is rebuilt from scratch and thoroughly tested
+* efc1c6e8
+ * changed equals functionality of Petri nets and all their objects
+* 02336ff4
+ * font size is now a parameter of the object (Petri nets / Process Trees /...) visualization code
+
+### Added
+
+* 5de03f1e
+ * added progress bar to all the alignment algorithms
+* 24778a7c
+ * added footprint comparison to simple the interface
+ * added eventually follows discovery to the simple interface
+ * added some additional statistics to the simple interface
+* b2b1fdc5
+ * add a faster alignment algorithm for process trees
+* b7bc217f
+ * more extensive support for the OR-operator in process trees
+* be04ab2a
+ * added performance visualization for heuristics nets
+* 725f40f2
+ * added boolean check on whether a trace/variant is fitting w.r.t. a given model (```pm4py.check_is_fitting()```)
+* e172977c
+ * added process tree parsing functionality (```pm4py.parse_process_tree()```)
+
+### Other
+
+* a756f1fa
+ * the process tree operator class is now embedded within the process tree object definition (
+ pm4py.objects.process_tree.process_tree.py)
+
+---
+
+## PM4PY 2.2.2 (2021.03.03)
+
+### Fixed
+
+* 1a5c080c
+ * fix for timestamp conversion of dataframe formatting
+* 19c615e1
+ * fix bug in process tree exporter
+ * change visualization of process trees (similar to PorM)
+
+### Removed
+
+### Deprecated
+
+* 0e61f4b2
+ * evaluation.soundness.wofland and evaluation.wf_net
+
+### Changed
+
+* 0e61f4b2
+ * woflan and wf-net checks are moved to algo.analysis package
+* 2e158ec4
+ * minor improvements for A* performance
+* d550f777
+ * various renamings in the simplified interface of pm4py, several methods are deprecated.
+
+### Added
+
+* 65ef822c
+ * generic support for the marking equation
+ * generic support for the extended marking equation
+* 92ba4aa7
+ * variants can now be represented as a tuple of activities, rather than a single string
+
+### Other
+
+---
+
+## PM4PY 2.2.1 (2021.02.15)
+
+### Fixed
+
+* ee11545a
+ * fixed importing names of invisible transitions as stored in ```.pnml``` files
+* 5efff284
+ * handle warning messages thrown in the heuristics net visualization
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+* 91b494ad
+ * simple process tree reduction that removes parts that are guaranteed not to be needed for the alignment/replay of
+ a trace
+* f75ecff3
+ * thread-safe implementation of ```dict``` for streaming based process mining
+* 03d176f9
+ * implementation of the Heuristics++ Miner
+* 32443759
+ * add support for using ```redis dict``` for streaming
+
+### Other
+
+---
+
+## PM4PY 2.2.0 (2021.02.01)
+
+### Fixed
+
+* ee545f40
+ * add additional check to timeout for the memory efficient implementation of A* approach for alignments
+* a2a3f281
+ * fix usage of integer values in pulp solver rather than binary variables.
+* 6ba4322f
+ * fixed conversion behavior lifecycle to interval logs
+
+### Removed
+
+### Deprecated
+
+* 54e38ac8
+ * ```pm4py.soundness_woflan()``` is now deprecated
+
+### Changed
+
+* c847e39c
+ * bpmn graphs are now multi-di-graphs. also see: https://github.com/pm4py/pm4py-core/issues/203
+
+### Added
+
+* 54e38ac8
+ * ```pm4py.check_soundness()``` replaces ```pm4py.soundness_woflan()```
+* aa91fdf7
+ * add typing information to ```pm4py.conformance.py``` (containing ```pm4py.conformance_alignments()``` etc.)
+* 5d7890b2
+ * added ```insert_ev_in_tr_index()``` utility to dataframe utils: possibility to insert the index of an event inside
+ its trace (e.g. the start event gets 0, the event following gets 1). Allows us to quickly filter on prefixes
+ directly at the dataframe level.
+ * added ```automatic_feature_extraction_df()``` utility: possibility to extract the features of an event log
+ directly starting from a dataframe. Also, an utility for the manual specification of the columns that should be
+ considered in the event extraction is provided.
+* f64c9a6b
+ * add option to infer concurrency between to activities in a 'strict' manner in the log statistics.
+ using ```srict=True```, implies that an overlap of '0' zero is not considered concurrent. also
+ see: https://github.com/pm4py/pm4py-core/issues/201
+* c0083f68
+ * implementation based on Stertz, Florian, Jürgen Mangler, and Stefanie Rinderle-Ma. "Temporal Conformance Checking
+ at Runtime based on Time-infused Process Models." arXiv preprint arXiv:2008.07262 (2020):
+ * add temporal profile discovery
+ * add offline conformance checking based on temporal profiles
+ * add online conformance checking based on termporal profiles
+* 4d3cf81c
+ * support serialization of all pm4py visualizations
+* 453805b4
+ * compute alignments using edit distance (requires two sets of traces as an input, one represents the log, one
+ represents (a subset of) the model behavior)
+
+### Other
+
+---
+
+## PM4PY 2.1.4.1 (2021.01.22)
+
+### Fixed
+
+* 1231f518
+ * strip text read from nodes in bpmn importing
+* 0bc1b330
+ * add type checking for bpmn conversion; i.e., if the input is already bpmn, it is returned.
+* ea0c7e54
+ * fix consistency in obtaining the case arrival statistics in
+ ```pmpy.statistics.traces.log.case_arrival```; was median, changed to mean. also
+ see: https://github.com/pm4py/pm4py-core/issues/200
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 51be0910
+ * set ```stream_postprocessing``` default value back to ```False``` for
+ ``dataframe`` to ```stream``` conversion. Columns containing ```None``` values are no longer filtered by default (
+ compliant with ```pm4py<=2.1.2```). also see: https://github.com/pm4py/pm4py-core/issues/199
+* 8976ad45
+ * drop the explicit dependency on ```numpy 1.19.3```
+ * add explicit dependency ```pulp<=2.1```
+* 1231f518
+ * support ```sequenceflow``` operator node in bpmn file import
+* 62618eeb
+ * explicitly blacklist version 1.9.4 of ```numpy``` in the requirements.txt file.
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 2.1.4 (2021.01.18)
+
+### Fixed
+
+* 35f2278a; 89c5f13b; 6a3579bc; 65fc182b; fa4448a6; c4e44311 c456c681; 6c6d96cc; e3770281; f091c43e; 6a20cf17; 69eb1ae7;
+ ca780326; 36cb3963 e4f3b16f; c9f80d1f; 94c5a6e0; a713ef3d:
+ * add fall-back to time-range filter if incorrect argument is passed
+ * fix the copying of the 'meta attributes' of the filtered event log for the start activities filter
+ * fix the copying of the 'meta attributes' of the filtered event log for the end activities filter
+ * fix the copying of the 'meta attributes' of the filtered event log for the attributes filter
+ * fix the copying of the 'meta attributes' of the filtered event log for the variants filter
+ * fix the copying of the 'meta attributes' of the filtered event log for the directly follows filter
+ * fix the copying of the 'meta attributes' for event logs in the ltl checker
+ * fix the copying of the 'meta attributes' for event logs in the timestamp filter
+* ffe29353:
+ * create event log object before starting the parsing of XML file (in ITERPARSE_MEM_COMPRESSED)
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 8f2d899a
+ * allow to specify a cap on the number of times we visit the same marking in the extensive playout
+ * allow to return the firing sequences of extensive playout instead of an event log
+* b707377b
+ * allow to return the firing sequences of basic/stochastic playout instead of an event log
+* 9782f522
+ * extended exception management in streaming algorithm interface: release locks if exception happen
+* 0a741566
+ * support importing of bpmn files that do not describe a name for gateways
+* 583825d8
+ * refactored variant-based filtering: added top-K and coverage percentage
+* ba073f54
+ * extended DFG filtering
+* 8ebda3b1
+ * exploit variants in the extensive footprints conformance checking
+* dc754c78
+ * change range(s) of timestamp filters to be inclusive (<=) rather than exclusive (<)
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 2.1.3.2 (2021.01.08)
+
+### Fixed
+
+* b5cb7f0d; f1c0f037; 960d40e9
+ * fix naming consistency in the filtering interface of pm4py.
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 2.1.3.1 (2021.01.07)
+
+### Fixed
+
+* f9f894ed
+ * create an iterable that permits, theoretically, to iterate over the infinity of traces admitted by a DFG
+ * the main ```apply()``` calls the iterable and stops with the usual criterias
+ * the ```apply()``` can also return the variants of the log
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 1c3666b7
+ * minor refactoring of the filtering simplified pm4py interface
+
+### Added
+
+* 8b5dee65
+ * add lambda-based filtering and sorting to simplified pm4py interface
+
+### Other
+
+---
+
+## PM4PY 2.1.3 (2021.01.04)
+
+### Fixed
+
+* 388348f2
+ * bugfix ```remove_flow``` BPMN function
+* 3bd4fe0a
+ * bug fix - DFG visualization needs deepcopy, otherwise it can remove element from the underlying DFG
+* 92fde8cf
+ * bug fix in Petri net playout in stop criterion
+* 882468e1
+ * compatibility with pulp version 1.6.x
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 41ed5720
+ * deepcopy of inputs: since the dictionaries/sets are modified, a "deepcopy" is the best option to ensure data
+ integrity.
+ * ```keep_all_activities``` parameter in paths filter: decides if all the activities (also the ones connected by the
+ low occurrences edges) should be kept, or only the ones appearing in the edges with more occurrences (default).
+* 63ccc055
+ * IM and IMf: removed dependency on ```pm4py.algo.filtering``` package
+* 8a5788fa
+ * more advanced to bpmn conversion in the simplified interface
+* 66e0c074
+ * refactoring conversion parameters log->stream and improved stream compression
+* 73054b04
+ * improved performance of the line-by-line xes importer
+ * increased XES-standard conformity
+* e6136ce5
+ * improved performance of the xes exporters
+ * increased XES-standard conformity
+ * progress bar for exporting enabled
+* 3b692b33
+ * added parameter to enable/disable progress bar in importing in ITERPARSE
+ * compression from file - XES compression moved from general entrypoint to single variant
+* 68ff7d00
+ * more efficient importing of .xes.gz files
+* 4aad427e; 67a42d23
+ * get predecessors and successors of a dfg node (in dfg utils)
+* 0888ab26
+ * added minimum trace length in process tree extensive playout
+
+### Added
+
+* 6a946fbd
+ * allow to compute alignments directly on the dfg using dijkstra
+* 50722bb8
+ * DFG playout including Markovian probability of traces
+
+### Other
+
+---
+
+## PM4PY 2.1.2 (2020.12.18)
+
+### Fixed
+
+* 2fb0b807
+ * support nodes with the same label in BPMN layout algorithm
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 96a7681c
+ * significant memory footprint reduction for iterparse-based event log importing
+* 8270a46e
+ * significantly faster 'line-by-line' xes exporter
+* aae4be33
+ * advanced DFG filtering in (activities percentage, paths percentage) ensuring reachability from start and end
+* d38f4c97
+ * number of occurrences as a start or end activity is visualized in the DFG visualization
+
+### Added
+
+* 97cc315c
+ * add (de)serialization functionality for pm4py objects
+
+### Other
+
+---
+
+## PM4PY 2.1.1 (2020.12.07)
+
+### Fixed
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 43e7ce9e
+ * full conversion of WF-nets to BPMN models
+
+### Added
+
+* 029d30f5
+ * add visualizing and exporting BPMN models
+* f76dd379
+ * added conversion to simplified interface
+
+### Other
+
+---
+
+## PM4PY 2.1.0.2 (2020.11.29)
+
+### Fixed
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+### Other
+
+* f18c3e17
+ * downgrading ```numpy``` to 1.19.3 for Windows 10 2004 compatibility problems
+ * skip blocking ```scikit-learn``` installation for Python 3.9
+
+---
+
+## PM4PY 2.1.0.1 (2020.11.26)
+
+### Fixed
+
+* f6cdf1a9
+ * hotfix problem in XES importer reading of parameters
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 2.1.0 (2020.11.24)
+
+### Fixed
+
+* a0a7fd09
+ * bug fix in the inductive miner: sequence cuts were to maximal, leading to underfitting models (involving too many
+ skips)
+* 5b32725a
+ * fix use of deepcopy in event log conversion
+* 33103b5c
+ * fix get-variants behavior for event log / df (yielded different results)
+
+### Removed
+
+### Deprecated
+
+* 0138f93d
+ * deprecated ```pm4py.write_csv()```; conversion and subsequent pandas export should be used.
+
+### Changed
+
+* 3b8fcd4a
+ * apply invisible transition reduction on Petri nets obtained by Heursistic Miner
+
+### Added
+
+* 6afd8ab9
+ * support for importing/exporting BPMN files;
+ * supported elements: tasks, xor, and, or gateways
+ * conversion of BPMN to WF-net
+ * conversion of Process Tree to BPMN
+* 848a1610
+ * conversion of dataframes to event streams / event logs now detects the use of XES Extensions
+* 8874f7b4
+ * add statistics on concurrent activities
+ * discover eventually follows relations with concurrent activities
+
+### Other
+
+---
+
+## PM4PY 2.0.1 (2020.11.13)
+
+### Fixed
+
+* 4c115dbb
+ * fix bug in hash function of traces
+* 0dd8f28e
+ * fix bug in the alpha+ algorithm (was adding artificial start/end to the underlying event log)
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* commit c51b1f02
+ * parametrizing size of the thread pool in streaming package
+
+### Added
+
+* 8e07d847
+ * add (unbounded) dfg discovery on an event stream
+* 16e3f7f5
+ * integration of the wf-net to process tree algorithm described in https://doi.org/10.3390/a13110279
+* 1a26f678
+ * allow creation of 'live' streaming objects directly from xes and csv files
+* b08564ed
+ * start minor support for interval-based process models
+* 36cb7130
+ * added support for generic dictionaries in streaming conformance checking
+
+### Other
+
+* 81579e19e
+ * relaxing the importing of some dependencies (pandas, pulp, graphviz, intervaltree)
+ to make a basic set of functionalities of pm4py work even without those dependencies
+* ed45eafc
+ * fixing circular dependencies issues and added partial compatibility with Python 3.4
+
+---
+
+## PM4PY 2.0.0 (2020.10.14)
+
+### Fixed
+
+* 1a8f9281
+ * bug fix in ```pandas``` case size filter
+
+### Removed
+
+* 7a89d4dd
+ * remove deprecated factories
+
+### Deprecated
+
+### Changed
+
+* 62801513
+ * improved performance of token-based replay with duplicate labels
+
+### Added
+
+* f408a181
+ * add streaming token-based replay and footprint-based comparison
+* fde08b03
+ * output conformance checking diagnostics in a dataframe
+
+### Other
+
+* a9c5aa34
+ * compatibility with Python 3.9 (limited to windows)
+
+---
+
+## PM4PY 1.5.2.2 (2020.09.29)
+
+### Fixed
+
+* 2d4a8b67e25164838030dca709816918ddbf9279
+ * fixed dependencies on factories. fixed some release notes. fixed some deprecations.
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+* 0d75241676a736919952e5c9ab96ab2be4c71046
+ * added utility for trace attributes filtering
+
+### Other
+
+* d8433ac1bbb57082b19b3b97bc726b353096c76e
+ * better specification of 'stable' requirements
+
+---
+
+## PM4PY 1.5.2.1 (2020.09.25)
+
+### Fixed
+
+a6fde4ccfdf0465d8919d3c72d4400bce8d4ab0e
+
+* fixed some deprecation warnings for external libraries
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+* a5befe62f84af0f3dbe734c713cc8c2c1fc22a04
+ * added WOFLAN to the simplified interface
+
+### Other
+
+---
+
+## PM4PY 1.5.2 (2020.09.24)
+
+### Fixed
+
+* 7bf3aea0b4638f6eceaa192ec37e17370e47f560
+ * fixing a parameter issue on stochastic playout
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+* 13cd96da7fe22427839f1b21dd38a5ac8ff8c231
+ * provide alternative visualizations through Matplotlib of the main visualizations
+* e7e3dfa11264a7e737ca7b65165eb7f719817f59
+ * add utility to remove an arc
+
+### Other
+
+* c42bad174247eb13134e0cb4acb0703c301aa869
+ * fixed compatibility with Python 3.5
+
+---
+
+## PM4PY 1.5.1 (2020.09.15)
+
+### Fixed
+
+### Removed
+
+* 9e926a5d1a373d124a041c72f909eb34083f4649
+ * removed the old soundness check
+
+### Deprecated
+
+### Changed
+
+* 526342e3e96c7386dc7451ac0d9ec74c76b86b4f
+ * performance improvement of the 'less memory' alignment variant
+* 83c71eaaa9bb4ee55e2f773dd3fc9704c6324704
+ * generalization of the heuristics miner visualization
+* 7e7d9ba9e9b4f94d9801f5c8df3c5e4b3afd5971
+ * improved speed of event log sampling
+* 11d06ba2a44fd7d0a83e439b6615befad5e3c4ba
+ * faster process tree playout (recursive, ignoring PT statespace)
+* ce3a8609013bd7f5890b52cb44e155b57b2fc1c0
+ * allow adding (arbitrary) data to transition system
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 1.5.0 (2020.08.31)
+
+### Fixed
+
+* 30b9059fac3d59abac1c973637bd66388d7dd6db
+ * bug fix in parameter parsing of log conversions
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 3c9ed4b5e1860e2494d3b68668e3e1021ee59585
+ * apply invisible transition reduction in process tree to Petri net transformation
+* 26ac905fed4703724805f8fb1b5daa21475df147
+ * minor optimizations in process tree alignment approximation algorithm
+* c5b5ffdd51cd832be14d3078948e29f88f6c2673
+ * add time-out parameter to decomposed alignment calculation
+* 4a5fb9ff5ab395529062ce92747b9624a1799b0e
+ * add bipartite graph matching for correlation mining to obtain exact matching results
+* acc46269040a3b60bdcc6f5afe9ea55ddb5549e1
+ * minor performance improvement of process tree playout
+* 5dd0fe17d5a07a2096afc647306a5673d86508ba
+ * apply trace-level directly on pandas data frames
+* 4c35335da6a6d4419b68a49af3cbd358eca8881d
+ * add 'COUNT' functionality for log/dfg statistics, e.g., in how many cases does act 'A' appear?
+
+### Added
+
+* 3bb5125f1849985ec9e2ba7962a287a25ede8e43
+ * new implementation of the (classical) Inductive Miner, based on the PhD thesis of Sander Leemans. The
+ implementation covers the following fall through functions:
+ * empty trace
+ * strict tau loop
+ * tau loop
+ * activity once per trace
+ * activity concurrent
+ * flower loop
+* 1639d7a17660b4641a58cb435f7061d4168ce422
+ * implemention of 'WOFLAN', based on the PhD thesis of Eric (H.M.W.) Verbeek.
+
+### Other
+
+---
+
+## PM4PY 1.4.1.1 (2020.08.13)
+
+### Fixed
+
+* 76df914ad48b93a72127b0d79e5547669d3148db
+ * fixed bug in less-memory alignments when im == fm
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 1.4.1 (2020.08.10)
+
+### Fixed
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* fc724c4c9e00a388b94efea50be46412c1351bc5
+ * refactoring correlation miner
+ * increased scalability of the correlation miner
+* e18021f06e4431628a84b441acf136d44c9baed6
+ * revision/enrichment of simplified API
+
+### Added
+
+* 9cfd4183968118f488c95ab0bbd7e3e9b66ba355
+ * alignments approximation on process trees (https://arxiv.org/pdf/2009.14094)
+* f9a898da47367f86bf616a7bc8dc796be1b3e440
+ * discovery of log skeleton from the list of variants
+
+### Other
+
+---
+
+## PM4PY 1.4.0 (2020.08.03)
+
+### Fixed
+
+* c5fa9dee9bf7e4eed56785eadc423b59214d3df0
+ * compatibility with latest IPython API
+* 616623b358d1e1a9aa789f43e2c8cf7670ee4d79
+ * clean-up in linear solver functionality
+ * bug fix in usage of PulP result vector
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 4616952ee5c184d35d26e986b298e1e586b38b3f
+ * minor refactoring of the alignment code
+* 3477e5345068018fa6aa91e04b6da4184e4d3c94
+ * update of verions of package dependencies
+
+### Added
+
+* cba7a2e574aa15709d0a2dda35f8a27da9200f42
+ * [beta release] simplified 'pythonic' method invocation (see ```examples/simplified_interface.py```)
+* ade44e6d78551c454b477f36cbe3248a5d4e6c8b
+ * added the 'correlation miner' to pm4py (https://is.tm.tue.nl/staff/rdijkman/papers/Pourmirza2017.pdf)
+* 9564b54a7111916c7bc3d6f1e4c56f3829978efe
+ * add visualization of conformance checking results on process tree
+* 988258a2c655d17201c5b1a7120d19ab5954dbe3
+ * added 'extensive' playout for process trees (for footprint comparison)
+
+### Other
+
+---
+
+## PM4PY 1.3.5.2 (2020.07.24)
+
+### Fixed
+
+* a31467a560b940a2cb426751e032b4ea79bbb29f
+ * add cast to Event class in event conversion
+* 0febe4eda5772685498da2d79d144effdf61ce20
+ * fix in alpha miner; conflict check yielded self-loops in some cases
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 1.3.5.1 (2020.07.22)
+
+### Fixed
+
+* 844459e366e77ebf88a8d01728064048d71a3e6f
+ * remove ```pyemd``` from requirements as it requires a full C studio installation; can be installed and used *
+ optionally*
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 1.3.5 (2020.07.20)
+
+### Fixed
+
+* 6cdf4483548027420b0a54c681a3ecfd515ab8f3
+ * bug fix for de/recomposition approach to handle duplicated labels
+* 58149e7f085bbedb47e31d58d10e37d686e46a72
+ * small fix in importing of parquet files
+* b08675fe8c03207c4701d2eb8b91c234e3ddbe1b
+ * fix in IMdf; the noise threshold was overridden before
+* 772ea5d5af9ab2fa3a424b91670d81487ab2667b
+ * minor fix for timestamps that end with symbol 'Z' (Zero timestamp)
+* 1e13cbdb011dff175850c4c665283bf60e0db84c
+ * fix Scipy dependency for tree generator
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 921328cd06d8870ecaa601d53cfde30a6015aec7
+ * parameterize simplicity metric to use a given 'K' for reference
+* 8403093c3e18c1493f4fd72bc83914dadb03e4c2
+ * change the color scheme for net comparison
+
+### Added
+
+* 143f60a0b4fb265ba5e9d997efddf8f8d66458c3
+ * add support for process tree importing (.ptml files)
+* 4b9132f2835f574d9e7e5af113e5fc96bd821ccf
+ * add new A* version that encodes the states of the state-space differently (up to 10% memory reduction)
+* 93e6e84c4ea78afc562f4ba6cee42de8718eb4cb
+ * add 'stochastic' playout, i.e., use token-based replay on a given log to guide the playout of a given Petri net
+* 107797c5d1be1d742e6522a14231f4f9fce1cb38
+ * add EMD-based process model evaluation ('Earth Mover's Distance' between log/model)
+* 1e02596bc90b6fc22a8c89e80567bdddc2c8f1b7
+ * add process tree based footprint computation
+
+### Other
+
+---
+
+## PM4PY 1.3.4 (2020.07.06)
+
+### Fixed
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* f05ba60e2faa28b2f2e2d7ef65e0ac415ae298e8
+ * improved memory performance of Dijkstra-based alignments, restriction of model-move scheduling is applied (only
+ one of many is chosen)
+* eaed442d10a5b4c9eead3966cef473e2c3f0d61b
+ * improved efficiency of reachability graph computation
+
+### Added
+
+* a42d0f087c94cb9e7914532f7ae0228af3a7f9ce
+ * add 'extensive' playout, which allows to generate all traces in the language of a model up-to a given length.
+* eaed442d10a5b4c9eead3966cef473e2c3f0d61b
+ * added footprint-based conformance checking
+
+### Other
+
+* b99da02411259897f1df52f9a9a62153228dab8a
+ * ```PuLP<=2.1``` is forced (for now, due to excessive console output of v2.2.)
+ * new version of ```Pyvis``` requires additional dependencies (Apache, BSD, MIT licenses), which are now specified
+
+---
+
+## PM4PY 1.3.3 (2020.06.22)
+
+### Fixed
+
+* 1278713e2209d7b1e2287afbd9d80097db028617
+ * minor fixes in (to-be-deprecated) Parquet importer and exporter
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 59630ed8456d9e7842e05fee4c53ff1a3d1389a0
+ * improved memory performance of Dijkstra-based alignments
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 1.3.2 (2020.06.08)
+
+### Fixed
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+* 98e6d6d6219cceeeb2421392e9981ec808d2a468 (Merge Request #89)
+ * Support importing and exporting of '.dfg' files (similar to ProM 6.10)
+* 7ca768b7fcd1eea468bcdb1c1e8c9397676b511a (Merge Request #90)
+ * add a detailed list of all third-party dependencies (README.THIRD_PARTY.md)
+* e0685638c6c0c171583108e23f752ebef70d033e (Merge Request 94)
+ * new version of Dijkstra based alignment computation
+
+### Other
+
+---
+
+## PM4PY 1.3.1 (2020.05.25)
+
+### Fixed
+
+* d51430106dea70473777c6868a3676c027faf607
+ * fix paths filter for Pandas dataframe when dataframe is not sorted
+
+### Removed
+
+* c7a76e0aaffb5dbcad769b2fbc52fd8c03703769
+ * cleanup of the petri net impoprter/exporter, i.e., stochastic/layout information is now stored in the 'properties'
+ object of places/transitions/nets
+
+### Deprecated
+
+### Changed
+
+* 00d7c405628033e8f383a845e61a84205f7bbc83
+ * color scheme of the log-log comparison (pm4py.algo.enhancement.comparison.petrinet)
+* e84c7dc88907b408b4caf97524dd69a378e1859e
+ * update the README.md file
+* 332de04112cf780cbc711553e34ca4b835ee8425
+ * add parameters object to transient analysis call to dfg learner
+* f0976015c2b5b7384135855e75b36f69fb44a4db
+ * add final marking to the basic playout of Petri nets
+* e0d43c6dd5ee2492eabfd14c507b430088ec9cf0
+ * allow prefixes in petri net attribute names (petri net importing)
+
+### Added
+
+* 095f35a3bf9f9c3bea0d518c72c76380f38b77b2
+ * add support for (correctly) importing lists from .xes files
+
+### Other
+
+---
+
+## PM4PY 1.3.0 (2020.05.11)
+
+### Fixed
+
+* 112dc3fc56f0d5e3f3ae0c737a5b0b001be31ba5
+ * typo in Petri net weight (reporter: dominiquesommers)
+* 4a74ef159d03d3cf3ca43bd7c99f5f97da16baf8
+ * problems in the evaluation of replay fitness of recomposed alignments
+* 1f40a17dcade522d308b56a9f53b40c5b8a95dfc
+ * cleaning circular dependencies. relaxing some absolutely strict dependencies for some border-line configurations.
+* 9780ef609db7bbb24323d3584abc2338f24252d3
+ * copying of Event/Trace/EventStream/EventLog objects (reporter: M.Pegoraro)
+* 51802f0828a6d207a5185c06a71bdb3a9faa1a46
+ * problem with sampling log (reporter: jacksbrajin)
+* b1f16bf087691181adcf5616aa85e3e454a7169c
+ * fixed problem with the discovery of 2-loops in the Heuristics Miner (reporter: czwilling)
+* c96dcb16064ed156a1f48075445113bb5afc6264
+ * fixed ```get_variants_acyclic()``` function in petri utils (authorship: M.Pegoraro)
+
+### Removed
+
+### Deprecated
+
+* b4cea4be6fe6ff90f58c405f9f0acb4dbac973f4
+ * factories are deprecated
+
+### Changed
+
+* b4cea4be6fe6ff90f58c405f9f0acb4dbac973f4
+ * factories have been renamed
+
+### Added
+
+* e8f250fec6781c088da8204923ad8817f1b5d689
+ * decision point mining with alignments (for any scikit classification approach) is now integrated.
+* 4ff811ab80b5df15e5ec1da082b4f76c72dcf684
+ * trace attribute hierarchical clustering (MSc Thesis Yukun Cao; FIT/RWTH)
+* 4fca12c1608818348bbd51e390140a8f7e79d7f6
+ * alignments decomposition/recomposition
+* f8d52aa69a3d720d45a93b35c79b4241bb8f7691
+ * possibility to provide the final marking to the playout factory
+* 9a5a64ea2941d69be07ee0e93b771c80f5820166
+ * hash functions for event log objects
+* 9f76d2e61dbc1cc74fccafac6f60d9ce69b7c791
+ * added ```table_to_stream()``` auxiliary function in dataframe_utils
+
+### Other
+
+---
+
+## PM4PY 1.2.13 (2020.05.11)
+
+### Fixed
+
+* 531b767d85bb4c95996ae0c9644a958f75aad120
+ * utilities of Petri nets (acyclic net variants (M. Pegoraro); strongly connected components by NX graph)
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+* c9cebbfab9c82bf8edbe8851a000fd1b1f31f8be
+ * ```properties``` object to all members of the Petri net class (including transitions/places/arcs)
+
+### Other
+
+---
+
+## PM4PY 1.2.12 (2020.03.18)
+
+### Fixed
+
+* ef3b4b62fd186df46236a8af9aa890358dbcd1bc
+ * problem in the generation of logs from process trees
+* 548c57a6d2340dcaba7ef11464ebe193f8fb9c5c
+ * filter by variants percentage
+* c49a9c441feb65a74d5c5da774fdda79295665cc
+ * problems of the token-based replay with the count of tokens at global and local level
+* f554aec318717ee1fb7f81c4e0acbd6da7e7bc34
+ * continuous time Markov Chain steady-state analysis
+* e05145de972944f211f2763656eb6e41aa64e0b5
+ * revised process tree fold and tau reduce functions
+* c3f66b8cb8667c2f204a1da899a216656386c2fa
+ * ignore comments in .pnml files
+
+### Removed
+
+* 31e1cd29437d6b183357bbc5c103131484d390b3
+ * problematic dependencies ortools and pyarrow in the project (when installed, can be used, but no more required by
+ default)
+
+### Deprecated
+
+### Changed
+
+### Added
+
+* f554aec318717ee1fb7f81c4e0acbd6da7e7bc34
+ * converting a performance DFG to a Q-matrix for transient analysis
+* cc766164f2397fe2cb33f8278372469e25cfecd6
+ * business hours module supports full-days shifts (e.g. from 0 to 24)
+* cc766164f2397fe2cb33f8278372469e25cfecd6
+ * backwards state space exploration (supports duplicate transitions) for token-based replay
+* 1b3c32916fe0ccbc4d3f73a44cc68e2ca83a810e
+ * Visual log comparison on a Petri net by plasma coloring
+
+### Other
+
+---
+
+## PM4PY 1.2.11 (2020.02.21)
+
+### Fixed
+
+* 6f320562a836cd949dbbe6ec7751f8f9514b01ec
+ * parameter object for calling alignment code directly
+* 471f414820c7b3f919aa97ccdc684d40cf132b3c
+ * dependency problem with ORTools and PyArrow
+* 157fadffd3b953c105e67f4909547f097d77ea0a
+ * reduce inernal (cyclic) dependencies within pm4py
+* f38b6089b7eb6a4518a9c33e9775120874352657; af1328e2dad82f0a059e00942167a29cb918c85f;
+ e8e1ab443f2dedb2cd348f35bc49eed412d66e1d
+ * hash and equals function of process trees
+* 229bd7ed78ea80aefbb6c7fcfa173edda682c1c7
+ * refactoring of the Monte Carlo simulation.
+ * extend the simulation to support arc weights that are provided by the replay (e.g. informed transition pickup)
+ * extend the simulation to support more than one resource per place through semaphores
+ * maximum execution time per simulation thread
+ * general refactoring of the code
+ * introduce logging information about the simulation
+ * improving documentation
+ * improving clarity of the code
+* f5132302e06aa49f26ab3264bb3147d0660a11c0
+ * performance of log generation from process trees
+* 9e64f2635123aa5c3146fb2ad03863cbf93175df
+ * fixed incongruency in variants statistics (was there for log, not for dataframes)
+ * increased coverage of tests, and made some of them more lean
+ * introduced some additional tests on the new functionalities
+ * updated Dockerfile
+ * updated setup with new packages
+ * removed remainings of the SIMPLE algorithm in the tests folder
+* 382162c648fb8e32b0145a6ff9427af8a7fb39fa
+ * fixed parameters initialization to make it uniform for the rest of the project for all the versions of IMDF
+ * added missing documentation in factory (was there only in the versions)
+ * moved log conversions from factory to specific versions (since they are indeed version specific, if later we
+ include the log version)
+ * removed some useless calculations on the new DFG based versions (were there, but never used!)
+ * introduced two new methods, apply_variants and apply_tree_variants, that are able to apply inductive miner from a
+ list of variants
+ * separated DEFAULT_VARIANT from DEFAULT_VARIANT_DFG (indeed, the first in future versions may become the log)
+ * increased number of tests in the tests/ folder for inductive miner
+
+### Removed
+
+* 502c5d722d483c567f0e08c16da0bb4c87a94e36
+ * remove the empty performance spectrum visualizer folder
+
+### Deprecated
+
+### Changed
+
+* e8b030afd37559c93f79e1dd030fdc540aa62135
+ * provide fast-parquet library as an alternative to read/write parquet files.
+
+### Added
+
+* 557472bc78900d90beb0757279ef29b89aa410b1
+ * integrate LogSkeleton for process discovery and conformance checking
+* 90ba7bf1495fdac7ccef3112efa95687c46a5dd1
+ * importing and exporting of Petri net weights
+
+### Other
+
+---
+
+## PM4PY 1.2.10 (2020.01.31)
+
+### Fixed
+
+* f571ec65ca544a9322b89cf96299d03da65de5a0
+ * import DFG to PN
+ * process tree parsing
+* dca5cc602ba8381e5d4e265341dfc5a5292a80c0
+ * problem with alignments when transitions have empty preset
+* 68643cb109503e54787f98eb8f40650e37aa151e
+ * process tree hashing
+* 9d27f132d40638933be00f9d178e9a1167d36166
+ * conversion between the log types
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* 945fd64e481c0fbf020da7f71cb1a7974ae9629c
+ * make visualization deterministic for process trees, Petri nets and DFGs
+* 15be58abb314c679ddf3b65fa6832c680768c413
+ * generic parsing of dates (removed strict dependency on ciso8601)
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 1.2.9 (2020.01.24)
+
+### Fixed
+
+* be0a282be033765c9d1d7f1a7ba541a11c046834
+ * matplotlib backend settings
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+* ed42182f32eba37df71d9f466ad165036f8d1086
+ * full support for numpy v1.18
+* d1a418f8fa2513a469149383fe69df9a4e6fea06
+ * full support pandas v1.0
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 1.2.8 (2020.01.10)
+
+### Fixed
+
+* 6908a34c73c74c42aac3ddf31b964fcae680919e
+ * inductive miner sequence cut detection
+* 881f1fa4e76b9e35c2d80ab7d241183b2d6871c0
+ * 'Best effort fix' for graphviz based visualizations
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+### Other
+
+---
+
+## PM4PY 1.2.7 (2019.12.20)
+
+### Fixed
+
+* programming error in the alignments code
+* ```should_close``` for XOR node in PT generation
+* ```execute_enabled``` for parallel and OR node in PT generation
+* process tree children setter function
+
+### Removed
+
+* ```copy.copy``` for parent nodes of childs in log generation from process tree
+* windows platform reuquirement for ortools/pyarrow
+
+### Deprecated
+
+### Changed
+
+* recursion depth in token-based replay invisibles exploration
+* consider only fitting traces in the Align-ETConformance count
+* consider all the optimal alignments (as described in the paper) and not only the first one
+* moving of utilities and making the search function using Dijkstra (since we are looking for fit paths) instead of A*
+* LTL checker: making existing filters more performant (A eventually B eventually C)
+
+### Added
+
+* LTL checker: introducing A eventually B eventually C eventually D
+* LTL checker: introducing time boundaries for each arc of the eventually follows relation
+
+### Other
+
+___
+
+## PM4PY 1.2.6 (2019.11.29)
+
+### Fixed
+
+* bug fix in the 'escaping edges' based precision
+
+### Removed
+
+### Deprecated
+
+### Changed
+
+### Added
+
+* Pyarrow serialization integration (supporting in-memory and to .pkl file serialization)
+
+### Other
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/COVERAGE.md b/source_data/pinned/pm4py-process/tag-2.7.23.11/COVERAGE.md
new file mode 100644
index 0000000000000000000000000000000000000000..563c8b8fe080bbd9f682ee645e6fb66b2f4ecc49
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/COVERAGE.md
@@ -0,0 +1,96 @@
+# Coverage report
+
+Measured on 2026-07-17 with coverage.py 7.15.2. Coverage was collected for the entire `pm4py` package with `--source=pm4py`; no files or package paths were omitted. The figures below are statement coverage, including files that were never imported.
+
+## Results
+
+| Measurement | Covered statements | Total statements | Missing statements | Coverage |
+| --- | ---: | ---: | ---: | ---: |
+| Current tests and examples | 64,403 | 71,387 | 6,984 | **90.22%** |
+
+The final combined result exceeds the 90% target by 0.22 percentage points. Ten source lines carry coverage.py exclusion pragmas; they are reported as excluded lines rather than omitted files.
+
+## Verification
+
+- Custom test runner: 929 tests discovered, 926 passed, 3 skipped, 0 failed, and 0 import failures (100% pass ratio among executed tests).
+- Example runner: 139 examples passed, 4 skipped, and 0 failed (100% pass ratio among executed examples).
+- The skipped entries require optional services, platform-specific facilities, or interactive environments that were unavailable during this headless run.
+- Headless image-viewer warnings and conformance-diagnostic log messages were expected output; neither runner reported a failure.
+
+Current coverage includes 28 focused coverage test modules registered with the existing custom runner. They exercise algorithms, object-centric logs, XES/BPMN I/O, Petri nets and process trees, POWL, Polars analytics, connectors, privacy, serialization, facades, visualizations, and edge/error paths. A small set of existing tests was also updated for current paths, timezone-aware APIs, and the custom runner interface.
+
+## Reproduce
+
+From the repository root, with `coverage` installed:
+
+```bash
+export PYTHONPATH="$PWD"
+export COVERAGE_FILE="$PWD/.coverage"
+export MPLCONFIGDIR=/tmp/pm4py-matplotlib
+python -m coverage erase
+(cd tests && python -m coverage run --source=pm4py execute_tests.py --pipeline)
+(cd examples && python -m coverage run --append --source=pm4py execute_everything.py --pipeline)
+python -m coverage report
+```
+
+## List the remaining uncovered functions
+
+coverage.py records execution at the statement/line level. To first see which
+modules still contain missing statements, read the combined `.coverage` data
+produced above with:
+
+```bash
+python -m coverage report --show-missing --skip-covered --sort=cover
+```
+
+This report lists module paths and missing line numbers, not function names.
+With coverage.py 7.15.2, function and method regions are also included in the
+JSON report. The completely uncovered functions can therefore be retrieved
+from the same combined data as follows:
+
+```bash
+python -m coverage json --pretty-print -o coverage.json
+python - <<'PY'
+import json
+
+with open("coverage.json", encoding="utf-8") as report_file:
+ report = json.load(report_file)
+
+uncovered = []
+for filename, file_data in report["files"].items():
+ for function_name, function_data in file_data.get("functions", {}).items():
+ summary = function_data["summary"]
+
+ # The empty name represents statements at module scope, not a function.
+ if (
+ function_name
+ and summary["num_statements"] > 0
+ and summary["covered_lines"] == 0
+ ):
+ uncovered.append(
+ (
+ filename,
+ function_data["start_line"],
+ function_name,
+ function_data["missing_lines"],
+ )
+ )
+
+for filename, start_line, function_name, missing_lines in sorted(uncovered):
+ lines = ",".join(str(line) for line in missing_lines)
+ print(f"{filename}:{start_line}: {function_name} (missing lines: {lines})")
+PY
+```
+
+The filter above has a deliberately strict meaning of *uncovered*: the region
+has at least one executable statement and none of its statements ran. It
+excludes the empty-name region used for module-level statements and functions
+with no measurable statements (for example, a body excluded by a coverage
+pragma). Class methods are listed with qualified names such as
+`ClassName.method_name`.
+
+To also list partially covered functions, replace
+`summary["covered_lines"] == 0` with `summary["missing_lines"] > 0`. In that
+case, any function with at least one unexecuted statement is included. Both
+commands inspect the final combined `.coverage` file, so they should be run
+after the test run and the appended example run.
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/LICENSE b/source_data/pinned/pm4py-process/tag-2.7.23.11/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..16bebea71dd43c2f5be9e4fa5570df5c08747215
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/LICENSE
@@ -0,0 +1,222 @@
+GNU AFFERO GENERAL PUBLIC LICENSE
+
+Version 3, 19 November 2007
+
+Copyright © 2007 Free Software Foundation, Inc.
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+Preamble
+
+The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
+
+The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
+
+Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.
+
+A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.
+
+The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.
+
+An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.
+
+The precise terms and conditions for copying, distribution and modification follow.
+TERMS AND CONDITIONS
+
+
+0. Definitions.
+
+"This License" refers to version 3 of the GNU Affero General Public License.
+
+"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
+
+"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
+
+To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
+
+A "covered work" means either the unmodified Program or a work based on the Program.
+
+To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
+
+To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
+
+An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
+
+
+1. Source Code.
+
+The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
+
+A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
+
+The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
+
+The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
+
+The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
+
+The Corresponding Source for a work in source code form is that same work.
+
+
+2. Basic Permissions.
+
+All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
+
+You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
+
+
+3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
+
+When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
+
+
+4. Conveying Verbatim Copies.
+
+You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
+
+
+5. Conveying Modified Source Versions.
+
+You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
+ b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
+ c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
+ d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
+
+A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
+
+
+6. Conveying Non-Source Forms.
+
+You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
+ b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
+ c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
+ d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
+ e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
+
+A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
+
+A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
+
+"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
+
+If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
+
+The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
+
+Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
+
+
+7. Additional Terms.
+
+"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
+
+Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
+ b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
+ c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
+ d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
+ e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
+ f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
+
+All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
+
+
+8. Termination.
+
+You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
+
+However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
+
+Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
+
+
+9. Acceptance Not Required for Having Copies.
+
+You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
+
+
+10. Automatic Licensing of Downstream Recipients.
+
+Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
+
+An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
+
+
+11. Patents.
+
+A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
+
+A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
+
+In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
+
+A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
+
+
+12. No Surrender of Others' Freedom.
+
+If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
+
+
+13. Remote Network Interaction; Use with the GNU General Public License.
+
+Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.
+
+Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License.
+
+
+14. Revised Versions of this License.
+
+The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.
+
+If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
+
+Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
+
+
+15. Disclaimer of Warranty.
+
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+
+16. Limitation of Liability.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+
+17. Interpretation of Sections 15 and 16.
+
+If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
+
+END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/README.md b/source_data/pinned/pm4py-process/tag-2.7.23.11/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..622bedb21b9261729dd4762e348d2998b8df38de
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/README.md
@@ -0,0 +1,123 @@
+# PM4Py
+
+PM4Py is a python library that supports state-of-the-art process mining algorithms in Python.
+It is open source and intended to be used in both academia and industry projects.
+
+PM4Py is managed and developed by PIS — Process Intelligence Solutions (https://processintelligence.solutions/),
+a spin-off from the Fraunhofer Institute for Applied Information Technology FIT where PM4Py was initially developed.
+
+## Licensing
+
+The open-source version of PM4Py, available on GitHub (https://github.com/process-intelligence-solutions/pm4py), is licensed under the GNU Affero General Public License version
+3 (**AGPL-3.0**).
+
+We offer a separate version of PM4Py for **commercial use in closed-source environments** under a different license. For
+more information about the licensing options for using PM4Py in closed-source settings, please
+visit https://processintelligence.solutions/pm4py#licensing.
+
+## Documentation / API
+
+The documentation of PM4Py can be found at https://processintelligence.solutions/pm4py/.
+
+## First Example
+
+Here is a simple example to spark your interest:
+
+```python
+import pm4py
+
+if __name__ == "__main__":
+ log = pm4py.read_xes('')
+ net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)
+ pm4py.view_petri_net(net, initial_marking, final_marking, format="svg")
+```
+
+## Installation
+PM4Py can be installed on Python 3.9.x / 3.10.x / 3.11.x / 3.12.x / 3.13.x / 3.14.x by invoking:
+
+`pip install -U pm4py`
+
+Optional features can be installed through extras. For example:
+
+`pip install -U "pm4py[polars,ml]"`
+
+Use `pip install -U "pm4py[all]"` to install every optional feature supported on the current platform.
+
+For a reproducible installation using the exact dependency versions validated by the project, use:
+
+`pip install -U "pm4py[stable]"`
+
+PM4Py is also running on older Python environments with different requirements sets, including:
+
+- Python 3.8 (3.8.10): `third_party/old_python_deps/requirements_py38.txt`
+
+## Requirements
+
+The default installation contains the dependencies needed for mainstream usage. Additional integrations are grouped by
+feature in `pyproject.toml`:
+
+* `calendars`: workalendar
+* `connectors`: requests
+* `llm`: openai and requests
+* `ml`: pyemd and scikit-learn
+* `ocel`: jsonschema and pyarrow
+* `polars`: Polars dataframe support
+* `solvers`: cvxopt
+* `stable`: the exact dependency versions validated by the project and used by CI
+* `visualization`: pyvis
+* `windows`: pygetwindow, pynput, and pywin32 (Windows only)
+
+For a source checkout, install the project with `python -m pip install -e .`. Build, CI, and lint dependencies are
+standard dependency groups and can be installed with, for example, `python -m pip install --group lint`.
+
+Polars integration supports 1.40.1 and 2.x. Joins used in filtering and enrichment preserve event
+order, including when lazy queries use the streaming engine (the default in Polars 2.0).
+
+For optional PuLP support, PM4Py selects the backend for the installed PuLP version (3.x or 4.x).
+PuLP 4 requires CBC to be installed separately: use `python -m pip install 'pulp[cbc]'` or put `cbc` on `PATH`.
+SciPy remains the default LP solver.
+
+## Release Notes
+
+To track the incremental updates, please refer to the `CHANGELOG.md` file.
+
+## Contributing
+
+If you want to contribute to PM4Py, please review the [contributing guidelines and Contributor License Agreement (CLA)](https://processintelligence.solutions/pm4py/contributing).
+
+## Third Party Dependencies
+
+As scientific library in the Python ecosystem, we rely on external libraries to offer our features.
+In the `/third_party` folder, we list all the licenses of our direct dependencies.
+Please check the `/third_party/LICENSES_TRANSITIVE` file to get a full list of all transitive dependencies and the
+corresponding license.
+
+## Citing PM4Py
+
+If you are using PM4Py in your scientific work, please cite PM4Py as follows:
+
+> **Alessandro Berti, Sebastiaan van Zelst, Daniel Schuster**. (2023). *PM4Py: A process mining library for Python*.
+> Software Impacts, 17, 100556. doi: 10.1016/j.simpa.2023.100556
+
+[DOI](https://doi.org/10.1016/j.simpa.2023.100556) | [Article Link](https://www.sciencedirect.com/science/article/pii/S2665963823000933)
+
+BiBTeX:
+
+```bibtex
+@article{pm4py,
+title = {PM4Py: A process mining library for Python},
+journal = {Software Impacts},
+volume = {17},
+pages = {100556},
+year = {2023},
+issn = {2665-9638},
+doi = {https://doi.org/10.1016/j.simpa.2023.100556},
+url = {https://www.sciencedirect.com/science/article/pii/S2665963823000933},
+author = {Alessandro Berti and Sebastiaan van Zelst and Daniel Schuster},
+}
+```
+
+## Legal Notice
+
+This repository is managed by Process Intelligence Solutions (PIS). Further information about PIS can be found online
+at https://processintelligence.solutions.
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/LICENSE_HEADER_GITHUB.txt b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/LICENSE_HEADER_GITHUB.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a292a477758a23dc98eb5f19cc508e3779485253
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/LICENSE_HEADER_GITHUB.txt
@@ -0,0 +1,21 @@
+'''
+ PM4Py – A Process Mining Library for Python
+Copyright (C) 2026 Process Intelligence Solutions GmbH
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or any later version.
+
+This program 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see this software project's root or
+visit .
+
+Website: https://processintelligence.solutions
+Contact: info@processintelligence.solutions
+'''
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/README.md b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..467d9c8e6e08d359f327206e8d489aa90ae602c0
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/README.md
@@ -0,0 +1,45 @@
+# Documentation Generation using Sphinx
+
+The documentation is generated automatically using [Sphinx](https://www.sphinx-doc.org/en/master/index.html).
+
+
+## First Time Generating the Documentation
+
+Some additional requirements are needed (Assuming you already installed the standard requirements).
+Install them to your virtual environment with
+
+`source ./venv/bin/activate`
+
+`pip install -r docs/requirements_docs.txt`
+
+Now you can generate the documentation with these commands
+
+`cd docs`
+
+`./build.sh` (MAC/Linux)
+
+`./build.bat` (Windows)
+
+
+## Warnings
+
+When adding new docstrings, please do not ignore build warnings!
+The docstrings must be valid
+[reStructured text](https://restructuredtext-guide.readthedocs.io/en/latest/ch_syntax.html).
+Otherwise, the output not be correctly rendered, see here:
+
+
+
+
+## Footer and Header for the P.I.S. Website
+
+In order to improve the embedding of the documentation into the P.I.S. website, the
+footer and header is added statically to the documentation.
+Per default, this is enabled. You can change it by toggling the `generate_for_website` flag.
+
+If the header and footer changes, the please adapt `source/_templates/layout.html` accordingly.
+Initially, the code and css from the website was copied over, for small changes it might be more
+efficient to just add them in the layout file instead of copying over everything.
+Note that sphinx tends to add css of its own, so check if everything is creating as expected.
+
+Also, I added the sphinx theme switcher to the P.I.S. navbar: `{% include "version-switcher.html" %}`.
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/build.bat b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/build.bat
new file mode 100644
index 0000000000000000000000000000000000000000..fa302cfc5f64a49a23c5e7ab9f1352bf758cf251
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/build.bat
@@ -0,0 +1,11 @@
+@echo off
+
+echo Cleaning previous builds...
+if exist build\ rmdir /s /q build
+if exist source\api\ rmdir /s /q source\api
+
+echo 1/2: Generating API documentation from Python source...
+sphinx-apidoc -e -o source\api ..\pm4py\ || exit /b
+
+echo 2/2: Building HTML files...
+sphinx-build -b html source build\html || exit /b
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/build.sh b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/build.sh
new file mode 100644
index 0000000000000000000000000000000000000000..3539224abc4d23951f64c9503dfe9212a36792ce
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/build.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+
+echo "Cleaning previous builds..."
+rm -rf build/
+rm -rf source/api/
+
+echo "1/2: Generating API documentation from Python source..."
+sphinx-apidoc -e -o source/api ../pm4py/
+
+echo "2/2: Building HTML files..."
+sphinx-build -b html source build/html
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/header_script.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/header_script.py
new file mode 100644
index 0000000000000000000000000000000000000000..be18d5f9ebba3a34f77a374582c73a70b958613e
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/header_script.py
@@ -0,0 +1,113 @@
+import glob
+import re
+from pathlib import Path
+
+
+ENCODING_PATTERN = re.compile(r"#.*coding[:=]\s*[-\w.]+")
+MOJIBAKE_REPLACEMENTS = {
+ "–": "-",
+ "—": "-",
+}
+DASH_TRANSLATION = str.maketrans({
+ "\u2010": "-",
+ "\u2011": "-",
+ "\u2012": "-",
+ "\u2013": "-",
+ "\u2014": "-",
+ "\u2015": "-",
+})
+
+
+def _consume_prefix(data: str) -> int:
+ index = 0
+
+ if data.startswith("\ufeff"):
+ index = 1
+
+ while True:
+ if data.startswith("#!", index):
+ line_end = data.find("\n", index)
+ if line_end == -1:
+ return len(data)
+ index = line_end + 1
+ continue
+
+ line_end = data.find("\n", index)
+ if line_end == -1:
+ line_end = len(data)
+ line = data[index:line_end]
+ if ENCODING_PATTERN.match(line):
+ if line_end < len(data):
+ line_end += 1
+ index = line_end
+ continue
+
+ break
+
+ return index
+
+
+def _extract_leading_docstring(data: str) -> str | None:
+ header_start = _consume_prefix(data)
+ while header_start < len(data) and data[header_start] in {" ", "\t", "\r", "\n"}:
+ header_start += 1
+
+ if not (data.startswith('"""', header_start) or data.startswith("'''", header_start)):
+ return None
+
+ quote = data[header_start:header_start + 3]
+ header_end = data.find(quote, header_start + 3)
+ if header_end == -1:
+ return None
+
+ return data[header_start + 3:header_end]
+
+
+def _strip_wrapping_triple_quotes(data: str) -> str:
+ stripped = data.strip()
+ if len(stripped) >= 6 and (
+ (stripped.startswith('"""') and stripped.endswith('"""'))
+ or (stripped.startswith("'''") and stripped.endswith("'''"))
+ ):
+ return stripped[3:-3]
+ return stripped
+
+
+def _normalize_header(data: str) -> str:
+ normalized = _strip_wrapping_triple_quotes(data).strip()
+ for source, target in MOJIBAKE_REPLACEMENTS.items():
+ normalized = normalized.replace(source, target)
+ normalized = normalized.translate(DASH_TRANSLATION)
+ return " ".join(
+ re.sub(r"\s+", " ", line).strip()
+ for line in normalized.splitlines()
+ if line.strip()
+ ).lower()
+
+
+def _matches_license_header(data: str) -> bool:
+ normalized = _normalize_header(data)
+ return (
+ "process intelligence solutions" in normalized
+ and "gnu affero general public license" in normalized
+ )
+
+
+if __name__ == '__main__':
+ script_dir = Path(__file__).resolve().parent
+ license_header_raw = _strip_wrapping_triple_quotes(
+ (script_dir / 'LICENSE_HEADER_GITHUB.txt').read_text(encoding='utf-8')
+ ).strip()
+
+ for filename in glob.iglob(str(script_dir.parent / 'pm4py' / '**' / '*.py'), recursive=True):
+ with open(filename, 'r', encoding='utf-8') as original:
+ data = original.read()
+
+ current_header = _extract_leading_docstring(data)
+ if current_header is not None and _matches_license_header(current_header):
+ print('skipping: ' + filename)
+ continue
+
+ with open(filename, 'w', encoding='utf-8') as modified:
+ print('adding license to: ' + filename)
+ modified.write("'''\n" + license_header_raw + "\n'''\n" + data)
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/readme_example.png b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/readme_example.png
new file mode 100644
index 0000000000000000000000000000000000000000..290c5513dc636ba9a2d40ca4ca53e6b9f3dd2ee0
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/readme_example.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6c4cf4728da0294fec0cd78401cf2c065d6fecf2b3d40cad758b0adc0c24161b
+size 324581
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/remove_header_script.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/remove_header_script.py
new file mode 100644
index 0000000000000000000000000000000000000000..334f26fb1a1310c1c5dcd7858ee67807212f7187
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/remove_header_script.py
@@ -0,0 +1,79 @@
+import re
+from pathlib import Path
+from typing import Optional
+
+
+SKIP_DIRS = {".git", "__pycache__", ".mypy_cache", ".pytest_cache"}
+ENCODING_PATTERN = re.compile(r"#.*coding[:=]\s*[-\w.]+")
+
+
+def _consume_prefix(data: str) -> int:
+ index = 0
+
+ if data.startswith("\ufeff"):
+ index = 1
+
+ while True:
+ if data.startswith("#!", index):
+ line_end = data.find("\n", index)
+ if line_end == -1:
+ return len(data)
+ index = line_end + 1
+ continue
+
+ line_end = data.find("\n", index)
+ if line_end == -1:
+ line_end = len(data)
+ line = data[index:line_end]
+ if ENCODING_PATTERN.match(line):
+ if line_end < len(data):
+ line_end += 1
+ index = line_end
+ continue
+
+ break
+
+ return index
+def remove_header(data: str) -> Optional[str]:
+ header_start = _consume_prefix(data)
+ while header_start < len(data) and data[header_start] in {" ", "\t", "\r", "\n"}:
+ header_start += 1
+
+ if not (data.startswith('"""', header_start) or data.startswith("'''", header_start)):
+ return None
+
+ quote = data[header_start:header_start + 3]
+ header_end = data.find(quote, header_start + 3)
+ if header_end == -1:
+ return None
+
+ cut_end = header_end + 3
+ if data.startswith("\r\n", cut_end):
+ cut_end += 2
+ elif data.startswith("\n", cut_end):
+ cut_end += 1
+
+ return data[:header_start] + data[cut_end:]
+
+
+if __name__ == "__main__":
+ repository_root = Path(__file__).resolve().parent.parent
+ python_files = sorted(repository_root.rglob("*.py"))
+
+ for filename in python_files:
+ if any(part in SKIP_DIRS for part in filename.parts):
+ continue
+
+ try:
+ data = filename.read_text(encoding="utf-8")
+ except UnicodeDecodeError:
+ print("skipping non utf-8 file: " + str(filename.relative_to(repository_root)))
+ continue
+
+ updated_data = remove_header(data)
+ if updated_data is None:
+ print("skipping: " + str(filename.relative_to(repository_root)))
+ continue
+
+ filename.write_text(updated_data, encoding="utf-8")
+ print("removing header from: " + str(filename.relative_to(repository_root)))
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/requirements_docs.txt b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/requirements_docs.txt
new file mode 100644
index 0000000000000000000000000000000000000000..81d78a3c4b3180bd1d06d7ebb4fc8e73372f97b8
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/requirements_docs.txt
@@ -0,0 +1,3 @@
+sphinx-sitemap
+sphinx-design
+pydata_sphinx_theme
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/.gitignore b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..3f12795483966f7d1abdb6fca8fff65ca0435f1c
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/.gitignore
@@ -0,0 +1 @@
+api/*
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/_static/css/custom.css b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/_static/css/custom.css
new file mode 100644
index 0000000000000000000000000000000000000000..1a3c6ce1fa05dea62b0cf7c156485c112330bcde
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/_static/css/custom.css
@@ -0,0 +1,7 @@
+.bd-header {
+ display: none;
+}
+
+.bd-footer {
+ display: none;
+}
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/_static/favicon.ico b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/_static/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..8fc5cddd7567e49dbfc52a95f59b97fb915c603f
Binary files /dev/null and b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/_static/favicon.ico differ
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/_templates/layout.html b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/_templates/layout.html
new file mode 100644
index 0000000000000000000000000000000000000000..84e57c1e74a9745686c61b134b59ad242bc67065
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/_templates/layout.html
@@ -0,0 +1,197 @@
+{% extends "!layout.html" %}
+{% block extrahead %}
+{% if include_header_and_footer %}
+
+
+
+
+{% endif %}
+{% endblock %}
+
+{% block docs_navbar %}
+{% if include_header_and_footer %}
+
+
+
+{% endif %}
+{% endblock %}
+
+{% block footer %}
+{% if include_header_and_footer %}
+
+
+{% endif %}
+{% endblock %}
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/api.rst b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/api.rst
new file mode 100644
index 0000000000000000000000000000000000000000..14b0d09eedea50d4be4c2ab26368d015db72665e
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/api.rst
@@ -0,0 +1,838 @@
+API Reference
+=============
+
+This page provides an overview of all public ``pm4py`` objects, functions, and methods.
+
+Input (:mod:`pm4py.read`)
+-------------------------
+``pm4py`` supports importing the following standardized *event data* formats:
+
+ * ``.xes`` files (`xes-standard `_); general interchange format for event data. :meth:`pm4py.read.read_xes`
+
+In case an event log is stored as a ``.csv`` file, ``pandas`` can be used to directly import the event log as a ``data frame`` (`docs `_).
+``.xes`` files are internally converted to a ``pandas dataframe``, which is the default data structure used by all algorithms implemented in ``pm4py``.
+
+Additional file formats that are currently supported by PM4Py are:
+
+ * ``.bpmn`` files; file format specifying process models in the *BPMN* process modeling formalism :meth:`pm4py.read.read_bpmn`
+ * ``.dfg`` files; file format specifying *directly follows graphs* (also referred to as *process maps*) :meth:`pm4py.read.read_dfg`
+ * ``.pnml`` files; file format specifying *Petri net* models :meth:`pm4py.read.read_pnml`
+ * ``.ptml`` files; file format specifying *Process Tree* models :meth:`pm4py.read.read_ptml`
+
+Importing object-centric event logs is possible given the following formats:
+
+ * automatic format detection from the file extension :meth:`pm4py.read.read_ocel`
+ * ``.csv`` specification :meth:`pm4py.read.read_ocel_csv`
+ * ``.jsonocel`` specification :meth:`pm4py.read.read_ocel_json`
+ * ``.xmlocel`` specification :meth:`pm4py.read.read_ocel_xml`
+ * ``.sqlite`` specification :meth:`pm4py.read.read_ocel_sqlite`
+
+Importing object-centric event logs (OCEL2.0) is possible given the following formats:
+
+ * automatic format detection from the file extension :meth:`pm4py.read.read_ocel2`
+ * bundled ``.ocel.zip`` CSV/Parquet specification :meth:`pm4py.read.read_ocel2_bundle`
+ * compact ``.csv`` specification :meth:`pm4py.read.read_ocel2_csv`
+ * ``.xmlocel`` specification :meth:`pm4py.read.read_ocel2_xml`
+ * ``.sqlite`` specification :meth:`pm4py.read.read_ocel2_sqlite`
+ * ``.jsonocel`` specification :meth:`pm4py.read.read_ocel2_json`
+
+
+Output (:mod:`pm4py.write`)
+----------------------------
+Similarly to event data importing, ``pm4py`` supports export functionalities to:
+
+ * ``.bpmn`` files, :meth:`pm4py.write.write_bpmn`
+ * ``.dfg`` files, :meth:`pm4py.write.write_dfg`
+ * ``.pnml`` files, :meth:`pm4py.write.write_pnml`
+ * ``.ptml`` files, :meth:`pm4py.write.write_ptml`
+ * ``.xes`` files, :meth:`pm4py.write.write_xes`
+
+Exporting object-centric event logs is possible to the following formats:
+
+ * automatic format detection from the file extension :meth:`pm4py.write.write_ocel`
+ * ``.csv`` specification :meth:`pm4py.write.write_ocel_csv`
+ * ``.jsonocel`` specification :meth:`pm4py.write.write_ocel_json`
+ * ``.xmlocel`` specification :meth:`pm4py.write.write_ocel_xml`
+ * ``.sqlite`` specification :meth:`pm4py.write.write_ocel_sqlite`
+
+Exporting object-centric event logs (OCEL2.0) is possible to the following formats:
+
+ * automatic format detection from the file extension :meth:`pm4py.write.write_ocel2`
+ * bundled ``.ocel.zip`` CSV/Parquet specification :meth:`pm4py.write.write_ocel2_bundle`
+ * compact ``.csv`` specification :meth:`pm4py.write.write_ocel2_csv`
+ * ``.xmlocel`` specification :meth:`pm4py.write.write_ocel2_xml`
+ * ``.sqlite`` specification :meth:`pm4py.write.write_ocel2_sqlite`
+ * ``.jsonocel`` specification :meth:`pm4py.write.write_ocel2_json`
+
+
+Conversion (:mod:`pm4py.convert`)
+---------------------------------
+Several conversions are available from/to different objects supported by ``pm4py``.
+The following conversions are currently available:
+
+ * :meth:`pm4py.convert.convert_to_bpmn` converts a process model to BPMN
+ * :meth:`pm4py.convert.convert_to_petri_net` converts a process model to a Petri net
+ * :meth:`pm4py.convert.convert_to_process_tree` converts a process model to a process tree
+ * :meth:`pm4py.convert.convert_to_powl` converts a process model to a POWL model
+ * :meth:`pm4py.convert.convert_to_reachability_graph` converts a process model to a reachability graph
+ * :meth:`pm4py.convert.convert_log_to_ocel` converts an event log to an object-centric event log
+ * :meth:`pm4py.convert.convert_log_to_networkx` converts a traditional event log (dataframe) to a directed graph (NetworkX)
+ * :meth:`pm4py.convert.convert_log_to_time_intervals` converts an event log to time intervals between consecutive events.
+ * :meth:`pm4py.convert.convert_ocel_to_networkx` converts an object-centric event log to a directed graph (NetworkX)
+ * :meth:`pm4py.convert.convert_petri_net_to_networkx` converts an accepting Petri net to a directed graph (NetworkX)
+ * :meth:`pm4py.convert.convert_petri_net_type` changes the Petri net internal type
+
+
+Process Discovery (:mod:`pm4py.discovery`)
+------------------------------------------
+Process discovery algorithms discover a process model that describes the process execution, as stored in the event log.
+``PM4Py`` implements a variety of different process discovery algorithms.
+These different algorithms return different kinds of models, i.e., models with *imprecise execution semantics*, *procedural process models*, and *declarative process models*.
+Among the models with *imprecise execution semantics*, ``pm4py`` currently supports:
+
+ * :meth:`pm4py.discovery.discover_dfg`; discovers a *directly follows graph* annotated with frequency information (based on the log).
+ * :meth:`pm4py.discovery.discover_directly_follows_graph`; alias for discovering a frequency *directly follows graph*.
+ * :meth:`pm4py.discovery.discover_dfg_typed`; discovers a typed *directly follows graph* object.
+ * :meth:`pm4py.discovery.discover_performance_dfg`; discovers a *directly follows graph* annotated with performance information (based on the log).
+ * :meth:`pm4py.discovery.correlation_miner`; discovers a frequency or performance *directly follows graph* from an event log without a case identifier.
+
+Among *procedural process models*, ``pm4py`` currently supports:
+
+ * :meth:`pm4py.discovery.discover_petri_net_alpha`; discovers a *Petri net* using the Alpha Miner algorithm.
+ * :meth:`pm4py.discovery.discover_petri_net_alpha_plus`; discovers a *Petri net* using the deprecated Alpha+ Miner algorithm.
+ * :meth:`pm4py.discovery.discover_petri_net_inductive`; discovers a *Petri net* using the Inductive Miner algorithm.
+ * :meth:`pm4py.discovery.discover_petri_net_heuristics`; discovers a *Petri net* using the Heuristics Miner algorithm.
+ * :meth:`pm4py.discovery.discover_petri_net_ilp`; discovers a *Petri net* using the ILP Miner algorithm.
+ * :meth:`pm4py.discovery.discover_petri_net_genetic`; discovers a *Petri net* using the Genetic Miner algorithm.
+ * :meth:`pm4py.discovery.discover_process_tree_inductive`; discovers a *process tree* using the Inductive Miner algorithm.
+ * :meth:`pm4py.discovery.discover_bpmn_inductive`; discovers a *BPMN model* using the Inductive Miner algorithm.
+ * :meth:`pm4py.discovery.discover_bpmn_split_miner`; discovers a *BPMN model* using the Split Miner algorithm.
+ * :meth:`pm4py.discovery.discover_heuristics_net`; discovers a *heuristics net* using the Heuristics Miner algorithm.
+ * :meth:`pm4py.discovery.discover_footprints`; discovers the *footprints matrix* of the log or the model.
+ * :meth:`pm4py.discovery.discover_powl`; discovers a *partial order workflow language* (POWL) model.
+ * :meth:`pm4py.discovery.discover_otg`; discovers an *object-type graph* from an object-centric event log.
+ * :meth:`pm4py.discovery.discover_etot`; discovers an *event type-object type graph* from an object-centric event log.
+
+Among *declarative process models*, ``pm4py`` currently supports:
+
+ * :meth:`pm4py.discovery.discover_declare`; discovers a *DECLARE* model.
+ * :meth:`pm4py.discovery.discover_log_skeleton`; discovers a *log skeleton*.
+ * :meth:`pm4py.discovery.discover_temporal_profile`; discovers a *temporal profile*.
+
+
+Conformance Checking (:mod:`pm4py.conformance`)
+-----------------------------------------------
+Conformance checking techniques compare a process model with an event log of the same process. The goal is to check if the event log conforms to the model, and vice versa.
+Among procedural process models, ``pm4py`` currently supports:
+
+ * :meth:`pm4py.conformance.conformance_diagnostics_token_based_replay`; token-based replay between the event log and a *Petri net*.
+ * :meth:`pm4py.conformance.conformance_diagnostics_alignments`; alignment-based replay between the event log and a *Petri net*.
+ * :meth:`pm4py.conformance.conformance_diagnostics_footprints`; footprints-based conformance diagnostics.
+ * :meth:`pm4py.conformance.fitness_token_based_replay`; evaluation of the fitness between an event log and a *Petri net* using token-based replay.
+ * :meth:`pm4py.conformance.fitness_alignments`; evaluation of the fitness between an event log and a *Petri net* using alignments.
+ * :meth:`pm4py.conformance.fitness_footprints`; evaluation of the fitness based on footprints.
+ * :meth:`pm4py.conformance.precision_token_based_replay`; evaluation of the precision between an event log and a *Petri net* using token-based replay.
+ * :meth:`pm4py.conformance.precision_alignments`; evaluation of the precision between an event log and a *Petri net* using alignments.
+ * :meth:`pm4py.conformance.precision_footprints`; evaluation of the precision based on footprints.
+ * :meth:`pm4py.conformance.generalization_tbr`; evaluation of the generalization between an event log and a *Petri net* using token-based replay.
+ * :meth:`pm4py.conformance.replay_prefix_tbr`; replays a prefix (list of activities) on a given *Petri net*, using Token-Based Replay.
+ * :meth:`pm4py.conformance.check_is_fitting`; checks whether a trace fits a process model.
+
+Among declarative process models, ``pm4py`` currently supports:
+
+ * :meth:`pm4py.conformance.conformance_log_skeleton`; conformance checking using the *log skeleton*.
+ * :meth:`pm4py.conformance.conformance_declare`; conformance checking using a *DECLARE model*.
+ * :meth:`pm4py.conformance.conformance_temporal_profile`; conformance checking using the *temporal profile*.
+
+Among object-centric process models, ``pm4py`` currently supports:
+
+ * :meth:`pm4py.conformance.conformance_ocdfg`; conformance checking using an *object-centric directly-follows graph*.
+ * :meth:`pm4py.conformance.conformance_otg`; conformance checking using an *object-type graph*.
+ * :meth:`pm4py.conformance.conformance_etot`; conformance checking using an *event type-object type graph*.
+
+
+Visualization (:mod:`pm4py.vis`)
+---------------------------------
+The ``pm4py`` library implements basic visualizations of process models and statistics.
+Among the on-screen visualizations, ``pm4py`` currently supports:
+
+ * :meth:`pm4py.vis.view_petri_net`; views a *Petri net* model.
+ * :meth:`pm4py.vis.view_dfg`; views a *directly-follows graph* annotated with the frequency.
+ * :meth:`pm4py.vis.view_performance_dfg`; views a *directly-follows graph* annotated with the performance.
+ * :meth:`pm4py.vis.view_process_tree`; views a *process tree*.
+ * :meth:`pm4py.vis.view_bpmn`; views a *BPMN model*.
+ * :meth:`pm4py.vis.view_heuristics_net`; views a *heuristics net*.
+ * :meth:`pm4py.vis.view_dotted_chart`; views a *dotted chart*.
+ * :meth:`pm4py.vis.view_sna`; views the results of a *social network analysis*.
+ * :meth:`pm4py.vis.view_case_duration_graph`; views the *case duration graph*.
+ * :meth:`pm4py.vis.view_events_per_time_graph`; views the *events per time graph*.
+ * :meth:`pm4py.vis.view_performance_spectrum`; views the *performance spectrum*.
+ * :meth:`pm4py.vis.view_events_distribution_graph`; views the *events distribution graph*.
+ * :meth:`pm4py.vis.view_ocdfg`; views an *object-centric directly-follows graph*.
+ * :meth:`pm4py.vis.view_ocpn`; views an *object-centric Petri net*.
+ * :meth:`pm4py.vis.view_object_graph`; views an *object-based graph*.
+ * :meth:`pm4py.vis.view_network_analysis`; views the results of a *network analysis*.
+ * :meth:`pm4py.vis.view_transition_system`; views the results of a *transition system*.
+ * :meth:`pm4py.vis.view_prefix_tree`; views a *prefix tree*.
+ * :meth:`pm4py.vis.view_alignments`; views the *alignments table*.
+ * :meth:`pm4py.vis.view_footprints`; views a *footprints table*.
+ * :meth:`pm4py.vis.view_powl`; views a *POWL model*.
+
+We also offer some methods to store the visualizations on the disk:
+
+ * :meth:`pm4py.vis.save_vis_petri_net`; saves the visualization of a *Petri net* model.
+ * :meth:`pm4py.vis.save_vis_dfg`; saves the visualization of a *directly-follows graph* annotated with the frequency.
+ * :meth:`pm4py.vis.save_vis_performance_dfg`; saves the visualization of a *directly-follows graph* annotated with the performance.
+ * :meth:`pm4py.vis.save_vis_process_tree`; saves the visualization of a *process tree*.
+ * :meth:`pm4py.vis.save_vis_bpmn`; saves the visualization of a *BPMN model*.
+ * :meth:`pm4py.vis.save_vis_heuristics_net`; saves the visualization of a *heuristics net*.
+ * :meth:`pm4py.vis.save_vis_dotted_chart`; saves the visualization of a *dotted chart*.
+ * :meth:`pm4py.vis.save_vis_sna`; saves the visualization of the results of a *social network analysis*.
+ * :meth:`pm4py.vis.save_vis_case_duration_graph`; saves the visualization of the *case duration graph*.
+ * :meth:`pm4py.vis.save_vis_events_per_time_graph`; saves the visualization of the *events per time graph*.
+ * :meth:`pm4py.vis.save_vis_performance_spectrum`; saves the visualization of the *performance spectrum*.
+ * :meth:`pm4py.vis.save_vis_events_distribution_graph`; saves the visualization of the *events distribution graph*.
+ * :meth:`pm4py.vis.save_vis_ocdfg`; saves the visualization of an *object-centric directly-follows graph*.
+ * :meth:`pm4py.vis.save_vis_ocpn`; saves the visualization of an *object-centric Petri net*.
+ * :meth:`pm4py.vis.save_vis_object_graph`; saves the visualization of an *object-based graph*.
+ * :meth:`pm4py.vis.save_vis_network_analysis`; saves the visualization of the results of a *network analysis*.
+ * :meth:`pm4py.vis.save_vis_transition_system`; saves the visualization of the results of a *transition system*.
+ * :meth:`pm4py.vis.save_vis_prefix_tree`; saves the visualization of a *prefix tree*.
+ * :meth:`pm4py.vis.save_vis_alignments`; saves the visualization of the *alignments table*.
+ * :meth:`pm4py.vis.save_vis_footprints`; saves the visualization of the *footprints table*.
+ * :meth:`pm4py.vis.save_vis_powl`; saves the visualization of a *POWL model*.
+
+
+Statistics (:mod:`pm4py.stats`)
+-------------------------------
+Different statistics that can be computed on top of event logs are proposed, including:
+
+ * :meth:`pm4py.stats.get_start_activities`; gets the *start activities* from the event log.
+ * :meth:`pm4py.stats.get_end_activities`; gets the *end activities* from the event log.
+ * :meth:`pm4py.stats.get_event_attributes`; gets the *attributes at the event level* of the event log.
+ * :meth:`pm4py.stats.get_trace_attributes`; gets the *attributes at the trace level* of the event log.
+ * :meth:`pm4py.stats.get_event_attribute_values`; gets the values of an *attribute at the event level* of the event log.
+ * :meth:`pm4py.stats.get_trace_attribute_values`; gets the values of an *attribute at the trace level* of the event log.
+ * :meth:`pm4py.stats.get_variants`; gets the *variants* of the event log.
+ * :meth:`pm4py.stats.get_variants_as_tuples`; gets the *variants* of the event log as tuples.
+ * :meth:`pm4py.stats.split_by_process_variant`; splits an event log into sub-dataframes for each process variant.
+ * :meth:`pm4py.stats.get_variants_paths_duration`; method that associates to a log object a Pandas dataframe aggregated by variants and positions (inside the variant).
+ * :meth:`pm4py.stats.get_minimum_self_distances`; gets the *minimum self-distances* from the event log.
+ * :meth:`pm4py.stats.get_minimum_self_distance_witnesses`; gets the witnesses of *minimum self-distances* from the event log.
+ * :meth:`pm4py.stats.get_frequent_trace_segments`; gets the *traces* (segments of activities) of the event log.
+ * :meth:`pm4py.stats.get_case_arrival_average`; gets the *average case arrival rate* from the event log.
+ * :meth:`pm4py.stats.get_rework_cases_per_activity`; gets the number of cases with rework per activity.
+ * :meth:`pm4py.stats.get_case_overlap`; gets the number of concurrently open cases for each case.
+ * :meth:`pm4py.stats.get_cycle_time`; gets the *cycle time* from the event log.
+ * :meth:`pm4py.stats.get_all_case_durations`; gets the list of *case durations* for the cases of the event log.
+ * :meth:`pm4py.stats.get_case_duration`; gets the *case duration* of a specific case in the log.
+ * :meth:`pm4py.stats.get_activity_position_summary`; gets the position summary of activities in the traces.
+ * :meth:`pm4py.stats.get_process_cube`; builds a two-dimensional process cube from a feature table.
+ * :meth:`pm4py.stats.get_stochastic_language`; gets the *stochastic language* of an event log or a process model.
+ * :meth:`pm4py.stats.get_service_time`; gets the average *service time* per activity.
+
+
+Filtering (:mod:`pm4py.filtering`)
+-----------------------------------
+Filtering is the restriction of the event log to a subset of the behavior.
+Different methods are offered in PM4Py for traditional event logs (.xes, .csv), including:
+
+ * :meth:`pm4py.filtering.filter_start_activities`; filters the *start activities* of the event log.
+ * :meth:`pm4py.filtering.filter_end_activities`; filters the *end activities* of the event log.
+ * :meth:`pm4py.filtering.filter_event_attribute_values`; filters the values of an *attribute at the event level* of the event log.
+ * :meth:`pm4py.filtering.filter_trace_attribute_values`; filters the values of an *attribute at the trace level* of the event log.
+ * :meth:`pm4py.filtering.filter_variants`; filters the *variants* of an event log.
+ * :meth:`pm4py.filtering.filter_directly_follows_relation`; filters the *DF-relations* of an event log.
+ * :meth:`pm4py.filtering.filter_eventually_follows_relation`; filters the *EF-relations* of an event log.
+ * :meth:`pm4py.filtering.filter_time_range`; filters an event log on a temporal interval.
+ * :meth:`pm4py.filtering.filter_between`; filters an event log between a given couple of activities.
+ * :meth:`pm4py.filtering.filter_case_size`; filters an event log based on the size of the cases.
+ * :meth:`pm4py.filtering.filter_case_performance`; filters an event log based on the throughput time of the cases.
+ * :meth:`pm4py.filtering.filter_activities_rework`; filters an event log by looking at the cases where a given activity is executed a different number of times.
+ * :meth:`pm4py.filtering.filter_paths_performance`; filters an event log by examining the performance of the paths between two activities.
+ * :meth:`pm4py.filtering.filter_variants_top_k`; filters an event log keeping the top-K variants.
+ * :meth:`pm4py.filtering.filter_variants_by_coverage_percentage`; filters an event log keeping the variants covering the specified percentage of cases.
+ * :meth:`pm4py.filtering.filter_prefixes`; filters the prefixes of an activity.
+ * :meth:`pm4py.filtering.filter_suffixes`; filters the suffixes of an activity.
+ * :meth:`pm4py.filtering.filter_trace_segments`; filters based on the given traces (segments of activities).
+ * :meth:`pm4py.filtering.filter_four_eyes_principle`; applies the *Four-Eyes principle* on the event log (LTL).
+ * :meth:`pm4py.filtering.filter_activity_done_different_resources`; filters the cases where an activity is repeated by different resources (LTL).
+ * :meth:`pm4py.filtering.filter_log_relative_occurrence_event_attribute`; filters event attribute values based on relative occurrence.
+
+Filtering techniques are also available on directly-follows graphs:
+
+ * :meth:`pm4py.filtering.filter_dfg_activities_percentage`; filters a DFG by keeping a percentage of activities.
+ * :meth:`pm4py.filtering.filter_dfg_paths_percentage`; filters a DFG by keeping a percentage of paths.
+
+Also, some filtering techniques are offered on top of object-centric event logs:
+
+ * :meth:`pm4py.filtering.filter_ocel_event_attribute`; filters the events of an object-centric event log having a given value for an attribute.
+ * :meth:`pm4py.filtering.filter_ocel_object_attribute`; filters the objects of an object-centric event log having a given value for an attribute.
+ * :meth:`pm4py.filtering.filter_ocel_object_types_allowed_activities`; filters the relations between events (activities) and objects (object types) in an object-centric event log.
+ * :meth:`pm4py.filtering.filter_ocel_object_per_type_count`; filters the objects of an object-centric event log having at least the specified number of objects per object type.
+ * :meth:`pm4py.filtering.filter_ocel_start_events_per_object_type`; filters the events of an object-centric event log that start the lifecycle of an object of a given object type.
+ * :meth:`pm4py.filtering.filter_ocel_end_events_per_object_type`; filters the events of an object-centric event log that end the lifecycle of an object of a given object type.
+ * :meth:`pm4py.filtering.filter_ocel_events_timestamp`; filters the events of an object-centric event log based on a timestamp range.
+ * :meth:`pm4py.filtering.filter_ocel_object_types`; filters a specified collection of object types from the object-centric event log.
+ * :meth:`pm4py.filtering.filter_ocel_events`; filters a specified collection of event identifiers from the object-centric event log.
+ * :meth:`pm4py.filtering.filter_ocel_objects`; filters a specified collection of object identifiers from the object-centric event log.
+ * :meth:`pm4py.filtering.filter_ocel_activities_connected_object_type`; filters an object-centric event log on the activities connected to a given object type.
+ * :meth:`pm4py.filtering.filter_ocel_cc_object`; filters a connected component from the object-centric event log to which the object with the provided identifier belongs.
+ * :meth:`pm4py.filtering.filter_ocel_cc_length`; filters the connected components from an object-centric event log having a number of objects falling within a provided range.
+ * :meth:`pm4py.filtering.filter_ocel_cc_otype`; filters the connected components from an object-centric event log having at least one object of the specified object type.
+ * :meth:`pm4py.filtering.filter_ocel_cc_activity`; filters the connected components from an object-centric event log having at least one event with the specified activity.
+
+
+Machine Learning (:mod:`pm4py.ml`)
+-----------------------------------
+PM4Py offers some features useful for the application of machine learning techniques.
+Among those:
+
+ * :meth:`pm4py.ml.split_train_test`; splits an event log into a *training event log* (default 80% of the cases) and a *test event log* (default 20% of the cases).
+ * :meth:`pm4py.ml.get_prefixes_from_log`; gets fixed-length prefixes for the cases of an event log.
+ * :meth:`pm4py.ml.extract_features_dataframe`; extracts machine learning features from an event log.
+ * :meth:`pm4py.ml.extract_ocel_features`; extracts machine learning features from an object-centric event log.
+ * :meth:`pm4py.ml.extract_temporal_features_dataframe`; extracts temporal features from an event log.
+ * :meth:`pm4py.ml.extract_target_vector`; extracts from a log object the target vector for a specific ML use case.
+ * :meth:`pm4py.ml.extract_outcome_enriched_dataframe`; inserts additional columns in the dataframe which are computed on the overall case, so they model the outcome of the case.
+
+
+Simulation (:mod:`pm4py.sim`)
+-----------------------------------
+We offer different simulation algorithms that, starting from a model, are able to produce an output that follows the model and the different rules provided by the user.
+Among those:
+
+ * :meth:`pm4py.sim.play_out`; performs the play-out of a process model to obtain an event log.
+ * :meth:`pm4py.sim.generate_process_tree`; generates a process tree with the desired number of nodes.
+
+
+Object-Centric Process Mining (:mod:`pm4py.ocel`)
+--------------------------------------------------
+Traditional event logs, used by mainstream process mining techniques, require the events to be related to a case. A case is a set of events for a particular purpose. A case notion is a criterion to assign a case to the events.
+
+However, in real processes, this leads to two problems:
+
+* If we consider the Order-to-Cash process, an order could be related to many different deliveries. If we consider the delivery as the case notion, the same event of Create Order needs to be replicated in different cases (all the deliveries involving the order). This is called the convergence problem.
+* If we consider the Order-to-Cash process, an order could contain different order items, each with a different lifecycle. If we consider the order as the case notion, several instances of the activities for the single items may be contained in the case, and this makes the frequency/performance annotation of the process problematic. This is called the divergence problem.
+
+Object-centric event logs relax the assumption that an event is related to exactly one case. Indeed, an event can be related to different objects of different object types.
+
+Essentially, we can describe the different components of an object-centric event log as:
+
+* Events, having an identifier, an activity, a timestamp, a list of related objects, and a dictionary of other attributes.
+* Objects, having an identifier, a type, and a dictionary of other attributes.
+* Attribute names, e.g., the possible keys for the attributes of the event/object attribute map.
+* Object types, e.g., the possible types for the objects.
+
+In PM4Py, we offer object-centric process mining features:
+
+ * :meth:`pm4py.ocel.ocel_get_object_types`; gets the object types from an object-centric event log.
+ * :meth:`pm4py.ocel.ocel_get_attribute_names`; gets the attribute names from an object-centric event log.
+ * :meth:`pm4py.ocel.ocel_flattening`; flattens an object-centric event log with the selection of an object type.
+ * :meth:`pm4py.ocel.ocel_object_type_activities`; gets the activities related to an object type in an object-centric event log.
+ * :meth:`pm4py.ocel.ocel_objects_ot_count`; counts the objects for an object type.
+ * :meth:`pm4py.ocel.ocel_temporal_summary`; returns the temporal summary from an object-centric event log.
+ * :meth:`pm4py.ocel.ocel_objects_summary`; returns the objects summary from an object-centric event log.
+ * :meth:`pm4py.ocel.ocel_objects_interactions_summary`; returns the objects interactions from an object-centric event log.
+ * :meth:`pm4py.ocel.sample_ocel_objects`; returns a sampled object-centric event log by picking a subset of the objects from the original one.
+ * :meth:`pm4py.ocel.sample_ocel_connected_components`; returns a sampled object-centric event log containing the provided number of connected components.
+ * :meth:`pm4py.ocel.ocel_drop_duplicates`; drops relations between events and objects happening at the same time.
+ * :meth:`pm4py.ocel.ocel_merge_duplicates`; merges events in the OCEL that are happening with the same activity at the same timestamp.
+ * :meth:`pm4py.ocel.ocel_sort_by_additional_column`; sorts OCEL events by timestamp and an additional column.
+ * :meth:`pm4py.ocel.ocel_add_index_based_timedelta`; adds small index-based timedeltas to preserve event ordering.
+ * :meth:`pm4py.ocel.ocel_o2o_enrichment`; enriches the O2O table of the OCEL with the graph-based relationships.
+ * :meth:`pm4py.ocel.ocel_e2o_lifecycle_enrichment`; enriches the relations table of the OCEL with lifecycle-based information.
+ * :meth:`pm4py.ocel.cluster_equivalent_ocel`; performs a clustering of the objects of an OCEL based on lifecycle/interactions similarity.
+ * :meth:`pm4py.ocel.ocel_drill_down`; applies an OCEL drill-down operation on an object type using an object attribute.
+ * :meth:`pm4py.ocel.ocel_roll_up`; applies an OCEL roll-up operation on tuple-style object sub-types.
+ * :meth:`pm4py.ocel.ocel_unfold`; unfolds an event type by a related object type.
+ * :meth:`pm4py.ocel.ocel_fold`; folds an unfolded event type back to its original event type.
+
+Some object-centric process discovery algorithms are also offered:
+
+ * :meth:`pm4py.ocel.discover_ocdfg`; discovers an object-centric directly-follows graph from the object-centric event log.
+ * :meth:`pm4py.ocel.discover_oc_petri_net`; discovers an object-centric Petri net from the object-centric event log.
+ * :meth:`pm4py.ocel.discover_objects_graph`; discovers an object-based graph from the object-centric event log.
+
+
+LLM Integration (:mod:`pm4py.llm`)
+-----------------------------------
+The following methods provide just the abstractions of the given objects:
+
+ * :meth:`pm4py.llm.abstract_dfg`; provides the DFG abstraction of a traditional event log
+ * :meth:`pm4py.llm.abstract_variants`; provides the variants abstraction of a traditional event log
+ * :meth:`pm4py.llm.abstract_log_attributes`; provides the abstraction of the attributes/columns of the event log
+ * :meth:`pm4py.llm.abstract_log_features`; provides the abstraction of the machine learning features obtained from an event log
+ * :meth:`pm4py.llm.abstract_case`; provides the abstraction of a case (collection of events)
+ * :meth:`pm4py.llm.abstract_ocel`; provides the abstraction of an object-centric event log (list of events and objects)
+ * :meth:`pm4py.llm.abstract_ocel_ocdfg`; provides the abstraction of an object-centric event log (OC-DFG)
+ * :meth:`pm4py.llm.abstract_ocel_features`; provides the abstraction of an object-centric event log (features for ML)
+ * :meth:`pm4py.llm.abstract_event_stream`; provides an abstraction of the (last) events of the stream related to a traditional event log
+ * :meth:`pm4py.llm.abstract_temporal_profile`; provides the abstraction of a temporal profile model
+ * :meth:`pm4py.llm.abstract_petri_net`; provides the abstraction of a Petri net
+ * :meth:`pm4py.llm.abstract_declare`; provides the abstraction of a DECLARE model
+ * :meth:`pm4py.llm.abstract_log_skeleton`; provides the abstraction of a log skeleton model
+ * :meth:`pm4py.llm.explain_visualization`; explains one of the visualizations provided in PM4Py using LVMs.
+
+The following methods can be executed directly against the LLM APIs:
+
+ * :meth:`pm4py.llm.openai_query`; executes a prompt against OpenAI, returning the response as a string
+ * :meth:`pm4py.llm.google_query`; executes a prompt against Google APIs, returning the response as a string
+ * :meth:`pm4py.llm.anthropic_query`; executes a prompt against Anthropic APIs, returning the response as a string
+
+Additional LLM-based helpers are available:
+
+ * :meth:`pm4py.llm.clustering`; clusters variants of an event log using an LLM.
+ * :meth:`pm4py.llm.nlp_to_log_query`; translates natural language into a SQL query on an event log.
+ * :meth:`pm4py.llm.nlp_to_log_filter`; translates natural language into a SQL-based event log filter.
+ * :meth:`pm4py.llm.automated_hypotheses_formulation`; formulates hypotheses on event data using an LLM.
+
+
+Basic Connectors (:mod:`pm4py.connectors`)
+-------------------------------------------
+We offer some basic connectors to get an event log for some processes:
+
+ * :meth:`pm4py.connectors.extract_log_outlook_mails`; extracts a traditional Pandas dataframe representing Outlook mails
+ * :meth:`pm4py.connectors.extract_log_outlook_calendar`; extracts a traditional Pandas dataframe representing the Outlook calendar
+ * :meth:`pm4py.connectors.extract_log_windows_events`; extracts a traditional Pandas dataframe containing the Windows events registry
+ * :meth:`pm4py.connectors.extract_log_chrome_history`; extracts a traditional Pandas dataframe containing the Chrome navigation history
+ * :meth:`pm4py.connectors.extract_log_firefox_history`; extracts a traditional Pandas dataframe containing the Firefox navigation history
+ * :meth:`pm4py.connectors.extract_log_github`; extracts a traditional Pandas dataframe of a GitHub repository (issues management)
+ * :meth:`pm4py.connectors.extract_log_camunda_workflow`; extracts a traditional Pandas dataframe from the database supporting Camunda
+ * :meth:`pm4py.connectors.extract_log_sap_o2c`; extracts a traditional Pandas dataframe from the database supporting SAP (O2C process)
+ * :meth:`pm4py.connectors.extract_log_sap_accounting`; extracts a traditional Pandas dataframe from the database supporting SAP (Accounting process)
+ * :meth:`pm4py.connectors.extract_ocel_outlook_mails`; extracts an object-centric event log representing Outlook mails
+ * :meth:`pm4py.connectors.extract_ocel_outlook_calendar`; extracts an object-centric event log representing the Outlook calendar
+ * :meth:`pm4py.connectors.extract_ocel_windows_events`; extracts an object-centric event log representing the Windows events
+ * :meth:`pm4py.connectors.extract_ocel_chrome_history`; extracts an object-centric event log representing the Chrome history
+ * :meth:`pm4py.connectors.extract_ocel_firefox_history`; extracts an object-centric event log representing the Firefox history
+ * :meth:`pm4py.connectors.extract_ocel_github`; extracts an object-centric event log of a GitHub repository (issues management)
+ * :meth:`pm4py.connectors.extract_ocel_camunda_workflow`; extracts an object-centric event log from the database supporting Camunda
+ * :meth:`pm4py.connectors.extract_ocel_sap_o2c`; extracts an object-centric event log from the database supporting SAP (O2C process)
+ * :meth:`pm4py.connectors.extract_ocel_sap_accounting`; extracts an object-centric event log from the database supporting SAP (Accounting process)
+
+
+Social Network Analysis (:mod:`pm4py.org`)
+-------------------------------------------
+We offer different algorithms for the analysis of the organizational networks starting from an event log:
+
+ * :meth:`pm4py.org.discover_handover_of_work_network`; calculates the Handover of Work metric from the event log.
+ * :meth:`pm4py.org.discover_working_together_network`; calculates the Working Together metric from the event log.
+ * :meth:`pm4py.org.discover_activity_based_resource_similarity`; calculates the activity-based resource similarity.
+ * :meth:`pm4py.org.discover_subcontracting_network`; calculates the Subcontracting metric from the event log.
+ * :meth:`pm4py.org.discover_organizational_roles`; discovers the organizational roles from the event log.
+ * :meth:`pm4py.org.discover_network_analysis`; discovers the network analysis from the event log.
+
+
+Privacy (:mod:`pm4py.privacy`)
+------------------------------------------
+We offer the following algorithms for the anonymization of event logs:
+
+ * :meth:`pm4py.privacy.anonymize_differential_privacy`; PRIPEL (Privacy-preserving event log publishing with contextual information) is a framework to publish event logs that fulfill differential privacy.
+
+
+Utilities (:mod:`pm4py.utils`)
+-------------------------------
+Other algorithms, which do not belong to the aforementioned categories, are collected in this section:
+
+ * :meth:`pm4py.utils.format_dataframe`; ensures the correct formatting of the Pandas dataframe.
+ * :meth:`pm4py.utils.parse_process_tree`; parses a process tree from a string.
+ * :meth:`pm4py.utils.parse_powl_model_string`; parses a POWL model from a string.
+ * :meth:`pm4py.utils.parse_event_log_string`; parses an event log from a collection of comma-separated traces.
+ * :meth:`pm4py.utils.project_on_event_attribute`; projects an event log on top of a given attribute (e.g., the activity), obtaining a list of lists of values for the attribute.
+ * :meth:`pm4py.utils.sample_cases`; samples a traditional event log, returning the specified number of cases.
+ * :meth:`pm4py.utils.sample_events`; samples a traditional event log / OCEL, returning the specified number of events.
+ * :meth:`pm4py.utils.serialize`; serializes mainstream PM4Py objects as strings.
+ * :meth:`pm4py.utils.deserialize`; deserializes mainstream PM4Py objects given their string representation.
+ * :meth:`pm4py.utils.is_polars_lazyframe`; checks whether the provided dataframe is a Polars LazyFrame.
+ * :meth:`pm4py.utils.get_properties`; collects common PM4Py parameter keys for a log object.
+ * :meth:`pm4py.utils.set_classifier`; sets the specified classifier on an event log.
+ * :meth:`pm4py.analysis.cluster_log`; clusters a log into sublogs using the provided clusterer.
+ * :meth:`pm4py.analysis.insert_case_service_waiting_time`; inserts, for each case, the service and waiting time.
+ * :meth:`pm4py.analysis.insert_case_arrival_finish_rate`; inserts the case arrival/finish rate.
+ * :meth:`pm4py.analysis.insert_artificial_start_end`; inserts artificial start/end activities in the event log.
+ * :meth:`pm4py.analysis.compute_emd`; computes the Earth-Mover Distance between two languages.
+ * :meth:`pm4py.analysis.check_is_workflow_net`; checks if a Petri net is a workflow net.
+ * :meth:`pm4py.analysis.check_is_sound`; checks if a Petri net is a sound workflow net.
+ * :meth:`pm4py.analysis.check_soundness`; checks if a Petri net is a sound workflow net (using Woflan).
+ * :meth:`pm4py.analysis.solve_marking_equation`; solves the marking equation.
+ * :meth:`pm4py.analysis.solve_extended_marking_equation`; solves the extended marking equation.
+ * :meth:`pm4py.analysis.construct_synchronous_product_net`; constructs the synchronous product net between a trace and a Petri net.
+ * :meth:`pm4py.analysis.maximal_decomposition`; performs the maximal decomposition of the given Petri net.
+ * :meth:`pm4py.analysis.generate_marking`; generates a Marking object from a textual representation.
+ * :meth:`pm4py.analysis.reduce_petri_net_invisibles`; reduces the invisible transitions of a Petri net when possible.
+ * :meth:`pm4py.analysis.reduce_petri_net_implicit_places`; reduces the implicit places in the Petri net (using MURATA).
+ * :meth:`pm4py.analysis.get_enabled_transitions`; gets the transitions enabled in a given marking.
+ * :meth:`pm4py.analysis.simplicity_petri_net`; computes the simplicity metric on the given Petri net.
+ * :meth:`pm4py.analysis.behavioral_similarity`; computes the behavioral similarity between two process models.
+ * :meth:`pm4py.analysis.structural_similarity`; computes the structural similarity between two process models.
+ * :meth:`pm4py.analysis.embeddings_similarity`; computes the embeddings similarity between two process models.
+ * :meth:`pm4py.analysis.label_sets_similarity`; computes the label-sets-similarity between two process models.
+ * :meth:`pm4py.analysis.get_activity_labels`; gets the activity labels from the given event log or process model.
+ * :meth:`pm4py.analysis.replace_activity_labels`; uses a substitution dictionary to replace the names of the activities in the process model.
+ * :meth:`pm4py.analysis.map_labels_from_second_model`; maps the activity labels of the second process model on top of the first.
+
+
+List of Methods
+------------------------------------------
+
+.. autosummary::
+
+ pm4py.read
+ pm4py.read.read_bpmn
+ pm4py.read.read_dfg
+ pm4py.read.read_pnml
+ pm4py.read.read_ptml
+ pm4py.read.read_xes
+ pm4py.read.read_ocel
+ pm4py.read.read_ocel_csv
+ pm4py.read.read_ocel_json
+ pm4py.read.read_ocel_xml
+ pm4py.read.read_ocel_sqlite
+ pm4py.read.read_ocel2
+ pm4py.read.read_ocel2_bundle
+ pm4py.read.read_ocel2_csv
+ pm4py.read.read_ocel2_xml
+ pm4py.read.read_ocel2_sqlite
+ pm4py.read.read_ocel2_json
+ pm4py.write
+ pm4py.write.write_bpmn
+ pm4py.write.write_dfg
+ pm4py.write.write_pnml
+ pm4py.write.write_ptml
+ pm4py.write.write_xes
+ pm4py.write.write_ocel
+ pm4py.write.write_ocel_csv
+ pm4py.write.write_ocel_json
+ pm4py.write.write_ocel_xml
+ pm4py.write.write_ocel_sqlite
+ pm4py.write.write_ocel2
+ pm4py.write.write_ocel2_bundle
+ pm4py.write.write_ocel2_csv
+ pm4py.write.write_ocel2_xml
+ pm4py.write.write_ocel2_sqlite
+ pm4py.write.write_ocel2_json
+ pm4py.convert
+ pm4py.convert.convert_to_event_log
+ pm4py.convert.convert_to_event_stream
+ pm4py.convert.convert_to_dataframe
+ pm4py.convert.convert_to_bpmn
+ pm4py.convert.convert_to_petri_net
+ pm4py.convert.convert_to_process_tree
+ pm4py.convert.convert_to_reachability_graph
+ pm4py.convert.convert_log_to_ocel
+ pm4py.convert.convert_log_to_networkx
+ pm4py.convert.convert_ocel_to_networkx
+ pm4py.convert.convert_log_to_time_intervals
+ pm4py.convert.convert_petri_net_to_networkx
+ pm4py.convert.convert_petri_net_type
+ pm4py.convert.convert_to_powl
+ pm4py.discovery
+ pm4py.discovery.discover_dfg
+ pm4py.discovery.discover_directly_follows_graph
+ pm4py.discovery.discover_dfg_typed
+ pm4py.discovery.discover_performance_dfg
+ pm4py.discovery.discover_petri_net_alpha
+ pm4py.discovery.discover_petri_net_alpha_plus
+ pm4py.discovery.discover_petri_net_inductive
+ pm4py.discovery.discover_petri_net_heuristics
+ pm4py.discovery.discover_petri_net_ilp
+ pm4py.discovery.discover_petri_net_genetic
+ pm4py.discovery.discover_process_tree_inductive
+ pm4py.discovery.discover_heuristics_net
+ pm4py.discovery.derive_minimum_self_distance
+ pm4py.discovery.discover_footprints
+ pm4py.discovery.discover_eventually_follows_graph
+ pm4py.discovery.discover_bpmn_inductive
+ pm4py.discovery.discover_bpmn_split_miner
+ pm4py.discovery.discover_transition_system
+ pm4py.discovery.discover_prefix_tree
+ pm4py.discovery.discover_temporal_profile
+ pm4py.discovery.discover_declare
+ pm4py.discovery.discover_log_skeleton
+ pm4py.discovery.discover_batches
+ pm4py.discovery.discover_powl
+ pm4py.discovery.correlation_miner
+ pm4py.discovery.discover_otg
+ pm4py.discovery.discover_etot
+ pm4py.conformance
+ pm4py.conformance.conformance_diagnostics_token_based_replay
+ pm4py.conformance.conformance_diagnostics_alignments
+ pm4py.conformance.conformance_diagnostics_footprints
+ pm4py.conformance.fitness_token_based_replay
+ pm4py.conformance.fitness_alignments
+ pm4py.conformance.fitness_footprints
+ pm4py.conformance.precision_token_based_replay
+ pm4py.conformance.precision_alignments
+ pm4py.conformance.precision_footprints
+ pm4py.conformance.generalization_tbr
+ pm4py.conformance.replay_prefix_tbr
+ pm4py.conformance.check_is_fitting
+ pm4py.conformance.conformance_temporal_profile
+ pm4py.conformance.conformance_declare
+ pm4py.conformance.conformance_log_skeleton
+ pm4py.conformance.conformance_ocdfg
+ pm4py.conformance.conformance_otg
+ pm4py.conformance.conformance_etot
+ pm4py.vis
+ pm4py.vis.view_petri_net
+ pm4py.vis.save_vis_petri_net
+ pm4py.vis.view_performance_dfg
+ pm4py.vis.save_vis_performance_dfg
+ pm4py.vis.view_dfg
+ pm4py.vis.save_vis_dfg
+ pm4py.vis.view_process_tree
+ pm4py.vis.save_vis_process_tree
+ pm4py.vis.view_bpmn
+ pm4py.vis.save_vis_bpmn
+ pm4py.vis.view_heuristics_net
+ pm4py.vis.save_vis_heuristics_net
+ pm4py.vis.view_dotted_chart
+ pm4py.vis.save_vis_dotted_chart
+ pm4py.vis.view_sna
+ pm4py.vis.save_vis_sna
+ pm4py.vis.view_case_duration_graph
+ pm4py.vis.save_vis_case_duration_graph
+ pm4py.vis.view_events_per_time_graph
+ pm4py.vis.save_vis_events_per_time_graph
+ pm4py.vis.view_performance_spectrum
+ pm4py.vis.save_vis_performance_spectrum
+ pm4py.vis.view_events_distribution_graph
+ pm4py.vis.save_vis_events_distribution_graph
+ pm4py.vis.view_ocdfg
+ pm4py.vis.save_vis_ocdfg
+ pm4py.vis.view_ocpn
+ pm4py.vis.save_vis_ocpn
+ pm4py.vis.view_object_graph
+ pm4py.vis.save_vis_object_graph
+ pm4py.vis.view_network_analysis
+ pm4py.vis.save_vis_network_analysis
+ pm4py.vis.view_transition_system
+ pm4py.vis.save_vis_transition_system
+ pm4py.vis.view_prefix_tree
+ pm4py.vis.save_vis_prefix_tree
+ pm4py.vis.view_alignments
+ pm4py.vis.save_vis_alignments
+ pm4py.vis.view_footprints
+ pm4py.vis.save_vis_footprints
+ pm4py.vis.view_powl
+ pm4py.vis.save_vis_powl
+ pm4py.stats
+ pm4py.stats.get_start_activities
+ pm4py.stats.get_end_activities
+ pm4py.stats.get_event_attributes
+ pm4py.stats.get_trace_attributes
+ pm4py.stats.get_event_attribute_values
+ pm4py.stats.get_trace_attribute_values
+ pm4py.stats.get_variants
+ pm4py.stats.get_variants_as_tuples
+ pm4py.stats.split_by_process_variant
+ pm4py.stats.get_variants_paths_duration
+ pm4py.stats.get_minimum_self_distances
+ pm4py.stats.get_minimum_self_distance_witnesses
+ pm4py.stats.get_case_arrival_average
+ pm4py.stats.get_rework_cases_per_activity
+ pm4py.stats.get_case_overlap
+ pm4py.stats.get_cycle_time
+ pm4py.stats.get_all_case_durations
+ pm4py.stats.get_case_duration
+ pm4py.stats.get_frequent_trace_segments
+ pm4py.stats.get_service_time
+ pm4py.stats.get_activity_position_summary
+ pm4py.stats.get_process_cube
+ pm4py.stats.get_stochastic_language
+ pm4py.filtering
+ pm4py.filtering.filter_log_relative_occurrence_event_attribute
+ pm4py.filtering.filter_start_activities
+ pm4py.filtering.filter_end_activities
+ pm4py.filtering.filter_event_attribute_values
+ pm4py.filtering.filter_trace_attribute_values
+ pm4py.filtering.filter_variants
+ pm4py.filtering.filter_directly_follows_relation
+ pm4py.filtering.filter_eventually_follows_relation
+ pm4py.filtering.filter_time_range
+ pm4py.filtering.filter_between
+ pm4py.filtering.filter_case_size
+ pm4py.filtering.filter_case_performance
+ pm4py.filtering.filter_activities_rework
+ pm4py.filtering.filter_paths_performance
+ pm4py.filtering.filter_variants_top_k
+ pm4py.filtering.filter_variants_by_coverage_percentage
+ pm4py.filtering.filter_prefixes
+ pm4py.filtering.filter_suffixes
+ pm4py.filtering.filter_trace_segments
+ pm4py.filtering.filter_ocel_event_attribute
+ pm4py.filtering.filter_ocel_object_attribute
+ pm4py.filtering.filter_ocel_object_types_allowed_activities
+ pm4py.filtering.filter_ocel_object_per_type_count
+ pm4py.filtering.filter_ocel_start_events_per_object_type
+ pm4py.filtering.filter_ocel_end_events_per_object_type
+ pm4py.filtering.filter_ocel_events_timestamp
+ pm4py.filtering.filter_four_eyes_principle
+ pm4py.filtering.filter_activity_done_different_resources
+ pm4py.filtering.filter_ocel_object_types
+ pm4py.filtering.filter_ocel_events
+ pm4py.filtering.filter_ocel_objects
+ pm4py.filtering.filter_ocel_activities_connected_object_type
+ pm4py.filtering.filter_ocel_cc_object
+ pm4py.filtering.filter_ocel_cc_length
+ pm4py.filtering.filter_ocel_cc_otype
+ pm4py.filtering.filter_ocel_cc_activity
+ pm4py.filtering.filter_dfg_activities_percentage
+ pm4py.filtering.filter_dfg_paths_percentage
+ pm4py.ml
+ pm4py.ml.split_train_test
+ pm4py.ml.get_prefixes_from_log
+ pm4py.ml.extract_features_dataframe
+ pm4py.ml.extract_temporal_features_dataframe
+ pm4py.ml.extract_target_vector
+ pm4py.ml.extract_outcome_enriched_dataframe
+ pm4py.ml.extract_ocel_features
+ pm4py.sim
+ pm4py.sim.play_out
+ pm4py.sim.generate_process_tree
+ pm4py.ocel
+ pm4py.ocel.ocel_get_object_types
+ pm4py.ocel.ocel_get_attribute_names
+ pm4py.ocel.ocel_flattening
+ pm4py.ocel.ocel_object_type_activities
+ pm4py.ocel.ocel_objects_ot_count
+ pm4py.ocel.discover_ocdfg
+ pm4py.ocel.discover_oc_petri_net
+ pm4py.ocel.discover_objects_graph
+ pm4py.ocel.ocel_temporal_summary
+ pm4py.ocel.ocel_objects_summary
+ pm4py.ocel.ocel_objects_interactions_summary
+ pm4py.ocel.sample_ocel_objects
+ pm4py.ocel.sample_ocel_connected_components
+ pm4py.ocel.ocel_drop_duplicates
+ pm4py.ocel.ocel_merge_duplicates
+ pm4py.ocel.ocel_sort_by_additional_column
+ pm4py.ocel.ocel_add_index_based_timedelta
+ pm4py.ocel.ocel_o2o_enrichment
+ pm4py.ocel.ocel_e2o_lifecycle_enrichment
+ pm4py.ocel.cluster_equivalent_ocel
+ pm4py.ocel.ocel_drill_down
+ pm4py.ocel.ocel_roll_up
+ pm4py.ocel.ocel_unfold
+ pm4py.ocel.ocel_fold
+ pm4py.llm
+ pm4py.llm.openai_query
+ pm4py.llm.google_query
+ pm4py.llm.anthropic_query
+ pm4py.llm.abstract_dfg
+ pm4py.llm.abstract_variants
+ pm4py.llm.abstract_ocel
+ pm4py.llm.abstract_ocel_ocdfg
+ pm4py.llm.abstract_ocel_features
+ pm4py.llm.abstract_event_stream
+ pm4py.llm.abstract_petri_net
+ pm4py.llm.abstract_log_attributes
+ pm4py.llm.abstract_log_features
+ pm4py.llm.abstract_temporal_profile
+ pm4py.llm.abstract_case
+ pm4py.llm.abstract_declare
+ pm4py.llm.abstract_log_skeleton
+ pm4py.llm.clustering
+ pm4py.llm.nlp_to_log_query
+ pm4py.llm.nlp_to_log_filter
+ pm4py.llm.automated_hypotheses_formulation
+ pm4py.llm.explain_visualization
+ pm4py.connectors
+ pm4py.connectors.extract_log_outlook_mails
+ pm4py.connectors.extract_log_outlook_calendar
+ pm4py.connectors.extract_log_windows_events
+ pm4py.connectors.extract_log_chrome_history
+ pm4py.connectors.extract_log_firefox_history
+ pm4py.connectors.extract_log_github
+ pm4py.connectors.extract_log_camunda_workflow
+ pm4py.connectors.extract_log_sap_o2c
+ pm4py.connectors.extract_log_sap_accounting
+ pm4py.connectors.extract_ocel_outlook_mails
+ pm4py.connectors.extract_ocel_outlook_calendar
+ pm4py.connectors.extract_ocel_windows_events
+ pm4py.connectors.extract_ocel_chrome_history
+ pm4py.connectors.extract_ocel_firefox_history
+ pm4py.connectors.extract_ocel_github
+ pm4py.connectors.extract_ocel_camunda_workflow
+ pm4py.connectors.extract_ocel_sap_o2c
+ pm4py.connectors.extract_ocel_sap_accounting
+ pm4py.org
+ pm4py.org.discover_handover_of_work_network
+ pm4py.org.discover_working_together_network
+ pm4py.org.discover_activity_based_resource_similarity
+ pm4py.org.discover_subcontracting_network
+ pm4py.org.discover_organizational_roles
+ pm4py.org.discover_network_analysis
+ pm4py.privacy
+ pm4py.privacy.anonymize_differential_privacy
+ pm4py.analysis
+ pm4py.analysis.construct_synchronous_product_net
+ pm4py.analysis.cluster_log
+ pm4py.analysis.insert_case_service_waiting_time
+ pm4py.analysis.insert_case_arrival_finish_rate
+ pm4py.analysis.solve_marking_equation
+ pm4py.analysis.solve_extended_marking_equation
+ pm4py.analysis.check_is_sound
+ pm4py.analysis.check_soundness
+ pm4py.analysis.insert_artificial_start_end
+ pm4py.analysis.check_is_workflow_net
+ pm4py.analysis.maximal_decomposition
+ pm4py.analysis.generate_marking
+ pm4py.analysis.compute_emd
+ pm4py.analysis.reduce_petri_net_invisibles
+ pm4py.analysis.reduce_petri_net_implicit_places
+ pm4py.analysis.get_enabled_transitions
+ pm4py.analysis.simplicity_petri_net
+ pm4py.analysis.behavioral_similarity
+ pm4py.analysis.structural_similarity
+ pm4py.analysis.embeddings_similarity
+ pm4py.analysis.get_activity_labels
+ pm4py.analysis.replace_activity_labels
+ pm4py.analysis.label_sets_similarity
+ pm4py.analysis.map_labels_from_second_model
+ pm4py.utils
+ pm4py.utils.is_polars_lazyframe
+ pm4py.utils.rebase
+ pm4py.utils.parse_process_tree
+ pm4py.utils.parse_powl_model_string
+ pm4py.utils.format_dataframe
+ pm4py.utils.serialize
+ pm4py.utils.deserialize
+ pm4py.utils.get_properties
+ pm4py.utils.set_classifier
+ pm4py.utils.parse_event_log_string
+ pm4py.utils.project_on_event_attribute
+ pm4py.utils.sample_cases
+ pm4py.utils.sample_events
+
+.. toctree::
+ :hidden:
+ :maxdepth: 2
+
+ api/pm4py.algo
+ api/pm4py.objects
+ api/pm4py.statistics
+ api/pm4py.streaming
+ api/pm4py.util
+ api/pm4py.visualization
+ api/pm4py.analysis
+ api/pm4py.cli
+ api/pm4py.conformance
+ api/pm4py.connectors
+ api/pm4py.convert
+ api/pm4py.discovery
+ api/pm4py.filtering
+ api/pm4py.hof
+ api/pm4py.llm
+ api/pm4py.meta
+ api/pm4py.ml
+ api/pm4py.ocel
+ api/pm4py.org
+ api/pm4py.privacy
+ api/pm4py.read
+ api/pm4py.sim
+ api/pm4py.stats
+ api/pm4py.utils
+ api/pm4py.vis
+ api/pm4py.write
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/conf.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/conf.py
new file mode 100644
index 0000000000000000000000000000000000000000..af0e4fd34f486d1141e8f4e1baba816a6eea4b00
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/conf.py
@@ -0,0 +1,211 @@
+# -*- coding: utf-8 -*-
+#
+# Configuration file for the Sphinx documentation builder.
+#
+# This file does only contain a selection of the most common options. For a
+# full list see the documentation:
+# http://www.sphinx-doc.org/en/master/config
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+import os
+import sys
+
+sys.path.insert(0, os.path.abspath('../../'))
+
+# -- Project information -----------------------------------------------------
+
+project = 'pm4py'
+project_copyright = 'Process Intelligence Solutions'
+author = 'Process Intelligence Solutions'
+
+# The short X.Y version
+version = '2.7'
+# The full version, including alpha/beta/rc tags
+release = '2.7.22'
+
+# -- General configuration ---------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.viewcode',
+ 'sphinx.ext.autosummary',
+ 'sphinx.ext.napoleon',
+ 'sphinx.ext.intersphinx',
+ 'sphinx_sitemap',
+ 'sphinx_design',
+]
+
+intersphinx_mapping = {
+ 'python': ('https://docs.python.org/3', None),
+ 'pandas': ('https://pandas.pydata.org/docs/', None),
+ 'numpy': ('https://numpy.org/doc/stable', None),
+ 'sklearn': ('https://scikit-learn.org/stable', None),
+ 'matplotlib': ('https://matplotlib.org/stable', None),
+}
+
+# Where to put the auto-generated API files
+autodoc_default_options = {
+ 'members': True,
+ 'undoc-members': True,
+ 'show-inheritance': True,
+}
+
+autodoc_mock_imports = ["cvxopt",
+ "polars",
+ "pulp",
+ "ciso8601",
+ "sentence_transformers",
+ "win32process",
+ "pygetwindow",
+ "pynput",
+ "psutil"]
+
+napoleon_google_docstring = False
+napoleon_use_param = False
+napoleon_use_ivar = True
+autodoc_member_order = 'bysource'
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+language = "en"
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path .
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'api/modules.rst', 'api/pm4py.rst']
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'pydata_sphinx_theme'
+html_logo = 'pm4py-logo.png'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#
+generate_for_website = True
+html_theme_options = {
+ "logo": {
+ "image_light": "pm4py-logo.png",
+ "image_dark": "pm4py-logo.png",
+ },
+ "navbar_persistent": [],
+}
+
+if generate_for_website:
+ html_favicon = '_static/favicon.ico'
+ html_theme_options.update({
+ "switcher": {
+ "json_url": "/static/api/versions.json",
+ "version_match": release,
+ },
+ })
+
+html_context = {
+ "default_mode": "light",
+ "include_header_and_footer": generate_for_website
+}
+
+html_baseurl = "https://processintelligence.solutions/pm4py/api"
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+html_css_files = ["css/custom.css"]
+
+# Custom sidebar templates, must be a dictionary that maps document names
+# to template names.
+#
+# The default sidebars (for documents that don't match any pattern) are
+# defined by theme itself. Builtin themes are using these templates by
+# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
+# 'searchbox.html']``.
+
+html_sidebars = {
+ "release_notes": [],
+}
+
+# -- Options for HTMLHelp output ---------------------------------------------
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'pm4pydoc'
+
+# -- Options for LaTeX output ------------------------------------------------
+
+latex_elements = {
+ # The paper size ('letterpaper' or 'a4paper').
+ #
+ # 'papersize': 'letterpaper',
+
+ # The font size ('10pt', '11pt' or '12pt').
+ #
+ # 'pointsize': '10pt',
+
+ # Additional stuff for the LaTeX preamble.
+ #
+ # 'preamble': '',
+
+ # Latex figure (float) alignment
+ #
+ # 'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ (master_doc, 'pm4py.tex', 'pm4py API reference',
+ 'pm4py @ Process Intelligence Solutions', 'manual'),
+]
+
+# -- Options for manual page output ------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ (master_doc, 'pm4py', 'pm4py API reference',
+ [author], 1)
+]
+
+# -- Options for Texinfo output ----------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ (master_doc, 'pm4py', 'pm4py API reference',
+ author, 'pm4py', 'Process Mining for Python API reference.',
+ 'Miscellaneous'),
+]
+
+# -- Extension configuration -------------------------------------------------
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/getting_started.rst b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/getting_started.rst
new file mode 100644
index 0000000000000000000000000000000000000000..18ab91b08de20f07e8c0984b7efcb4c08321a397
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/getting_started.rst
@@ -0,0 +1,403 @@
+
+Getting Started with Process Mining using PM4Py
+===============================================
+
+Understanding Process Mining
+----------------------------
+
+.. raw:: html
+
+
+ → Watch on YouTube: PM4Py tutorials - tutorial #1 What is Process Mining?
+
+
+In this section, we explain what process mining is all about.
+Note that this page describes the basics of process mining, i.e., it is not a full-fledged reference of every possible aspect of process mining.
+Therefore, for a more detailed overview of process mining, we recommend looking at the `Coursera MOOC on Process Mining `_ and the `seminal book by Wil van der Aalst `_.
+Furthermore, before you begin, please install PM4Py on your system, i.e., as described in the :doc:`install` section.
+
+Processes in our Modern World
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The vast majority of companies active in virtually any domain execute a process.
+Whether the core business of a company is to deliver a product, e.g., manufacture a car, cook a delicious pizza, etc., or provide a service, e.g., offering you a mortgage to buy your dream house, paying back your insurance claim, etc., processes are executed for the efficient delivery of your product/service.
+Hence, a natural question is: “What is a process?”.
+In general, several notions of the concept of a process exist.
+However, in process mining, we typically assume the following conceptual definition:
+
+"A **process** represents a **collection of activities** that we **execute** to achieve a **certain goal**."
+
+For example, consider the burger restaurant just around the corner, which also delivers burgers.
+When you call the restaurant to order your beloved burger, the first action taken by the employee, let’s call her **Lucy**, taking your call, is to *take your order*.
+Let’s assume you go for a tasty cheeseburger with a can of soda.
+After Lucy has *entered your order in the cash register*, she *asks for your address*, which she adds to the order.
+Finally, she *asks for your preferred means of payment*, after which she provides you with a rough estimate of the time until delivery.
+When Lucy finishes the call, she *prints your order* and hands it over to the chef, let’s call him **Luigi**.
+Since you’ve called relatively early, Luigi can start *preparing your burger* right away.
+At the same time, Lucy *takes a can of soda out of the refrigerator* and places it on the counter.
+A new call comes in from a different customer, which she handles roughly the same way as yours.
+When Luigi *finishes your burger*, he *slides it into a carton box* and hands the box over to Lucy.
+Lucy *wraps the order* in a bag.
+She then hands the bag with your burger and soda to **Mike**, who uses a fancy electrical bicycle to *bring your order to your home*.
+
+In this small example, let us assume that we are interested in the process, i.e., the collection of activities performed for your order.
+Based on the scenario we just presented, the steps look as follows:
+
+
+1. **Lucy** *takes your order*
+#. **Lucy** *notes down your address*
+#. **Lucy** *notes down your preferred payment method*
+#. **Luigi** *prepares your burger*
+#. **Lucy** *grabs your can of soda*
+#. **Luigi** *puts your burger in a box*
+#. **Lucy** *wraps your order*
+#. **Mike** *delivers your order*
+
+Importing Your First Event Log
+------------------------------
+In this section, we explain how to import (and export) event data in PM4Py. We assume that you are familiar with the conceptual basics of process mining, i.e., as described in the previous section.
+
+File Types: CSV and XES
+~~~~~~~~~~~~~~~~~~~~~~~~
+As explained in the previous section, process mining exploits Event Logs to generate knowledge of a process. A wide variety of information systems, e.g., SAP, ORACLE, SalesForce, etc., allow us to extract, in one way or another, event logs similar to the example event log presented in Table 1 and Table 2. All the examples we show in this section and all algorithms implemented in PM4Py assume that we have already extracted the event data into an appropriate event log format. Hence, the core of PM4Py does not support any data extraction features. However, we provide solutions for data extraction purposes, i.e., please inspect the corresponding `solutions page `_.
+
+In order to support interoperability between different process mining tools and libraries, two standard data formats are used to capture event logs, i.e., Comma Separated Value (CSV) files and eXtensible Event Stream (XES) files. CSV files resemble the example tables shown in the previous section, i.e., Table 1 and Table 2. Each line in such a file describes an event that occurred. The columns represent the same type of data, as shown in the examples, e.g., the case for which the event occurred, the activity, the timestamp, the resource executing the activity, etc. The XES file format is an XML-based format that allows us to describe process behavior. We will not go into details with respect to the format of XES files, i.e., we refer to `https://www.xes-standard.org `_ for an overview.
+
+In the remainder of this tutorial, we will use an often used dummy example event log to explain the basic process mining operations. The process that we are considering is a simplified process related to customer complaint handling, i.e., *taken from the book by Wil van der Aalst*. The process, and the event data we are going to use, looks as follows.
+
+.. image:: https://processintelligence.solutions/static/images/getting_started/bpmn_running_example.png
+
+*Figure 3: Running example BPMN-based process model describing the behavior of the simple process that we use in this tutorial.*
+
+Let’s get started! We have prepared a small sample event log, containing behavior similar to the process model in Figure 3. `You can find the sample event log here `_. Please download the file and store it somewhere on your computer, e.g., your Downloads folder (On Windows: this is 'C:/Users/user_name/Downloads'). Consider Figure 4, in which we depict the first 25 rows of the example file.
+
+.. image:: https://processintelligence.solutions/static/images/getting_started/csv_snapshot.png
+
+*Figure 4: Running example CSV data set which we will use in this tutorial.*
+
+Note that the data depicted in Figure 4 describes a table; however, in text format. Each line in the file corresponds to a row in the table. Whenever we encounter a ‘;’ symbol on a line, this implies that we are ‘entering’ the next column. The first line (i.e., row) specifies the name of each column. Observe that, in the data table described by the file, we have five columns: *case_id*, *activity*, *timestamp*, *costs*, and *resource*. Observe that, similar to our previous example, the first column represents the case identifier, i.e., allowing us to identify what activity has been logged in the context of what instance of the process. The second column shows the activity that has been performed. The third column shows at what point in time the activity was recorded. In this example data, additional information is present as well. In this case, the fourth column tracks the costs of the activity, whereas the fifth column tracks what resource has performed the activity.
+
+Before we go into loading the example file into PM4Py, let us briefly take a look at the data. Observe that lines 2-10 show the events that have been recorded for the process identified by case identifier 3. We observe that first a register request activity was performed, followed by the examine casually, check ticket, decide, reinitiate request, examine thoroughly, check ticket, decide, and finally, pay compensation activities. Note that, indeed, in this case the recorded process instance behaves as described by the model depicted in Figure 3.
+
+Loading CSV Files
+~~~~~~~~~~~~~~~~~
+
+.. raw:: html
+
+
+ → Watch on YouTube: PM4Py tutorials - tutorial #2 Importing CSV Files
+
+
+Given that we have familiarized ourselves with event logs and a way to represent event logs in a CSV file, it is time to start doing some process mining! We are going to load the event data, and we are going to count how many cases are present in the event log, as well as the number of events. Note that, for all this, we are effectively using a third-party library called `pandas `_. We do so because pandas is the de-facto standard for loading/manipulating CSV-based data. Hence, *any process mining algorithm implemented in PM4Py, using an event log as an input, can work directly with a pandas DataFrame!*
+
+.. code-block:: python3
+
+ import pandas
+
+
+ def import_csv(file_path):
+ event_log = pandas.read_csv(file_path, sep=';')
+ num_events = len(event_log)
+ num_cases = len(event_log.case_id.unique())
+ print("Number of events: {}\nNumber of cases: {}".format(num_events, num_cases))
+
+
+ if __name__ == "__main__":
+ import_csv("C:/Users/demo/Downloads/running-example.csv")
+
+*Example 1: Loading an event log stored in a CSV file and computing the number of cases and the number of events in the file. In this example, no PM4Py is used yet; it is all being handled using pandas. If you run the code yourself, make sure to replace the path 'C:/Users/demo/Downloads/running-example.csv' with the appropriate path on your computer containing the running example file.*
+
+We will quickly go through the above example code. In the first line, we import the pandas library. The last lines (containing the if-statement) make sure that the code, when pasted, runs on its own (we will omit these lines from future examples). The core of the script is the function **import_csv**. As an input parameter, it requires the path to the CSV file. The script uses the pandas `read_csv` function to load the event data. To calculate the number of events, we simply query the length of the DataFrame, i.e., by calling **len(event_log)**. To calculate the number of cases, we use a built-in pandas function to return the number of unique values of the `case_id` column, i.e., **event_log.case_id.unique()**. Since that function returns a pandas built-in array object containing all the values of the column, we again query for its length. Note that, as is often the case when programming, there is a wide variety of ways to compute the aforementioned example statistics on the basis of a given CSV file.
+
+Now we have loaded our first event log, it is time to put some PM4Py into the mix. Let us assume that we are not only interested in the number of events and cases, but we also want to figure out what activities occur first and what activities occur last in the traces described by the event log. PM4Py has specific built-in functions for this, i.e., **get_start_activities()** and **get_end_activities()** respectively. Consider Example 2, in which we present the corresponding script.
+
+.. code-block:: python3
+
+ import pandas
+ import pm4py
+
+
+ def import_csv(file_path):
+ event_log = pandas.read_csv(file_path, sep=';')
+ event_log = pm4py.format_dataframe(event_log, case_id='case_id', activity_key='activity', timestamp_key='timestamp')
+ start_activities = pm4py.get_start_activities(event_log)
+ end_activities = pm4py.get_end_activities(event_log)
+ print("Start activities: {}\nEnd activities: {}".format(start_activities, end_activities))
+
+ if __name__ == "__main__":
+ import_csv("csv_file.csv")
+
+*Example 2: Loading an event log stored in a CSV file and computing the start and end activities of the traces in the event log. If you run the code yourself, make sure to point the file path to the appropriate path on your computer containing the running example file.*
+
+Note that we now import pandas and PM4Py. The first line of our script again loads the event log stored in CSV format as a DataFrame. The second line transforms the event data table into a format that can be used by any process mining algorithm in PM4Py. That is, the **format_dataframe()** function creates a copy of the input event log and renames the assigned columns to standardized column names used in PM4Py. In our example, the column `case_id` is renamed to `case:concept:name`, the activity column is renamed to `concept:name`, and the timestamp column is renamed to `time:timestamp`. The underlying reasons for using the aforementioned standard names are primarily related to XES-based (the other file format that we will look at shortly) legacy. Hence, it is advisable to always import a CSV-based log as follows.
+
+Note that, in this example, the value of the arguments, i.e., *sep*, *case_id*, *activity_key*, and *timestamp_key*, depend on the input data. To obtain the activities that occur first and, respectively, last in any trace in the event log, we call the PM4Py.get_start_activities(event_log) and the PM4Py.get_end_activities(event_log) functions. The functions return a dictionary containing the activities as keys and the number of observations (i.e., number of traces in which they occur first, respectively last) in the event log.
+
+PM4Py exploits a built-in pandas function to detect the format of the timestamps in the input data automatically. However, pandas looks at the timestamp values in each row in isolation. In some cases, this can lead to problems. For example, if the provided value is 2020-01-18, i.e., first the year, then the month, and then the day of the date, in some cases, a value of 2020-02-01 may be interpreted wrongly as January 2nd, i.e., rather than February 1st. To alleviate this problem, an additional parameter can be provided to the **format_dataframe()** method, i.e., the `timestamp_format` parameter. In this example, the timestamp format is `%Y-%m-%d %H:%M:%S%z`. In general, we advise specifying the timestamp format!
+
+Loading XES Files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. raw:: html
+
+
+ → Watch on YouTube: PM4Py tutorials - tutorial #3 Importing XES Files
+
+Next to CSV files, event data can also be stored in an XML-based format, i.e., in XES files. In an XES file, we can describe a containment relation, i.e., a log contains a number of traces, which in turn contain several events. Furthermore, an object, i.e., a log, trace, or event, is allowed to have attributes. The advantage is that certain data attributes that are constant for a log or a trace can be stored at that level. For example, assume that we only know the total costs of a case, rather than the costs of the individual events. If we want to store this information in a CSV file, we either need to replicate this information (i.e., we can only store data in rows, which directly refer to events), or we need to explicitly define that certain columns only get a value once, i.e., referring to case-level attributes. The XES standard more naturally supports the storage of this type of information.
+
+Consider Figure 5, in which we depict a snapshot of the running example data stored in the .xes file format. The complete file can be downloaded `here `_.
+
+.. image:: https://processintelligence.solutions/static/images/getting_started/csv_snapshot.png
+
+*Figure 5: Running example XES data set.*
+
+Observe that the trace with number 1 (reflected by the [string key=”concept:name”]-tag on line 9) is the first trace recorded in this event log. The first event of the trace represents the “register request” activity executed by Pete. The second event is the “examine thoroughly” activity, executed by Sue, etc. We will not elaborate on the XES standard in detail here, i.e., we refer to the `XES homepage `_, and to our `video tutorial `_ on importing XES for more information.
+
+Importing an XES file is fairly straightforward. PM4Py has a special **read_xes()** function that can parse a given XES file and load it in PM4Py, i.e., as an Event Log object. Consider the following code snippet, in which we show how to import an XES event log. Like the previous example, the script outputs activities that can start and end a trace.
+
+.. code-block:: python3
+
+ def import_xes(file_path):
+ event_log = pm4py.read_xes(file_path)
+ start_activities = pm4py.get_start_activities(event_log)
+ end_activities = pm4py.get_end_activities(event_log)
+ print("Start activities: {}\nEnd activities: {}".format(start_activities, end_activities))
+
+ if __name__ == "__main__":
+ import_xes("C:/Users/demo/Downloads/running-example.xes")
+
+Exporting Event Data
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. raw:: html
+
+
+ → Watch on YouTube: PM4Py tutorials - tutorial #6 Exporting Event Data
+
+
+Now we are able to import event data into PM4Py, let us take a look at the opposite: exporting event data. Exporting event logs can be very useful, e.g., we might want to convert a CSV file into an XES file or we might want to filter out certain (noisy) cases and save the filtered event log. Like importing, exporting event data is possible in two ways, i.e., exporting to CSV (using pandas) and exporting to XES. In the upcoming sections, we show how to export an event log stored as a pandas DataFrame into a CSV file, a pandas DataFrame as an XES file, a PM4Py event log object as a CSV file, and finally, a PM4Py event log object as an XES file.
+
+Storing a Pandas DataFrame as a CSV File
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Storing an event log that is represented as a pandas DataFrame is straightforward, i.e., we can directly use the **to_csv** function of the pandas DataFrame object. Consider the following example snippet of code, in which we show this functionality.
+
+Note that the example code imports the running example CSV file as a pandas DataFrame and exports it to a CSV file at the location ‘C:/Users/demo/Desktop/running-example-exported.csv’. Note that, by default, pandas uses a ‘,’ symbol rather than ‘;’ symbol as a column separator.
+
+.. code-block:: python3
+
+ import pandas as pd
+
+ if __name__ == "__main__":
+ event_log = pm4py.format_dataframe(pd.read_csv('C:/Users/demo/Downloads/running-example.csv', sep=';'), case_id='case_id',
+ activity_key='activity', timestamp_key='timestamp')
+ event_log.to_csv('C:/Users/demo/Desktop/running-example-exported.csv')
+
+Storing a Pandas DataFrame as a .xes file
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+It is also possible to store a pandas DataFrame to an XES file. This is simply done by calling the **pm4py.write_xes()** function. You can pass the DataFrame as an input parameter to the function, i.e., PM4Py handles the internal conversion of the DataFrame to an event log object prior to writing it to disk. Note that this construct only works if you have formatted the DataFrame, i.e., as highlighted earlier in the importing CSV section.
+
+.. code-block:: python3
+
+ import pandas
+ import pm4py
+
+ if __name__ == "__main__":
+ event_log = pm4py.format_dataframe(pandas.read_csv('C:/Users/demo/Downloads/running-example.csv', sep=';'), case_id='case_id',
+ activity_key='activity', timestamp_key='timestamp')
+ pm4py.write_xes(event_log, 'C:/Users/demo/Desktop/running-example-exported.xes')
+
+Storing an Event Log Object as a CSV File
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In some cases, we might want to store an event log object, e.g., obtained by importing an XES file, as a CSV file. For example, certain (commercial) process mining tools only support CSV importing. For this purpose, PM4Py offers conversion functionality that allows you to convert your event log object into a DataFrame, which you can subsequently export using pandas.
+
+.. code-block:: python3
+
+ import pm4py
+
+ if __name__ == "__main__":
+ event_log = pm4py.read_xes('C:/Users/demo/Downloads/running-example.xes')
+ df = pm4py.convert_to_dataframe(event_log)
+ df.to_csv('C:/Users/demo/Desktop/running-example-exported.csv')
+
+Storing an Event Log Object as an XES File
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Storing an event log object as an XES file is rather straightforward. In PM4Py, the **write_xes()** method allows us to do so. Consider the simple example script below in which we show an example of this functionality.
+
+.. code-block:: python3
+
+ import pm4py
+
+ if __name__ == "__main__":
+ event_log = pm4py.read_xes("C:/Users/demo/Downloads/running-example.xes")
+ pm4py.write_xes(event_log, 'C:/Users/demo/Desktop/running-example-exported.xes')
+
+Pre-Built Event Log Filters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. raw:: html
+
+
+ → Watch on YouTube: PM4Py tutorials - tutorial #5: Playing with Event Data; Shipped Filters
+
+There are various pre-built filters in PM4Py, which make commonly needed process mining filtering functionality a lot easier. In the upcoming list, we briefly give an overview of these functions. We describe how to call them, their main input parameters, and their return objects.
+
+* **filter_start_activities(log, activities, retain=True)**; This function filters the given event log object (either a DataFrame or a PM4Py event log object) based on a given set of input activity names that need to occur at the starting point of a trace. If we set `retain` to `False`, we remove all traces that contain any of the specified activities as their first event.
+* **filter_end_activities(log, activities, retain=True)**; Similar functionality to the start activity filter. However, in this case, the filter is applied for the activities that occur at the end of a trace.
+* **filter_event_attribute_values(log, attribute_key, values, level="case", retain=True)**; Filters an event log (either a DataFrame or PM4Py EventLog object) on event attributes. The `attribute_key` is a string representing the attribute key to filter, the `values` parameter allows you to specify a set of allowed values. If the `level` parameter is set to `'case'`, then any trace that contains at least one event that matches the attribute-value combination is retained. If the `level` parameter value is set to `'event'`, only the events that describe the specified value are retained. Setting `retain` to `False` inverts the filter.
+* **filter_trace_attribute_values(log, attribute_key, values, retain=True)**; Keeps (or removes if `retain` is set to `False`) only the traces that have an attribute value for the provided `attribute_key` and listed in the collection of corresponding values.
+* **filter_variants(log, variants, retain=True)**; Keeps those traces that correspond to a specific activity execution sequence, i.e., known as a variant. For example, in a large log, we want to retain all traces that describe the execution sequence `'a'`, `'b'`, `'c'`. The `variants` parameter is a collection of lists of activity names.
+* **filter_directly_follows_relation(log, relations, retain=True)**; This function filters all traces that contain a specified 'directly follows relation'. Such a relation is simply a pair of activities, e.g., `('a','b')` such that `'a'` is directly followed by `'b'` in a trace. For example, the trace `< 'a', 'b', 'c', 'd' >` contains directly follows pairs `('a','b')`, `('b','c')`, and `('c','d')`. The `relations` parameter is a set of tuples containing activity names. The `retain` parameter allows us to express whether or not we want to keep or remove the matching traces.
+* **filter_eventually_follows_relation(log, relations, retain=True)**; This function allows us to match traces on a generalization of the directly follows relation, i.e., an arbitrary number of activities is allowed to occur in between the input relations. For example, when we call the function with a relation `('a','b')`, any trace in which we observe activity `'a'` at some point, to be followed later by activity `'b'`, again at some point, adheres to this filter. For example, a trace `< 'a', 'b', 'c', 'd' >` contains eventually follows pairs `('a','b')`, `('a','c')`, `('a','d')`, `('b','c')`, `('b','d')`, and `('c','d')`. Again, the `relations` parameter is a set of tuples containing activity names, and the `retain` parameter allows us to express whether or not we want to keep or remove the matching traces.
+* **filter_time_range(log, dt1, dt2, mode='events')**; Filters the event log based on a given time range, defined by timestamps `dt1` and `dt2`. The timestamps should be of the form `datetime.datetime`. The filter has three modes (default: `'events'`):
+
+ * *'events'*; Retains all events that fall in the provided time range. Removes any empty trace in the filtered event log.
+ * *'traces_contained'*; Retains any trace that is completely contained within the given time frame. For example, this filter is useful if one is interested in retaining all full traces in a specific day/month/year.
+ * *'traces_intersecting'*; Retains any trace that has at least one event that falls into the given time range.
+
+Consider the example code below, in which we provide various example applications of the mentioned filtering functions, using the running example event log. Try to copy-paste each line in your own environment and play around with the resulting filtered event log to get a good idea of the functionality of each filter. Note that all functions shown below also work when providing a DataFrame as an input!
+
+.. code-block:: python3
+
+ import pm4py
+ import datetime as dt
+
+ if __name__ == "__main__":
+ log = pm4py.read_xes('C:/Users/demo/Downloads/running-example.xes')
+
+ filtered = pm4py.filter_start_activities(log, {'register request'})
+
+ filtered = pm4py.filter_start_activities(log, {'register request TYPO!'})
+
+ filtered = pm4py.filter_end_activities(log, {'pay compensation'})
+
+ filtered = pm4py.filter_event_attribute_values(log, 'org:resource', {'Pete', 'Mike'})
+
+ filtered = pm4py.filter_event_attribute_values(log, 'org:resource', {'Pete', 'Mike'}, level='event')
+
+ filtered = pm4py.filter_trace_attribute_values(log, 'concept:name', {'3', '4'})
+
+ filtered = pm4py.filter_trace_attribute_values(log, 'concept:name', {'3', '4'}, retain=False)
+
+ filtered = pm4py.filter_variants(log, [
+ ['register request', 'check ticket', 'examine casually', 'decide', 'pay compensation']])
+
+ filtered = pm4py.filter_variants(log, [
+ ['register request', 'check ticket', 'examine casually', 'decide', 'reject request']])
+
+ filtered = pm4py.filter_directly_follows_relation(log, [('check ticket', 'examine casually')])
+
+ filtered = pm4py.filter_eventually_follows_relation(log, [('examine casually', 'reject request')])
+
+ filtered = pm4py.filter_time_range(log, dt.datetime(2010, 12, 30), dt.datetime(2010, 12, 31), mode='events')
+
+ filtered = pm4py.filter_time_range(log, dt.datetime(2010, 12, 30), dt.datetime(2010, 12, 31),
+ mode='traces_contained')
+
+ filtered = pm4py.filter_time_range(log, dt.datetime(2010, 12, 30), dt.datetime(2010, 12, 31),
+ mode='traces_intersecting')
+
+Discovering Your First Process Model
+------------------------------------
+
+Since we have studied basic conceptual knowledge of process mining and event data munging and crunching, we focus on process discovery. As indicated, the goal is to discover, i.e., primarily automated and algorithmic, a process model that accurately describes the process, i.e., as observed in the event data. For example, given the running example event data, we aim to discover the process model that we have used to explain the running example's process behavior, i.e., Figure 3. This section briefly explains what modeling formalisms exist in PM4Py while applying different process discovery algorithms. Secondly, we give an overview of the implemented process discovery algorithms, their output type(s), and how we can invoke them. Finally, we discuss the challenges of applying process discovery in practice.
+
+.. raw:: html
+
+
+ → Watch on YouTube: PM4Py tutorials - tutorial #7 Process Discovery
+
+Obtaining a Process Model
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+There are three different process modeling notations that are currently supported in PM4Py. These notations are: BPMN, i.e., models such as the ones shown earlier in this tutorial, Process Trees, and Petri nets.
+A Petri net is a more mathematical modeling representation compared to BPMN. Often the behavior of a Petri net is more difficult to comprehend compared to BPMN models. However, due to their mathematical nature, Petri nets are typically less ambiguous (i.e., confusion about their described behavior is not possible). Process Trees represent a strict subset of Petri nets and describe process behavior in a hierarchical manner. In this tutorial, we will focus primarily on BPMN models and Process Trees. For more information about Petri nets and their application to (business) process modeling (from a ‘workflow’ perspective), we refer to `this article `_.
+
+Interestingly, none of the algorithms implemented in PM4Py directly discovers a BPMN model. However, any process tree can easily be translated to a BPMN model. Since we have already discussed the basic operators of BPMN models, we will start with the discovery of a process tree, which we convert to a BPMN model. Later, we will study the ‘underlying’ process tree. The algorithm that we are going to use is the ‘Inductive Miner’; More details about the (inner workings of the) algorithm can be found in `this article `_. Consider the following code snippet. We discover a BPMN model (using a conversion from process tree to BPMN) using the Inductive Miner, based on the running example event data set.
+
+.. code-block:: python3
+
+ import pm4py
+
+ if __name__ == "__main__":
+ log = pm4py.read_xes('C:/Users/demo/Downloads/running-example.xes')
+
+ process_tree = pm4py.discover_process_tree_inductive(log)
+ bpmn_model = pm4py.convert_to_bpmn(process_tree)
+ pm4py.view_bpmn(bpmn_model)
+
+
+Note that the resulting process model is the following image:
+
+.. image:: https://processintelligence.solutions/static/images/getting_started/bpmn_inductive_running_example.png
+
+*Figure 6: BPMN model discovered based on the running example event data set, using the Inductive Miner implementation of PM4Py.*
+
+Observe that the process model that we discovered is indeed the same model as the model that we have used before, i.e., as shown in Figure 3.
+
+As indicated, the algorithm used in this example actually discovers a Process Tree. Such a process tree is, mathematically speaking, a `rooted tree `_ annotated with control-flow information. We’ll first use the following code snippet to discover a process tree based on the running example and afterwards shortly analyze the model.
+
+.. code-block:: python3
+
+ import pm4py
+
+ if __name__ == "__main__":
+ log = pm4py.read_xes('C:/Users/demo/Downloads/running-example.xes')
+
+ process_tree = pm4py.discover_process_tree_inductive(log)
+ pm4py.view_process_tree(process_tree)
+
+
+.. image:: https://processintelligence.solutions/static/images/getting_started/process_tree_running_example.png
+
+*Figure 7: Process Tree model discovered based on the running example event data set, using the Inductive Miner implementation of PM4Py.*
+
+We examine the process tree model from top to bottom. The first circle, i.e., the ‘root’ of the process tree, describes a ‘->’ symbol. This means that, when scrolling further down, the process described by the model executes the ‘children’ of the root from left to right. Hence, first “register request” is executed, followed by the circle node with the ‘*’ symbol, finally to be followed by the node with the ‘X’ symbol. The node with the ‘*’ represents ‘repeated behavior’, i.e., the possibility to repeat the behavior. When scrolling further down, the left-most ‘subtree’ of the ‘*’-operator is always executed, and the right-most child (in this case, “reinitiate request”) triggers a repeated execution of the left-most child. Observe that this is in line with the process models we have seen before, i.e., the “reinitiate request” activity allows us to repeat the behavior regarding examinations and checking the ticket. When we go further down in the subtree of the ‘*’-operator, we again observe a ‘->’ node. Hence, its left-most child is executed first, followed by its right-most child (“decide”). The left-most child of the ‘->’ node has a ‘+’ symbol. This represents concurrent behavior; hence, its children can be executed simultaneously or in any order. Its left-most child is the “check ticket” activity. Its right-most child is a node with an ‘X’ symbol (just like the right-most child of the tree's root). This represents an exclusive choice, i.e., one of the children is executed (either “examine casually” or “examine thoroughly”). Observe that the process tree describes the exact same behavior as the BPMN models shown before.
+
+Obtaining a Process Map
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Many `commercial process mining solutions `_ do not provide extended support for discovering process models. Often, as a main visualization of processes, process maps are used. A process map contains activities and connections (by means of arcs) between them. A connection between two activities usually means that there is some form of precedence relation. In its simplest form, it means that the 'source' activity directly precedes the 'target' activity. Let us quickly take a look at a concrete example! Consider the following code snippet, in which we learn a ‘Directly Follows Graph’ (DFG)-based process map:
+
+.. code-block:: python3
+
+ import pm4py
+
+ if __name__ == "__main__":
+ log = pm4py.read_xes('C:/Users/demo/Downloads/running-example.xes')
+
+ dfg, start_activities, end_activities = pm4py.discover_dfg(log)
+ pm4py.view_dfg(dfg, start_activities, end_activities)
+
+
+.. image:: https://processintelligence.solutions/static/images/getting_started/dfg_running_example.png
+
+*Figure 8: Process Map (DFG-based) discovered based on the running example event data set.*
+
+The **pm4py.discover_dfg(log)** function returns a triple. The first result, i.e., called `dfg` in this example, is a dictionary mapping pairs of activities that follow each other directly to the number of corresponding observations. The second and third arguments are the start and end activities observed in the event log (again, counts). In the visualization, the green circle represents the start of any observed process instance. The orange circle represents the end of an observed process instance. In six cases, the register request is the first activity observed (represented by the arc labeled with value 6). In the event log, the check ticket activity is executed directly after the register request activity. The examine thoroughly activity follows registration once, and examine casually follows three times. Note that, indeed, in total, the register activity is followed by six different events, i.e., there are six traces in the running example event log. However, note that there are typically much more relations observable compared to the number of cases in an event log. Even using this simple event data, the DFG-based process map of the process is much more complex than the process models learned earlier. Furthermore, it is much more difficult to infer the actual execution of the process based on the process map. Hence, when using process maps, one should be very careful when trying to comprehend the actual process.
+
+In PM4Py, we also implemented the `Heuristics Miner `_, a more advanced process map discovery algorithm compared to its DFG-based alternative. We won’t go into the algorithmic details here; however, in an HM-based process map, the arcs between activities represent observed concurrency. For example, the algorithm is able to detect that the ticket check and examination are concurrent. Hence, these activities will not be connected in the process map. As such, an HM-based process map is typically simpler compared to a DFG-based process map.
+
+.. code-block:: python3
+
+ import pm4py
+
+ if __name__ == "__main__":
+ log = pm4py.read_xes('C:/Users/demo/Downloads/running-example.xes')
+
+ map = pm4py.discover_heuristics_net(log)
+ pm4py.view_heuristics_net(map)
+
+
+.. image:: https://processintelligence.solutions/static/images/getting_started/hnet_running_example.png
+
+*Figure 9: Process Map (HM-based) discovered based on the running example event data set.*
+
+Conformance Checking
+------------------------------------
+
+.. raw:: html
+
+
+ → Watch on YouTube: PM4Py tutorials - tutorial #8 Conformance Checking
+
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/getting_started_index.rst b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/getting_started_index.rst
new file mode 100644
index 0000000000000000000000000000000000000000..ea66edfc93837b0db8971938e308150e7c582d6b
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/getting_started_index.rst
@@ -0,0 +1,12 @@
+:html_theme.sidebar_secondary.remove:
+
+Getting Started
+===============
+
+Welcome to the PM4Py Getting Started guide! ...
+
+.. toctree::
+ :maxdepth: 2
+
+ install
+ getting_started
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/index.rst b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/index.rst
new file mode 100644
index 0000000000000000000000000000000000000000..43242596309c35dc6b804f63388d1875fb0281e2
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/index.rst
@@ -0,0 +1,125 @@
+:html_theme.sidebar_secondary.remove:
+:notoc:
+
+Welcome to PM4Py's Documentation!
+===================================
+
+``PM4Py`` is a Python library implementing a variety of `process mining `_ algorithms.
+
+.. code-block:: python
+
+ import pm4py
+
+ if __name__ == "__main__":
+ log = pm4py.read_xes('')
+ process_model = pm4py.discover_bpmn_inductive(log)
+ pm4py.view_bpmn(process_model)
+
+In this documentation, you can find all relevant information to set up ``PM4Py`` and start your process mining journey.
+Please consult the contents listed below to navigate the documentation.
+
+Happy #ProcessMining!
+
+.. grid:: 1 1 2 2
+ :gutter: 3
+ :margin: 4 4 0 0
+
+ .. grid-item-card::
+ :text-align: center
+ :shadow: md
+
+ .. raw:: html
+
+
+
+
+
+ **Getting Started**
+ ^^^
+
+ New to PM4Py? Read through our installation guide or get an introduction to process mining using PM4Py.
+
+ +++
+ .. button-ref:: getting_started_index
+ :expand:
+ :color: light
+ :click-parent:
+
+ To the getting started guides
+
+ .. grid-item-card::
+ :text-align: center
+ :shadow: md
+
+ .. raw:: html
+
+
+
+
+
+ **API Reference**
+ ^^^
+
+ Explore the PM4Py API by going through all available methods.
+
+ +++
+ .. button-ref:: api
+ :expand:
+ :color: light
+ :click-parent:
+
+ To the API reference
+
+ .. grid-item-card::
+ :text-align: center
+ :shadow: md
+
+ .. raw:: html
+
+
+
+
+
+ **Release Notes**
+ ^^^
+
+ Want to know what's new? Check out the release notes for the latest updates and bug fixes.
+
+ +++
+ .. button-ref:: release_notes
+ :expand:
+ :color: light
+ :click-parent:
+
+ To the release notes
+
+ .. grid-item-card::
+ :text-align: center
+ :shadow: md
+
+ .. raw:: html
+
+
+
+
+
+ **GitHub Repository**
+ ^^^
+
+ Want to contribute? Visit our Github Page!
+
+ +++
+ .. button-link:: https://github.com/process-intelligence-solutions/pm4py
+ :expand:
+ :color: light
+ :click-parent:
+
+ To our Github Repository
+
+.. toctree::
+ :hidden:
+ :maxdepth: 2
+
+ getting_started_index
+ api
+ release_notes
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/install.rst b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/install.rst
new file mode 100644
index 0000000000000000000000000000000000000000..6c4b0781392d6b5a30544a321c4bff0e9f985c9e
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/install.rst
@@ -0,0 +1,33 @@
+Installation
+============
+
+pip
+---
+
+To use ``PM4Py`` on any OS, install it using ``pip``:
+
+.. code-block:: console
+
+ (.venv) $ pip install pm4py
+
+``PM4Py`` uses the ``Graphviz`` library for rendering visualizations.
+Please install `Graphviz `_.
+
+After installation, Graphviz is located in the ``program files`` directory.
+The ``bin\`` folder of the Graphviz directory needs to be added manually to the ``system path``.
+In order to do so, please follow `this instruction `_.
+
+Docker
+------
+
+To install PM4Py via Docker, use:
+
+.. code-block:: console
+
+ docker pull pm4py/pm4py-core:latest
+
+To run PM4Py via Docker, use:
+
+.. code-block:: console
+
+ docker run -it pm4py/pm4py-core:latest bash
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/pm4py-logo.png b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/pm4py-logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..e4a780b8310b63ce3c9fddb9476a6abd4499136a
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/pm4py-logo.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:66d0c73db9de12ae5174f90ad2a9c986eb1a08f4c3d3a4f4884fa4317e1ff530
+size 207812
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/release_notes.rst b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/release_notes.rst
new file mode 100644
index 0000000000000000000000000000000000000000..0505e228fcb7c4e675d9ed469aba7b57826d3c09
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/docs/source/release_notes.rst
@@ -0,0 +1,127 @@
+Release Notes
+=============
+
+PM4Py 2.7.0 - Release Notes
+----------------------------
+
+The major changes in PM4Py 2.7.0 are as follows:
+
+1. We added an initial integration to ChatGPT.
+
+2. We added some connectors for workstation-supported processes (Outlook mail and calendar; web browsers).
+
+PM4Py 2.6.0 - Release Notes
+----------------------------
+
+The major changes in PM4Py 2.6.0 are as follows:
+
+1. We added the ILP Miner as a process discovery algorithm.
+
+2. We added two log filters: "timestamp grouping" and "consecutive activities."
+
+3. We added the insertion of the case arrival/finish rate and of the waiting/service/sojourn times in the simplified interface.
+
+4. We added a baseline clustering algorithm, based on the pre-existing feature extraction.
+
+5. We added the extraction of the "target vector" from event logs for machine learning purposes.
+
+PM4Py 2.5.0 - Release Notes
+----------------------------
+
+The major changes in PM4Py 2.5.0 are as follows:
+
+1. We added the Cardoso and extended Cardoso simplicity metrics to PM4Py.
+
+2. We added discovery of Stochastic Arc Weight nets based on OCEL logs.
+
+3. We added Murata-based Petri net simplification to the simplified interface (implicit place removal).
+
+PM4Py 2.4.0 - Release Notes
+----------------------------
+
+Today, we released PM4Py 2.4.0. We have slightly adopted our release policy; as of now, the PM4Py versioning follows the MAJOR.MINOR.FIX pattern. We will also report all MAJOR and MINOR releases in the release notes.
+
+As today's release is a minor release, we report on the main changes here.
+
+1. We added the Murata algorithm (Berthelot implementation) to remove the structurally redundant places, which is now available in the simplified interface.
+
+2. We added the reduction of invisible transitions in Petri nets to the simplified interface.
+
+3. We added support for calculating stochastic languages of process models.
+
+4. We added support for calculating EMD between two stochastic languages.
+
+5. We added a visualization of alignments in the simplified interface.
+
+6. We added visualization of the footprint table in the simplified interface.
+
+7. We added a conversion of Petri net objects to NetworkX DiGraphs.
+
+8. We added support for stochastic Petri nets.
+
+9. We added support for stochastic arc-weight nets (the paper describing this class of nets is submitted to the Petri Nets 2023 conference).
+
+PM4Py 2.3.0 - Release Notes
+----------------------------
+
+Finally, PM4Py 2.3.0 has arrived! The 2.3.0 release contains various significant updates and improvements compared to its predecessors. The release consists of approximately 550 commits and 47,000 LoC! The main changes are as follows:
+
+1. *Flexible parameter passing in the simplified method invocation*, e.g., :meth:`pm4py.discovery.discover_petri_net_inductive`;
+
+ For example, in ```pm4py``` 2.2.X, the columns used in process discovery were fixed (i.e., case:concept:name, concept:name, time:timestamp). Hence, changing the perspective implied changing column headers.
+
+ In PM4Py 2.3.X, the columns used in process discovery are now part of the function arguments.
+
+ A simple comparison:
+
+ * Discovering a Petri net in PM4Py 2.2.X:
+
+ ``pm4py.discover_petri_net_inductive(dataframe, noise_threshold=0.2)``
+
+ * Discovering a Petri net in PM4Py 2.3.X:
+
+ ``pm4py.discover_petri_net_inductive(dataframe, noise_threshold=0.2, activity_key="activity", timestamp_key="timestamp", case_id_key="case")``
+
+2. *Dataframes are primary citizens*;
+
+ PM4Py used to support both Pandas ``Dataframes`` and our custom-defined event log object. We have decided to adapt all algorithms to work on Dataframes. As such, event data is expected to be represented as a Dataframe in PM4Py (i.e., we are dropping the explicit use of our custom event log object). There are two main reasons for this design decision:
+
+ 1. *Performance*; Generally, Pandas Dataframes perform significantly better on most operations compared to our custom event log object.
+
+ 2. *Practice*; Most real event data is of tabular form.
+
+ Of course, PM4Py still supports importing .xes files. However, when importing an event log using :meth:`pm4py.read.read_xes`, the object is directly converted into a Dataframe.
+
+ A general drawback of this design decision is that PM4Py no longer appropriately supports nested objects (generally supported by the .xes standard). However, as indicated in point 2, such nested objects are rarely used in practice.
+
+3. *Typing Information in the simplified interface*;
+
+ All methods in the simplified interface are guaranteed to have typing information on their input and output objects.
+
+4. *Variant Representation*;
+
+ In PM4Py 2.3.X, trace variants are represented as a tuple of strings (representing activity names) instead of a string where a ‘,’ symbol indicates activity separation. For example, a variant of the form is now represented as a tuple (‘A’, ’B’, ’C’) and was previously represented as ‘A,B,C’. This fix allows activity names to contain a ‘,’ symbol.
+
+5. *Inductive Miner Revised*;
+
+ We have re-implemented and restructured the code of the inductive miner. The new version is closer to the reference implementation in ProM and is more performant than the previous version.
+
+6. *Business Hours Revised*
+
+ The business hours functionality in PM4Py has been completely revised. In PM4Py 2.2.X, one could only specify the working days and hours, which were fixed. In PM4Py 2.3.X, one can define weekday-based activity slots (e.g., to model breaks). One slot, i.e., one tuple, consists of one start and one end time given in seconds since week start, e.g.::
+
+ [
+ (7 * 60 * 60, 17 * 60 * 60),
+ ((24 + 7) * 60 * 60, (24 + 12) * 60 * 60),
+ ((24 + 13) * 60 * 60, (24 + 17) * 60 * 60),
+ ]
+
+ meaning that business hours are Mondays 07:00 - 17:00 and Tuesdays 07:00 - 12:00 and 13:00 - 17:00.
+
+7. *Auto-Generated Docs*;
+
+ As you may have noticed, this website serves as the new documentation hub for PM4Py. It contains all previously available information on the project website related to ‘installation’ and ‘getting started’. For the simplified interface, we have merged the general documentation with the API docs to improve the overall understanding of working with PM4Py. The docs are now generated directly from the PM4Py source. Hence, feel free to share a pull request if you find any issues.
+
+Happy #processmining!
+
+The #PM4Py development team.
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/CHECK_MISSING.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/CHECK_MISSING.py
new file mode 100644
index 0000000000000000000000000000000000000000..319efb5b2f1f1008f7d874fd345c9f3ab32b92fa
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/CHECK_MISSING.py
@@ -0,0 +1,15 @@
+import os
+
+
+if __name__ == "__main__":
+ files = [
+ x.split(".")[0]
+ for x in os.listdir(".")
+ if x.endswith(".py")
+ and "execute_everything" not in x
+ and "CHECK_MISSING" not in x
+ ]
+ contents_ex_everything = open("execute_everything.py", "r").read()
+ for f in files:
+ if f not in contents_ex_everything:
+ print(f)
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/activities_to_alphabet.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/activities_to_alphabet.py
new file mode 100644
index 0000000000000000000000000000000000000000..e92b0d710b254cf341bbedbe4b568fa77f04a19a
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/activities_to_alphabet.py
@@ -0,0 +1,14 @@
+import pm4py
+from pm4py.objects.log.util import activities_to_alphabet
+from pm4py.util import constants
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes", return_legacy_log_object=False)
+ renamed_dataframe: pandas.DataFrame | tuple[pandas.DataFrame, dict[str, str]] = activities_to_alphabet.apply(dataframe, parameters={constants.PARAMETER_CONSTANT_ACTIVITY_KEY: "concept:name"})
+ print(renamed_dataframe)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/activity_position.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/activity_position.py
new file mode 100644
index 0000000000000000000000000000000000000000..b678ee1635c09a178eb88d123d64e7e122d70cc5
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/activity_position.py
@@ -0,0 +1,17 @@
+import pm4py
+from pm4py.util import constants, pandas_utils
+from pm4py.objects.log.util import dataframe_utils
+import os
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "receipt.csv"))
+ dataframe = dataframe_utils.convert_timestamp_columns_in_df(dataframe, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["time:timestamp"])
+ # prints the summary of the positions of two activities
+ print(pm4py.get_activity_position_summary(dataframe, "Confirmation of receipt"))
+ print(pm4py.get_activity_position_summary(dataframe, "T02 Check confirmation of receipt"))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/align_approx_pt.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/align_approx_pt.py
new file mode 100644
index 0000000000000000000000000000000000000000..02e5819c89f7553b3ddef8f543d0d590ba6f38cb
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/align_approx_pt.py
@@ -0,0 +1,30 @@
+import os
+import importlib.util
+from pm4py.algo.discovery.inductive import algorithm as inductive
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.conformance.alignments.process_tree import algorithm as align_approx
+from pm4py.objects.petri_net.utils.align_utils import pretty_print_alignments
+from examples import examples_conf
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "running-example.xes")
+
+ log: EventLog = xes_importer.apply(log_path)
+ tree: ProcessTree = inductive.apply(log)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.process_tree import visualizer as pt_vis
+ gviz = pt_vis.apply(tree, parameters={pt_vis.Variants.WO_DECORATION.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ pt_vis.view(gviz)
+
+ print("start calculate approximated alignments")
+ approx_alignments: dict[str, Any] | list[dict[str, Any]] = align_approx.apply(log, tree)
+ pretty_print_alignments(approx_alignments)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/align_decomposition_ex_paper.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/align_decomposition_ex_paper.py
new file mode 100644
index 0000000000000000000000000000000000000000..d64c2502ab84d45a069171096809a7ee545a713d
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/align_decomposition_ex_paper.py
@@ -0,0 +1,99 @@
+from pm4py.objects.petri_net.obj import PetriNet, Marking
+from pm4py.objects.petri_net.utils.petri_utils import add_arc_from_to
+from pm4py.objects.petri_net.utils import decomposition
+from examples import examples_conf
+import importlib.util
+
+
+def execute_script():
+ net: PetriNet = PetriNet("")
+ start: PetriNet.Place = PetriNet.Place("start")
+ end: PetriNet.Place = PetriNet.Place("end")
+ c1: PetriNet.Place = PetriNet.Place("c1")
+ c2: PetriNet.Place = PetriNet.Place("c2")
+ c3: PetriNet.Place = PetriNet.Place("c3")
+ c4: PetriNet.Place = PetriNet.Place("c4")
+ c5: PetriNet.Place = PetriNet.Place("c5")
+ c6: PetriNet.Place = PetriNet.Place("c6")
+ c7: PetriNet.Place = PetriNet.Place("c7")
+ c8: PetriNet.Place = PetriNet.Place("c8")
+ c9: PetriNet.Place = PetriNet.Place("c9")
+ net.places.add(c1)
+ net.places.add(c2)
+ net.places.add(c3)
+ net.places.add(c4)
+ net.places.add(c5)
+ net.places.add(c6)
+ net.places.add(c7)
+ net.places.add(c8)
+ net.places.add(c9)
+ net.places.add(start)
+ net.places.add(end)
+ t1: PetriNet.Transition = PetriNet.Transition("t1", "a")
+ t2: PetriNet.Transition = PetriNet.Transition("t2", None)
+ t3: PetriNet.Transition = PetriNet.Transition("t3", "b")
+ t4: PetriNet.Transition = PetriNet.Transition("t4", "c")
+ t5: PetriNet.Transition = PetriNet.Transition("t5", "d")
+ t6: PetriNet.Transition = PetriNet.Transition("t6", "e")
+ t7: PetriNet.Transition = PetriNet.Transition("t7", None)
+ t8: PetriNet.Transition = PetriNet.Transition("t8", "f")
+ t9: PetriNet.Transition = PetriNet.Transition("t9", "g")
+ t10: PetriNet.Transition = PetriNet.Transition("t10", "h")
+ t11: PetriNet.Transition = PetriNet.Transition("t11", None)
+ net.transitions.add(t1)
+ net.transitions.add(t2)
+ net.transitions.add(t3)
+ net.transitions.add(t4)
+ net.transitions.add(t5)
+ net.transitions.add(t6)
+ net.transitions.add(t7)
+ net.transitions.add(t8)
+ net.transitions.add(t9)
+ net.transitions.add(t10)
+ net.transitions.add(t11)
+ add_arc_from_to(start, t1, net)
+ add_arc_from_to(t1, c1, net)
+ add_arc_from_to(t1, c2, net)
+ add_arc_from_to(c1, t2, net)
+ add_arc_from_to(c1, t3, net)
+ add_arc_from_to(c2, t4, net)
+ add_arc_from_to(t2, c3, net)
+ add_arc_from_to(t3, c3, net)
+ add_arc_from_to(t4, c4, net)
+ add_arc_from_to(c3, t5, net)
+ add_arc_from_to(c4, t5, net)
+ add_arc_from_to(t5, c5, net)
+ add_arc_from_to(c5, t6, net)
+ add_arc_from_to(t6, c1, net)
+ add_arc_from_to(t6, c2, net)
+ add_arc_from_to(c5, t7, net)
+ add_arc_from_to(t7, c7, net)
+ add_arc_from_to(t7, c6, net)
+ add_arc_from_to(c7, t8, net)
+ add_arc_from_to(c6, t9, net)
+ add_arc_from_to(t8, c8, net)
+ add_arc_from_to(t9, c9, net)
+ add_arc_from_to(c8, t11, net)
+ add_arc_from_to(c9, t11, net)
+ add_arc_from_to(t11, end, net)
+ add_arc_from_to(c5, t10, net)
+ add_arc_from_to(t10, end, net)
+ im: Marking = Marking()
+ im[start] = 1
+ fm: Marking = Marking()
+ fm[end] = 1
+ decomposed_net = decomposition.decompose(net, im, fm)
+ gvizs = []
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer
+
+ gvizs.append(visualizer.apply(net, im, final_marking=fm, parameters={"format": examples_conf.TARGET_IMG_FORMAT}))
+ visualizer.view(gvizs[len(gvizs) - 1])
+ for snet, sim, sfm in decomposed_net:
+ gvizs.append(visualizer.apply(snet, sim, final_marking=sfm, parameters={"format": examples_conf.TARGET_IMG_FORMAT}))
+ visualizer.view(gvizs[len(gvizs) - 1])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/align_decomposition_example.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/align_decomposition_example.py
new file mode 100644
index 0000000000000000000000000000000000000000..1ae66e6475c4c9ca9bf273d6cb3a0e9accc58510
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/align_decomposition_example.py
@@ -0,0 +1,35 @@
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.algo.conformance.alignments.decomposed import algorithm as dec_align
+from pm4py.algo.evaluation.replay_fitness import algorithm as rep_fit
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+import os
+import time
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ # import the a32f0n00 log
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "compressed_input_data", "09_a32f0n00.xes.gz"))
+ # discover a model using the inductive miner
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = process_tree_converter.apply(process_tree)
+ # apply the alignments decomposition with a maximal number of border disagreements set to 5
+ aa: float = time.time()
+ aligned_traces = dec_align.apply(log, net, im, fm, parameters={
+ dec_align.Variants.RECOMPOS_MAXIMAL.value.Parameters.PARAM_THRESHOLD_BORDER_AGREEMENT: 5})
+ bb: float = time.time()
+ print(bb-aa)
+ # print(aligned_traces)
+ # calculate the fitness over the recomposed alignment (use the classical evaluation)
+ fitness = rep_fit.evaluate(aligned_traces, variant=rep_fit.Variants.ALIGNMENT_BASED)
+ print(fitness)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/alignment_discounted_a_star.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/alignment_discounted_a_star.py
new file mode 100644
index 0000000000000000000000000000000000000000..750fa394e46b17a1f3aa5e74fa1c3818544d1921
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/alignment_discounted_a_star.py
@@ -0,0 +1,63 @@
+import os
+import time
+from pm4py.algo.conformance.alignments.petri_net import algorithm as ali
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.petri_net.importer import importer as petri_importer
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import PetriNet, Marking
+
+
+def synchronous_discounted_alignment():
+ '''
+ This function runs an alignment based on the discounted edit distance
+ By using the synchronous product
+ :return:
+ '''
+ log_path: str = os.path.join("..", "tests", "input_data", "running-example.xes")
+ pnml_path: str = os.path.join("..", "tests", "input_data", "running-example.pnml")
+ log: EventLog = xes_importer.apply(log_path)
+ net: PetriNet
+ marking: Marking
+ fmarking: Marking
+ net, marking, fmarking = petri_importer.apply(pnml_path)
+
+ # to see the net :
+ #vizu(net,marking,fmarking).view()
+
+ start: float=time.time()
+
+ alignments1 = ali.apply(log._list[0], net, marking, fmarking,
+ variant=ali.VERSION_DISCOUNTED_A_STAR,
+ parameters={ali.Parameters.SYNCHRONOUS:True,ali.Parameters.EXPONENT:1.1})
+ print(alignments1)
+ print("Time:",(time.time()-start))
+
+def no_synchronous_discounted_alignment():
+ '''
+ This function runs an alignment based on the discounted edit distance
+ By using the Petri net and petri_net.utils.align_utils.discountedEditDistance function
+ '''
+ log_path: str = os.path.join("..", "tests", "input_data", "running-example.xes")
+ pnml_path: str = os.path.join("..", "tests", "input_data", "running-example.pnml")
+ log: EventLog = xes_importer.apply(log_path)
+ net: PetriNet
+ marking: Marking
+ fmarking: Marking
+ net, marking, fmarking = petri_importer.apply(pnml_path)
+
+ start: float=time.time()
+
+ alignments1 = ali.apply(log._list[0], net, marking, fmarking,
+ variant=ali.VERSION_DISCOUNTED_A_STAR,
+ parameters={ali.Parameters.SYNCHRONOUS:False,ali.Parameters.EXPONENT:1.1})
+ print(alignments1)
+ print("Time:",(time.time()-start))
+
+
+def execute_script():
+ synchronous_discounted_alignment()
+ no_synchronous_discounted_alignment()
+
+
+if __name__ == '__main__':
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/alignment_test.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/alignment_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..10d2d49d321315c5b0c04a2914827fa3f2352f36
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/alignment_test.py
@@ -0,0 +1,55 @@
+import os
+
+from pm4py import util
+from pm4py.algo.conformance import alignments as ali
+from pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star import Parameters
+from pm4py.objects import log as log_lib
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.petri_net.importer import importer as petri_importer
+from pm4py.objects.petri_net.utils.align_utils import pretty_print_alignments
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def align(trace, net, im, fm, model_cost_function, sync_cost_function):
+ trace_costs = list(map(lambda e: 1000, trace))
+ params = dict()
+ params[util.constants.PARAMETER_CONSTANT_ACTIVITY_KEY] = log_lib.util.xes.DEFAULT_NAME_KEY
+ params[Parameters.PARAM_MODEL_COST_FUNCTION] = model_cost_function
+ params[Parameters.PARAM_TRACE_COST_FUNCTION] = trace_costs
+ params[Parameters.PARAM_SYNC_COST_FUNCTION] = sync_cost_function
+ return ali.petri_net.algorithm.apply_trace(trace, net, im, fm, parameters=params,
+ variant=ali.petri_net.algorithm.VERSION_STATE_EQUATION_A_STAR)
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "running-example.xes")
+ pnml_path: str = os.path.join("..", "tests", "input_data", "running-example.pnml")
+
+ # log_path = 'C:/Users/bas/Documents/tue/svn/private/logs/a32_logs/a32f0n05.xes'
+ # pnml_path = 'C:/Users/bas/Documents/tue/svn/private/logs/a32_logs/a32.pnml'
+
+ log: EventLog = xes_importer.apply(log_path)
+ net: PetriNet
+ marking: Marking
+ fmarking: Marking
+ net, marking, fmarking = petri_importer.apply(pnml_path)
+
+ model_cost_function = dict()
+ sync_cost_function = dict()
+ for t in net.transitions:
+ if t.label is not None:
+ model_cost_function[t] = 1000
+ sync_cost_function[t] = 0
+ else:
+ model_cost_function[t] = 1
+
+ alignments = []
+ for trace in log:
+ alignments.append(align(trace, net, marking, fmarking, model_cost_function, sync_cost_function))
+
+ pretty_print_alignments(alignments)
+
+
+if __name__ == '__main__':
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/all_optimal_alignments.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/all_optimal_alignments.py
new file mode 100644
index 0000000000000000000000000000000000000000..73a9ef45b0d8cb1ae0afceeac451c56298a966d4
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/all_optimal_alignments.py
@@ -0,0 +1,23 @@
+import pm4py
+from pm4py.algo.conformance.alignments.petri_net.variants import generator_dijkstra_less_memory
+import os
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log: EventLog = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"), return_legacy_log_object=True)
+
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.discover_petri_net_inductive(log)
+
+ for trace in log:
+ print("\n\n")
+ for ali in generator_dijkstra_less_memory.apply(trace, net, im, fm):
+ print(ali)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/antialignments_and_precision.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/antialignments_and_precision.py
new file mode 100644
index 0000000000000000000000000000000000000000..547e4a67960976bc3a3ee94cc694b095bc2ded66
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/antialignments_and_precision.py
@@ -0,0 +1,31 @@
+import os
+
+from pm4py.algo.conformance.antialignments.variants.discounted_a_star import apply as antii
+from pm4py.algo.conformance.antialignments.algorithm import Parameters
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.petri_net.importer import importer as petri_importer
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "running-example.xes")
+ pnml_path: str = os.path.join("..", "tests", "input_data", "running-example.pnml")
+ log: EventLog = xes_importer.apply(log_path)
+ net: PetriNet
+ marking: Marking
+ fmarking: Marking
+ net, marking, fmarking = petri_importer.apply(pnml_path)
+
+ THETA: float = 1.5
+ MU: int = 20
+ EPSILON: float = 0.01
+ resAnti = antii(log,net,marking,fmarking, parameters={Parameters.EXPONENT:THETA,
+ Parameters.EPSILON:EPSILON,
+ Parameters.MARKING_LIMIT:MU})
+ print(resAnti['anti-alignment'])
+ print("Precision:",resAnti['precision'])
+
+
+if __name__ == '__main__':
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_fixed_horizon.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_fixed_horizon.py
new file mode 100644
index 0000000000000000000000000000000000000000..bd96c5d31ddb0ed2db5b18fc6e8430c4307a9986
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_fixed_horizon.py
@@ -0,0 +1,102 @@
+"""Apply sequential fixed-horizon alignment to ``receipt.xes`` variants.
+
+Run from the ``examples`` directory with:
+
+ python approx_align_fixed_horizon.py
+
+The accepting Petri net is discovered from the complete receipt log using
+Inductive Miner at noise 0.0. Fixed-horizon alignment solves many integer
+tail estimates, so this runnable example uses the five most frequent variants.
+Increase ``NUMBER_OF_VARIANTS`` when a larger benchmark is desired.
+"""
+
+import os
+
+import pm4py
+from pm4py.algo.conformance.alignments.petri_net import algorithm as alignments
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.utils.align_utils import pretty_print_alignments
+from pm4py.statistics.variants.log import get as variants_get
+
+
+NUMBER_OF_VARIANTS = 5
+
+
+def load_log_and_discover_model():
+ examples_dir = os.path.dirname(os.path.abspath(__file__))
+ log_path = os.path.join(
+ examples_dir, "..", "tests", "input_data", "receipt.xes"
+ )
+ log = xes_importer.apply(log_path)
+ net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(
+ log, noise_threshold=0.0
+ )
+ return log, net, initial_marking, final_marking
+
+
+def most_frequent_variant_representatives(log, limit):
+ groups = sorted(
+ variants_get.get_variants(log).values(),
+ key=len,
+ reverse=True,
+ )[:limit]
+ return EventLog([traces[0] for traces in groups]), sum(map(len, groups))
+
+
+def execute_script():
+ log, net, initial_marking, final_marking = load_log_and_discover_model()
+ alignment_log, covered_cases = most_frequent_variant_representatives(
+ log, NUMBER_OF_VARIANTS
+ )
+
+ results = alignments.apply(
+ alignment_log,
+ net,
+ initial_marking,
+ final_marking,
+ variant=alignments.Variants.APPROX_FIXED_HORIZON,
+ parameters={
+ # Search and commit short executable prefixes. Increasing the
+ # horizon usually improves quality at greater computational cost.
+ "horizon": 3,
+ "min_progress": 1,
+ "max_horizon": 6,
+ "max_prefix_states": 3000,
+ "max_iterations": 100,
+ "max_align_time": 60,
+ "max_align_time_trace": 10,
+ "show_progress_bar": False,
+ "enable_best_worst_cost": False,
+ },
+ )
+
+ completed = [result for result in results if result is not None]
+ valid = sum(result["is_valid"] for result in completed)
+ print("Receipt cases used to discover the model:", len(log))
+ print("Discovered places / transitions:", len(net.places), len(net.transitions))
+ print("Representative variants aligned:", len(alignment_log))
+ print("Cases represented by those variants:", covered_cases)
+ print("Valid complete alignments:", valid, "/", len(completed))
+ print(
+ "Integer tail problems solved:",
+ sum(result["lp_solved"] for result in completed),
+ )
+ print(
+ "Alignments requiring exact-search fallback:",
+ sum(result["fallback_used"] for result in completed),
+ )
+
+ if completed:
+ example = max(completed, key=lambda result: len(result["alignment"]))
+ print("\nCommitted horizons:", example["committed_horizons"])
+ if example["fallback_reason"] is not None:
+ # No supported LP solver is one possible reason. The variant
+ # falls back to direct search rather than returning an invalid path.
+ print("Fallback reason:", example["fallback_reason"])
+ print("Cost / upper bound:", example["upper_bound"])
+ pretty_print_alignments(example)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_iws_streaming.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_iws_streaming.py
new file mode 100644
index 0000000000000000000000000000000000000000..a66bfe34382f7b997c345e854351445726da4bac
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_iws_streaming.py
@@ -0,0 +1,114 @@
+"""Stream all cases in ``receipt.xes`` through an IWS approximate aligner.
+
+Run from the ``examples`` directory with:
+
+ python approx_align_iws_streaming.py
+
+The model is discovered from the full log with Inductive Miner at noise 0.0.
+The twenty most frequent variants form the finite proxy trie, after which all
+1,434 receipt cases are replayed event by event and explicitly completed.
+Cases outside the proxy can still be explained using log/model moves.
+"""
+
+import os
+
+import pm4py
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.utils.align_utils import pretty_print_alignments
+from pm4py.statistics.variants.log import get as variants_get
+from pm4py.streaming.algo.conformance.alignments import (
+ algorithm as streaming_alignments,
+)
+
+
+PROXY_VARIANTS = 20
+
+
+def load_log_and_discover_model():
+ examples_dir = os.path.dirname(os.path.abspath(__file__))
+ log_path = os.path.join(
+ examples_dir, "..", "tests", "input_data", "receipt.xes"
+ )
+ log = xes_importer.apply(log_path)
+ net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(
+ log, noise_threshold=0.0
+ )
+ return log, net, initial_marking, final_marking
+
+
+def frequent_variant_proxy(log, limit):
+ """Build a small proxy log containing one trace per frequent variant."""
+ groups = sorted(
+ variants_get.get_variants(log).values(),
+ key=len,
+ reverse=True,
+ )[:limit]
+ return EventLog([traces[0] for traces in groups])
+
+
+def execute_script():
+ log, net, initial_marking, final_marking = load_log_and_discover_model()
+ proxy_log = frequent_variant_proxy(log, PROXY_VARIANTS)
+
+ online_aligner = streaming_alignments.apply(
+ net,
+ initial_marking,
+ final_marking,
+ variant=streaming_alignments.Variants.APPROX_IWS,
+ parameters={
+ "proxy_log": proxy_log,
+ "look_ahead": 3,
+ "decay_time": 8,
+ "discount_factor": 0.9,
+ "max_states": 20,
+ "max_align_time_trace": 10,
+ "max_expansions": 100000,
+ },
+ )
+
+ completed = []
+ first_prefix = None
+ for trace_index, trace in enumerate(log):
+ # A generated identifier avoids relying on a particular trace-level
+ # case attribute in the XES file.
+ case_id = f"receipt-{trace_index}"
+ for event_index, event in enumerate(trace):
+ online_aligner.receive(
+ {
+ "case:concept:name": case_id,
+ "concept:name": event["concept:name"],
+ }
+ )
+ if trace_index == 0 and event_index == 0:
+ first_prefix = online_aligner.get()[case_id]
+
+ # finish() appends the cheapest proxy-model suffix and validates that
+ # the result reaches the accepting final marking.
+ completed.append(online_aligner.finish(case_id))
+
+ print("Receipt cases streamed:", len(completed))
+ print("Receipt events streamed:", sum(len(trace) for trace in log))
+ print("Proxy variants:", len(proxy_log))
+ print("Discovered places / transitions:", len(net.places), len(net.transitions))
+ print("Valid complete alignments:", sum(result["is_valid"] for result in completed))
+ print(
+ "Mean standard-cost upper bound:",
+ sum(result["upper_bound"] for result in completed) / len(completed),
+ )
+
+ if first_prefix is not None:
+ print("\nPrefix alignment after the first streamed event:")
+ print("Active alternatives:", first_prefix["active_states"])
+ print("Best-state decay:", first_prefix["decay"])
+ pretty_print_alignments(first_prefix)
+
+ if completed:
+ # Show the completed case with the largest proxy-alignment cost.
+ example = max(completed, key=lambda result: result["standard_cost"])
+ print("Highest completed cost / upper bound:", example["upper_bound"])
+ pretty_print_alignments(example)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_sliding_window.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_sliding_window.py
new file mode 100644
index 0000000000000000000000000000000000000000..5d61f988cb65e31c341d707edc791d0cb63453b2
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_sliding_window.py
@@ -0,0 +1,97 @@
+"""Apply sliding-window top-k alignment to variants of ``receipt.xes``.
+
+Run from the ``examples`` directory with:
+
+ python approx_align_sliding_window.py
+
+The model is learned from the complete log using Inductive Miner with a noise
+threshold of 0.0. One trace from each of the most frequent variants is then
+aligned in windows. This representative batch keeps the example fast while
+still exercising PM4Py's log-level alignment interface.
+"""
+
+import os
+
+import pm4py
+from pm4py.algo.conformance.alignments.petri_net import algorithm as alignments
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.utils.align_utils import pretty_print_alignments
+from pm4py.statistics.variants.log import get as variants_get
+
+
+# Increase this value, up to the 116 variants in the log, for a larger batch.
+NUMBER_OF_VARIANTS = 12
+
+
+def load_log_and_discover_model():
+ examples_dir = os.path.dirname(os.path.abspath(__file__))
+ log_path = os.path.join(
+ examples_dir, "..", "tests", "input_data", "receipt.xes"
+ )
+ log = xes_importer.apply(log_path)
+ net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(
+ log, noise_threshold=0.0
+ )
+ return log, net, initial_marking, final_marking
+
+
+def most_frequent_variant_representatives(log, limit):
+ """Select one trace from each of the ``limit`` largest variant groups."""
+ groups = sorted(
+ variants_get.get_variants(log).values(),
+ key=len,
+ reverse=True,
+ )[:limit]
+ return EventLog([traces[0] for traces in groups]), sum(map(len, groups))
+
+
+def execute_script():
+ log, net, initial_marking, final_marking = load_log_and_discover_model()
+ alignment_log, covered_cases = most_frequent_variant_representatives(
+ log, NUMBER_OF_VARIANTS
+ )
+
+ results = alignments.apply(
+ alignment_log,
+ net,
+ initial_marking,
+ final_marking,
+ variant=alignments.Variants.APPROX_SLIDING_WINDOW,
+ parameters={
+ # Each fragment consumes at most five observed events.
+ "window_size": 5,
+ # Keep paths ending in up to three distinct model markings.
+ "max_candidates": 3,
+ "max_post_model_moves": 3,
+ "max_align_time": 60,
+ "max_align_time_trace": 10,
+ "max_expansions": 100000,
+ "show_progress_bar": False,
+ "enable_best_worst_cost": False,
+ },
+ )
+
+ completed = [result for result in results if result is not None]
+ valid = sum(result["is_valid"] for result in completed)
+ print("Receipt cases used to discover the model:", len(log))
+ print("Discovered places / transitions:", len(net.places), len(net.transitions))
+ print("Representative variants aligned:", len(alignment_log))
+ print("Cases represented by those variants:", covered_cases)
+ print("Valid complete alignments:", valid, "/", len(completed))
+ print(
+ "Alignments requiring exact-search fallback:",
+ sum(result["fallback_used"] for result in completed),
+ )
+
+ if completed:
+ # Display the example split into the greatest number of windows.
+ example = max(completed, key=lambda result: result["window_count"])
+ print("\nExample window count:", example["window_count"])
+ print("Candidates retained per window:", example["retained_candidates"])
+ print("Cost / upper bound:", example["upper_bound"])
+ pretty_print_alignments(example)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_subset_edit_distance.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_subset_edit_distance.py
new file mode 100644
index 0000000000000000000000000000000000000000..d56a20443b70d42d6ea3f5b420e7b1240eb24fe5
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_subset_edit_distance.py
@@ -0,0 +1,89 @@
+"""Align all of ``receipt.xes`` by subset selection and edit distance.
+
+Run from the ``examples`` directory with:
+
+ python approx_align_subset_edit_distance.py
+
+The Petri net is discovered from the complete receipt log with Inductive
+Miner at noise 0.0. A small set of frequent variants is aligned through the
+model, while the remaining variants are approximated from their nearest
+representative. Unlike the trace-oriented examples, this method efficiently
+processes all 1,434 cases in the demonstration.
+"""
+
+import os
+
+import pm4py
+from pm4py.algo.conformance.alignments.edit_distance import (
+ algorithm as edit_distance_alignments,
+)
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.petri_net.utils.align_utils import pretty_print_alignments
+
+
+def load_log_and_discover_model():
+ examples_dir = os.path.dirname(os.path.abspath(__file__))
+ log_path = os.path.join(
+ examples_dir, "..", "tests", "input_data", "receipt.xes"
+ )
+ log = xes_importer.apply(log_path)
+ net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(
+ log, noise_threshold=0.0
+ )
+ return log, net, initial_marking, final_marking
+
+
+def execute_script():
+ log, net, initial_marking, final_marking = load_log_and_discover_model()
+
+ summary = edit_distance_alignments.apply_approximation_with_summary(
+ log,
+ net,
+ initial_marking,
+ final_marking,
+ parameters={
+ # The ten most frequent variants are exact representatives. Try
+ # ``k_medoids`` when coverage of diverse behavior is preferred.
+ "selection_method": "frequency",
+ "subset_size": 10,
+ "max_align_time_trace": 60,
+ "max_expansions": 100000,
+ },
+ )
+ results = summary["alignments"]
+
+ print("Receipt cases aligned:", len(results))
+ print("Discovered places / transitions:", len(net.places), len(net.transitions))
+ print("Valid complete alignments:", sum(result["is_valid"] for result in results))
+ print(
+ "Cases belonging to exactly aligned representative variants:",
+ sum(result["selected_exact"] for result in results),
+ )
+ print(
+ "Approximate log fitness and bounds: "
+ f"{summary['log_fitness']:.3f} "
+ f"[{summary['fitness_lower_bound']:.3f}, "
+ f"{summary['fitness_upper_bound']:.3f}]"
+ )
+ print("Aggregate deviation counts:", summary["deviation_counts"])
+
+ if results:
+ # Prefer a non-representative case so the edit-distance approximation
+ # is visible in the printed alignment.
+ example = next(
+ (result for result in results if not result["selected_exact"]),
+ results[0],
+ )
+ print("\nExample selected exactly:", example["selected_exact"])
+ print("Representative model trace:", example["representative_variant"])
+ print(
+ "Fitness estimate and bounds: "
+ f"{example['approximated_fitness']:.3f} "
+ f"[{example['fitness_lower_bound']:.3f}, "
+ f"{example['fitness_upper_bound']:.3f}]"
+ )
+ pretty_print_alignments(example)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_tandem_repeats.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_tandem_repeats.py
new file mode 100644
index 0000000000000000000000000000000000000000..55632e205ba564e3525b2c22d56f8595371569ae
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/approx_align_tandem_repeats.py
@@ -0,0 +1,106 @@
+"""Apply tandem-repeat alignment to repetitive variants of ``receipt.xes``.
+
+Run from the ``examples`` directory with:
+
+ python approx_align_tandem_repeats.py
+
+The Petri net is discovered from the complete receipt log with Inductive
+Miner and no noise filtering. To keep the example focused and quick, the
+alignment batch contains one trace for every log variant in which the tandem
+repeat reduction can actually remove events.
+"""
+
+import os
+
+import pm4py
+from pm4py.algo.conformance.alignments.petri_net import algorithm as alignments
+from pm4py.algo.conformance.alignments.petri_net.variants.approx_tandem_repeats import (
+ reduce_tandem_repeats,
+)
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.utils.align_utils import pretty_print_alignments
+from pm4py.statistics.variants.log import get as variants_get
+
+
+def load_log_and_discover_model():
+ """Load the complete log and discover its zero-noise accepting net."""
+ examples_dir = os.path.dirname(os.path.abspath(__file__))
+ log_path = os.path.join(
+ examples_dir, "..", "tests", "input_data", "receipt.xes"
+ )
+ log = xes_importer.apply(log_path)
+
+ # A threshold of 0.0 tells Inductive Miner not to filter infrequent
+ # behavior. The returned markings make the Petri net accepting.
+ net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(
+ log, noise_threshold=0.0
+ )
+ return log, net, initial_marking, final_marking
+
+
+def select_repetitive_variants(log):
+ """Return one receipt trace for each compressible log variant."""
+ representatives = []
+ for traces in variants_get.get_variants(log).values():
+ trace = traces[0]
+ labels = [event["concept:name"] for event in trace]
+ _reduced, _kept_indices, repeats = reduce_tandem_repeats(labels)
+ if repeats:
+ representatives.append(trace)
+ return EventLog(representatives)
+
+
+def execute_script():
+ log, net, initial_marking, final_marking = load_log_and_discover_model()
+ repetitive_log = select_repetitive_variants(log)
+
+ results = alignments.apply(
+ repetitive_log,
+ net,
+ initial_marking,
+ final_marking,
+ variant=alignments.Variants.APPROX_TANDEM_REPEATS,
+ parameters={
+ "max_align_time": 60,
+ "max_align_time_trace": 10,
+ "max_expansions": 100000,
+ "show_progress_bar": False,
+ # Computing best-worst cost is optional and would run an extra
+ # alignment solely to normalize fitness.
+ "enable_best_worst_cost": False,
+ },
+ )
+
+ completed = [result for result in results if result is not None]
+ valid = sum(result["is_valid"] for result in completed)
+ print("Receipt cases used to discover the model:", len(log))
+ print("Discovered places / transitions:", len(net.places), len(net.transitions))
+ print("Compressible receipt variants aligned:", len(repetitive_log))
+ print("Valid complete alignments:", valid, "/", len(completed))
+ print(
+ "Events removed during all reductions:",
+ sum(result["removed_events"] for result in completed),
+ )
+ print(
+ "Model-loop copies restored during expansion:",
+ sum(result["model_loop_expansions"] for result in completed),
+ )
+
+ if completed:
+ # Show the trace on which compression removed the largest number of
+ # events. The printed result is the expanded, executable alignment.
+ example = max(completed, key=lambda result: result["removed_events"])
+ print("\nMost compressed example:")
+ print(
+ "Original / reduced length:",
+ example["original_trace_length"],
+ "/",
+ example["reduced_trace_length"],
+ )
+ print("Cost / upper bound:", example["upper_bound"])
+ pretty_print_alignments(example)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/backwards_token_replay.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/backwards_token_replay.py
new file mode 100644
index 0000000000000000000000000000000000000000..295377b11d64efb46b3a0af8bc09e67c45bb6060
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/backwards_token_replay.py
@@ -0,0 +1,25 @@
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.algo.conformance.tokenreplay import algorithm as tr
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+import os
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = process_tree_converter.apply(process_tree)
+ # perform the backwards token-based replay
+ replayed_traces: list[dict[str, Any]] = tr.apply(log, net, im, fm, variant=tr.Variants.BACKWARDS)
+ print(replayed_traces)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/batch_detection.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/batch_detection.py
new file mode 100644
index 0000000000000000000000000000000000000000..5a52f96baee3a8b8d74e09330b18406a7fe9a32a
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/batch_detection.py
@@ -0,0 +1,20 @@
+import pm4py
+from pm4py.algo.discovery.batches import algorithm
+import os
+import pandas
+from typing import Any
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ # detect the batches from the event log
+ batches: list[tuple[tuple[str, str], int, dict[str, Any]]] = algorithm.apply(log)
+ # print the batches (complete information) in a single row
+ print(batches)
+ # print a summary information (size) for each activity-resource combination that is performed in batches
+ for batch in batches:
+ print(batch[0], batch[1])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_from_pt_conversion.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_from_pt_conversion.py
new file mode 100644
index 0000000000000000000000000000000000000000..e07a5453e9e7e84fe4787bf94de3c8bb60d53a0c
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_from_pt_conversion.py
@@ -0,0 +1,28 @@
+import os
+
+import pm4py
+from pm4py.objects.conversion.process_tree import converter as pt_converter
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.objects.log.importer.xes import importer as xes_import
+from pm4py.objects.bpmn.exporter import exporter as bpmn_exporter
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+
+def execute_script():
+ log_path: str = os.path.join(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ log: EventLog = xes_import.apply(log_path)
+ ptree: ProcessTree = inductive_miner.apply(log)
+ bpmn = pt_converter.apply(ptree, variant=pt_converter.Variants.TO_BPMN)
+
+ if importlib.util.find_spec("graphviz"):
+ bpmn_exporter.apply(bpmn, "stru.bpmn")
+ os.remove("stru.bpmn")
+ pm4py.view_bpmn(bpmn, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_import_and_to_petri_net.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_import_and_to_petri_net.py
new file mode 100644
index 0000000000000000000000000000000000000000..b40d6826f3bfd08ddef9cfb3fbe68d6a9eac9d86
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_import_and_to_petri_net.py
@@ -0,0 +1,25 @@
+import os
+
+import pm4py
+from pm4py.objects.bpmn.importer import importer as bpmn_importer
+from pm4py.objects.conversion.bpmn import converter as bpmn_converter
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ bpmn_graph = bpmn_importer.apply(os.path.join("..", "tests", "input_data", "running-example.bpmn"))
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = bpmn_converter.apply(bpmn_graph, variant=bpmn_converter.Variants.TO_PETRI_NET)
+ precision_tbr: float = pm4py.precision_token_based_replay(log, net, im, fm)
+ print("precision", precision_tbr)
+ fitness_tbr: float = pm4py.precision_token_based_replay(log, net, im, fm)
+ print("fitness", fitness_tbr)
+ print(pm4py.check_soundness(net, im, fm))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_js_visualization.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_js_visualization.py
new file mode 100644
index 0000000000000000000000000000000000000000..391a9ac07c089a60cb753e102c43ccad81664550
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_js_visualization.py
@@ -0,0 +1,17 @@
+import pm4py
+import importlib.util
+import pandas
+from pm4py.objects.bpmn.obj import BPMN
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+
+ bpmn_model: BPMN = pm4py.discover_bpmn_inductive(log)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_bpmn(bpmn_model, variant_str="dagrejs")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_merging.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_merging.py
new file mode 100644
index 0000000000000000000000000000000000000000..3927796d6d3fe1d67394f36b50c8a8c6b26dd0b9
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/bpmn_merging.py
@@ -0,0 +1,237 @@
+import pm4py
+from pm4py.objects.bpmn.obj import BPMN
+
+
+def create_manual_bpmn_with_swimlanes():
+ # Create a new BPMN diagram with collaboration
+ collaboration_id: str = "collab_001"
+ bpmn_diagram: BPMN = BPMN(process_id=collaboration_id, name="Process with Swimlanes")
+
+ # Create collaboration
+ collaboration: BPMN.Collaboration = BPMN.Collaboration(id=collaboration_id, name="Main Collaboration")
+ bpmn_diagram.add_node(collaboration)
+
+ # Create two participants (swimlanes)
+ main_process_id: str = "proc_main_001"
+ sub_process_id: str = "proc_sub_001"
+
+ main_participant = BPMN.Participant(
+ id="part_main_001",
+ name="Main Department",
+ process_ref=main_process_id
+ )
+ sub_participant = BPMN.Participant(
+ id="part_sub_001",
+ name="Sub Department",
+ process_ref=sub_process_id
+ )
+
+ bpmn_diagram.add_node(main_participant)
+ bpmn_diagram.add_node(sub_participant)
+
+ # Main process nodes
+ main_start: BPMN.NormalStartEvent = BPMN.NormalStartEvent(name="Start Process", process=main_process_id)
+ main_task1: BPMN.Task = BPMN.Task(name="Perform Task 1", process=main_process_id)
+ main_task2: BPMN.Task = BPMN.Task(name="Perform Task 2", process=main_process_id)
+ main_end: BPMN.NormalEndEvent = BPMN.NormalEndEvent(name="End Process", process=main_process_id)
+
+ # Add main process nodes
+ bpmn_diagram.add_node(main_start)
+ bpmn_diagram.add_node(main_task1)
+ bpmn_diagram.add_node(main_task2)
+ bpmn_diagram.add_node(main_end)
+
+ # Sub process nodes
+ sub_start: BPMN.NormalStartEvent = BPMN.NormalStartEvent(name="Sub Start", process=sub_process_id)
+ sub_task: BPMN.Task = BPMN.Task(name="Sub Task", process=sub_process_id)
+ sub_end: BPMN.NormalEndEvent = BPMN.NormalEndEvent(name="Sub End", process=sub_process_id)
+
+ # Add sub process nodes
+ bpmn_diagram.add_node(sub_start)
+ bpmn_diagram.add_node(sub_task)
+ bpmn_diagram.add_node(sub_end)
+
+ # Create sequence flows within each swimlane
+ main_flow1: BPMN.SequenceFlow = BPMN.SequenceFlow(main_start, main_task1, name="Flow 1", process=main_process_id)
+ main_flow2: BPMN.SequenceFlow = BPMN.SequenceFlow(main_task1, main_task2, name="Flow 2", process=main_process_id)
+ main_flow3: BPMN.SequenceFlow = BPMN.SequenceFlow(main_task2, main_end, name="Flow 3", process=main_process_id)
+
+ sub_flow1: BPMN.SequenceFlow = BPMN.SequenceFlow(sub_start, sub_task, name="Sub Flow 1", process=sub_process_id)
+ sub_flow2: BPMN.SequenceFlow = BPMN.SequenceFlow(sub_task, sub_end, name="Sub Flow 2", process=sub_process_id)
+
+ # Add sequence flows
+ bpmn_diagram.add_flow(main_flow1)
+ bpmn_diagram.add_flow(main_flow2)
+ bpmn_diagram.add_flow(main_flow3)
+ bpmn_diagram.add_flow(sub_flow1)
+ bpmn_diagram.add_flow(sub_flow2)
+
+ # Add a message flow between swimlanes
+ message_flow = BPMN.MessageFlow(
+ source=main_task2,
+ target=sub_start,
+ name="Request Sub Process",
+ process=collaboration_id
+ )
+ bpmn_diagram.add_flow(message_flow)
+
+ # Set some layout information for visualization
+ # Main swimlane (vertically stacked)
+ main_participant.set_x(0)
+ main_participant.set_y(0)
+ main_participant.set_width(600)
+ main_participant.set_height(200)
+
+ main_start.set_x(50)
+ main_start.set_y(80)
+ main_task1.set_x(150)
+ main_task1.set_y(80)
+ main_task2.set_x(250)
+ main_task2.set_y(80)
+ main_end.set_x(350)
+ main_end.set_y(80)
+
+ # Sub swimlane (below main)
+ sub_participant.set_x(0)
+ sub_participant.set_y(200)
+ sub_participant.set_width(600)
+ sub_participant.set_height(200)
+
+ sub_start.set_x(50)
+ sub_start.set_y(280)
+ sub_task.set_x(150)
+ sub_task.set_y(280)
+ sub_end.set_x(250)
+ sub_end.set_y(280)
+
+ return bpmn_diagram
+
+
+def merge_bpmn_with_swimlanes(main_bpmn, bpmn_to_merge):
+ """
+ Merge another BPMN into the main BPMN diagram while maintaining swimlanes
+ """
+ # Find the collaboration
+ collaboration = next(n for n in main_bpmn.get_nodes() if isinstance(n, BPMN.Collaboration))
+
+ # Create a new participant for the merged process
+ new_process_id = bpmn_to_merge.get_process_id()
+ new_participant = BPMN.Participant(
+ id=f"part_{new_process_id}",
+ name=f"Merged Process {new_process_id}",
+ process_ref=new_process_id
+ )
+ main_bpmn.add_node(new_participant)
+
+ # Set layout for new swimlane (below existing ones)
+ participants = [n for n in main_bpmn.get_nodes() if isinstance(n, BPMN.Participant)]
+ max_y = max(p.get_y() + p.get_height() for p in participants[:-1])
+ new_participant.set_x(0)
+ new_participant.set_y(max_y)
+ new_participant.set_width(600)
+ new_participant.set_height(200)
+
+ # Add nodes with offset
+ id_mapping = {}
+ y_offset: int = max_y - list(bpmn_to_merge.get_nodes())[0].get_y() if bpmn_to_merge.get_nodes() else 0
+
+ for node in bpmn_to_merge.get_nodes():
+ new_node = type(node)(
+ id=node.get_id(),
+ name=node.get_name(),
+ process=new_process_id
+ )
+ new_node.set_x(node.get_x())
+ new_node.set_y(node.get_y() + y_offset)
+ new_node.set_width(node.get_width())
+ new_node.set_height(node.get_height())
+
+ main_bpmn.add_node(new_node)
+ id_mapping[node.get_id()] = new_node
+
+ # Add flows
+ for flow in bpmn_to_merge.get_flows():
+ source = id_mapping[flow.get_source().get_id()]
+ target = id_mapping[flow.get_target().get_id()]
+
+ new_flow = type(flow)(
+ source=source,
+ target=target,
+ id=flow.get_id(),
+ name=flow.get_name(),
+ process=new_process_id
+ )
+
+ for waypoint in flow.get_waypoints():
+ new_flow.add_waypoint((waypoint[0], waypoint[1] + y_offset))
+
+ main_bpmn.add_flow(new_flow)
+
+ return main_bpmn
+
+
+def print_bpmn_summary(bpmn, name):
+ print(f"\n{name}:")
+ print(f"Process ID: {bpmn.get_process_id()}")
+ print(f"Process Name: {bpmn.get_name()}")
+
+ participants = [n for n in bpmn.get_nodes() if isinstance(n, BPMN.Participant)]
+ print(f"Number of swimlanes: {len(participants)}")
+ print(f"Total nodes: {len(bpmn.get_nodes())}")
+ print(f"Total flows: {len(bpmn.get_flows())}")
+
+ for participant in participants:
+ print(f"\nSwimlane: {participant.get_name()} (Process: {participant.process_ref})")
+ print(f"Position: ({participant.get_x()}, {participant.get_y()})")
+ print(f"Size: {participant.get_width()}x{participant.get_height()}")
+ print("Nodes:")
+ nodes = [n for n in bpmn.get_nodes() if n.get_process() == participant.process_ref]
+ for node in nodes:
+ if not isinstance(node, BPMN.Participant):
+ print(f" - {node.get_name()} ({type(node).__name__}) at ({node.get_x()}, {node.get_y()})")
+ print("Flows:")
+ flows = [f for f in bpmn.get_flows() if f.get_process() == participant.process_ref]
+ for flow in flows:
+ print(f" - {flow.get_source().get_name()} -> {flow.get_target().get_name()}")
+
+ # Print message flows
+ message_flows = [f for f in bpmn.get_flows() if isinstance(f, BPMN.MessageFlow)]
+ if message_flows:
+ print("\nMessage Flows:")
+ for flow in message_flows:
+ print(f" - {flow.get_source().get_name()} -> {flow.get_target().get_name()}")
+
+
+def execute_script():
+ # Create the main BPMN with swimlanes
+ main_bpmn = create_manual_bpmn_with_swimlanes()
+
+ # Create a simple BPMN to merge
+ simple_bpmn: BPMN = BPMN(process_id="proc_simple_001", name="Simple Process")
+ s_start: BPMN.NormalStartEvent = BPMN.NormalStartEvent(name="Simple Start")
+ s_task: BPMN.Task = BPMN.Task(name="Simple Task")
+ s_end: BPMN.NormalEndEvent = BPMN.NormalEndEvent(name="Simple End")
+ simple_bpmn.add_node(s_start)
+ simple_bpmn.add_node(s_task)
+ simple_bpmn.add_node(s_end)
+ simple_bpmn.add_flow(BPMN.SequenceFlow(s_start, s_task))
+ simple_bpmn.add_flow(BPMN.SequenceFlow(s_task, s_end))
+
+ # Print original diagram
+ print_bpmn_summary(main_bpmn, "Original BPMN with Swimlanes")
+
+ pm4py.view_bpmn(main_bpmn, format="svg")
+ pm4py.view_bpmn(simple_bpmn, format="svg")
+
+ # Merge the simple BPMN
+ merged_bpmn = merge_bpmn_with_swimlanes(main_bpmn, simple_bpmn)
+
+ # Print the merged result
+ print_bpmn_summary(merged_bpmn, "Merged BPMN with Swimlanes")
+
+ pm4py.view_bpmn(merged_bpmn, format="svg")
+
+
+# Main execution
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/case_overlap_stat.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/case_overlap_stat.py
new file mode 100644
index 0000000000000000000000000000000000000000..233e6123db906848726dc187014e89b0e5153576
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/case_overlap_stat.py
@@ -0,0 +1,16 @@
+import pm4py
+import os
+from pm4py.statistics.overlap.cases.log import get as case_overlap_get
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ # calculates the WIP statistics from the event log object.
+ # The WIP statistic associates to each case the number of cases open during the lifecycle of the case
+ wip: list[int] = case_overlap_get.apply(log)
+ print(wip)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/concept_drift.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/concept_drift.py
new file mode 100644
index 0000000000000000000000000000000000000000..b08ccbc6e741cc8daa67d017de080c74c22dc7a4
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/concept_drift.py
@@ -0,0 +1,38 @@
+import os
+
+import pm4py
+from pm4py.algo.concept_drift import algorithm as concept_drift_detection
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(
+ os.path.join("..", "tests", "input_data", "receipt.xes")
+ )
+
+ # Bose's concept drift detection is solely based on the control-flow perspective
+ returned_sublogs: list[pandas.DataFrame]
+ change_timestamps: list[int]
+ p_values: list[float]
+ returned_sublogs, change_timestamps, p_values = (
+ concept_drift_detection.apply(
+ log, parameters={"max_no_change_points": 3}
+ )
+ )
+
+ # print the timestamps and the p-values of the detected change points
+ print(change_timestamps)
+ print(p_values)
+
+ # print each one of the returned sub-logs (that is a Pandas dataframe)
+ for sl in returned_sublogs:
+ print(sl)
+ dfg: dict
+ sa: dict
+ ea: dict
+ dfg, sa, ea = pm4py.discover_dfg(sl)
+ pm4py.view_dfg(dfg, sa, ea, format="svg")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/consecutive_act_case_grouping_filter.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/consecutive_act_case_grouping_filter.py
new file mode 100644
index 0000000000000000000000000000000000000000..e82e3f1ab66ba0d3593bc96a44ca7bcb7d18cc53
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/consecutive_act_case_grouping_filter.py
@@ -0,0 +1,14 @@
+import pm4py
+from pm4py.algo.filtering.pandas.consecutive_act_case_grouping import consecutive_act_case_grouping_filter
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+ print(dataframe)
+ filtered_dataframe: pandas.DataFrame = consecutive_act_case_grouping_filter.apply(dataframe)
+ print(filtered_dataframe)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/corr_mining.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/corr_mining.py
new file mode 100644
index 0000000000000000000000000000000000000000..ca399f14cd32d14531e3f645ea870f2eb4398b3b
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/corr_mining.py
@@ -0,0 +1,43 @@
+from pm4py.util import constants, pandas_utils
+
+from pm4py.algo.discovery.correlation_mining import algorithm as correlation_miner
+from pm4py.objects.log.util import dataframe_utils
+from pm4py.statistics.service_time.pandas import get as soj_time_get
+from pm4py.statistics.start_activities.pandas import get as sa_get
+from pm4py.statistics.end_activities.pandas import get as ea_get
+from examples import examples_conf
+import importlib.util
+import pandas
+
+
+def execute_script():
+ df: pandas.DataFrame = pandas_utils.read_csv("../tests/input_data/interval_event_log.csv")
+ df = dataframe_utils.convert_timestamp_columns_in_df(df, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT)
+ act_count = dict(df["concept:name"].value_counts())
+ parameters = {}
+ parameters[constants.PARAMETER_CONSTANT_START_TIMESTAMP_KEY] = "start_timestamp"
+ parameters[constants.PARAMETER_CONSTANT_TIMESTAMP_KEY] = "time:timestamp"
+ parameters["format"] = examples_conf.TARGET_IMG_FORMAT
+ start_activities: dict[str, int] = sa_get.get_start_activities(df, parameters=parameters)
+ end_activities: dict[str, int] = ea_get.get_end_activities(df, parameters=parameters)
+ parameters["start_activities"] = start_activities
+ parameters["end_activities"] = end_activities
+ soj_time: dict[str, float] = soj_time_get.apply(df, parameters=parameters)
+ dfg: dict[tuple[str, str], int]
+ performance_dfg: dict[tuple[str, str], float]
+ dfg, performance_dfg = correlation_miner.apply(df, variant=correlation_miner.Variants.CLASSIC,
+ parameters=parameters)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.dfg import visualizer as dfg_vis
+ gviz_freq = dfg_vis.apply(dfg, activities_count=act_count, serv_time=soj_time, variant=dfg_vis.Variants.FREQUENCY,
+ parameters=parameters)
+ dfg_vis.view(gviz_freq)
+ gviz_perf = dfg_vis.apply(performance_dfg, activities_count=act_count, serv_time=soj_time,
+ variant=dfg_vis.Variants.PERFORMANCE,
+ parameters=parameters)
+ dfg_vis.view(gviz_perf)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/cost_based_dfg.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/cost_based_dfg.py
new file mode 100644
index 0000000000000000000000000000000000000000..c73c8373ee77dde52f3b70ef5aad0148830702db
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/cost_based_dfg.py
@@ -0,0 +1,20 @@
+import pm4py
+import os
+from pm4py.algo.discovery.dfg.adapters.pandas import df_statistics
+from examples import examples_conf
+import importlib.util
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "roadtraffic100traces.xes"), return_legacy_log_object=False)
+ cost_based_dfg = df_statistics.get_dfg_graph(log, measure="cost", cost_attribute="amount")
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.dfg import visualizer as dfg_visualizer
+ gviz = dfg_visualizer.apply(cost_based_dfg, variant=dfg_visualizer.Variants.COST, parameters={"format": examples_conf.TARGET_IMG_FORMAT})
+ dfg_visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/cycle_time.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/cycle_time.py
new file mode 100644
index 0000000000000000000000000000000000000000..54f18db4560fe61b0174aacfd3c269883d6da4d7
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/cycle_time.py
@@ -0,0 +1,15 @@
+import os
+
+import pm4py
+from pm4py.statistics.traces.cycle_time.log import get as cycle_time_get
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "interval_event_log.xes"))
+ print(cycle_time_get.apply(log, parameters={cycle_time_get.Parameters.START_TIMESTAMP_KEY: "start_timestamp",
+ cycle_time_get.Parameters.TIMESTAMP_KEY: "time:timestamp"}))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/data_petri_nets.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/data_petri_nets.py
new file mode 100644
index 0000000000000000000000000000000000000000..49bb51395aa484b3d25d359e54d3a35cc33ae652
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/data_petri_nets.py
@@ -0,0 +1,52 @@
+import os
+
+import pm4py
+from pm4py.algo.conformance.alignments.petri_net import algorithm as alignments
+from pm4py.objects.petri_net.data_petri_nets import semantics
+from pm4py.objects.petri_net.data_petri_nets.data_marking import DataMarking
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from typing import Any
+
+
+def get_trans_by_name(net, name):
+ ret = [x for x in net.transitions if x.name == name]
+ if len(ret) == 0:
+ return None
+ return ret[0]
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "roadtraffic100traces.xes"))
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.read_pnml(os.path.join("..", "tests", "input_data", "data_petri_net.pnml"), auto_guess_final_marking=True)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+ aligned_traces: dict[str, Any] | list[dict[str, Any]] = alignments.apply(log, net, im, fm, variant=alignments.Variants.VERSION_DIJKSTRA_LESS_MEMORY, parameters={"ret_tuple_as_trans_desc": True})
+ for index, trace in enumerate(log):
+ aligned_trace: dict[str, Any] | list[dict[str, Any]] = aligned_traces[index]
+ al = [(x[0][0], get_trans_by_name(net, x[0][1])) for x in aligned_trace["alignment"]]
+ m: DataMarking = DataMarking(im)
+ idx: int = 0
+ for el in al:
+ if el[1] is not None:
+ en_t = semantics.enabled_transitions(net, m, trace[min(idx, len(trace) - 1)])
+ if el[1] in en_t:
+ if "guard" in el[1].properties:
+ print(el[1], "GUARD SATISFIED", el[1].properties["guard"], m)
+ m = semantics.execute(el[1], net, m, trace[min(idx, len(trace) - 1)])
+ else:
+ print("TRANSITION UNAVAILABLE! Guards are blocking")
+ if el[0] != ">>":
+ idx = idx + 1
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dataframe_prefix_and_fea_extraction.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dataframe_prefix_and_fea_extraction.py
new file mode 100644
index 0000000000000000000000000000000000000000..fa9aba1c7a4c3a255c7558845bb69b98c93432f1
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dataframe_prefix_and_fea_extraction.py
@@ -0,0 +1,24 @@
+from pm4py.objects.log.util import dataframe_utils
+from pm4py.util import pandas_utils, constants
+import pandas
+
+
+def execute_script():
+ # loads a dataframe. setup dates
+ df: pandas.DataFrame = pandas_utils.read_csv("../tests/input_data/receipt.csv")
+ df = dataframe_utils.convert_timestamp_columns_in_df(df, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT)
+ print(df)
+ # insert the case index in the dataframe
+ df = pandas_utils.insert_ev_in_tr_index(df, case_id="case:concept:name", column_name="@@index_in_trace")
+ # filter all the prefixes of length 5 from the dataframe
+ df = df[df["@@index_in_trace"] <= 5]
+ print(df)
+ # performs the automatic feature extraction
+ fea_df: pandas.DataFrame = dataframe_utils.automatic_feature_extraction_df(df)
+ print("\nfea_df =")
+ print(fea_df)
+ print(fea_df.columns)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dec_treplay_imdf.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dec_treplay_imdf.py
new file mode 100644
index 0000000000000000000000000000000000000000..c95c5a92778230ab4232f83025aa5b57c68a00de
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dec_treplay_imdf.py
@@ -0,0 +1,42 @@
+import os
+
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ # import the log
+ log_path: str = os.path.join("..", "tests", "input_data", "receipt.xes")
+ log: EventLog = xes_importer.apply(log_path)
+ # apply Inductive Miner
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ initial_marking: Marking
+ final_marking: Marking
+ net, initial_marking, final_marking = process_tree_converter.apply(process_tree)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as pn_vis
+ # get visualization
+ variant = pn_vis.Variants.PERFORMANCE
+ parameters_viz: dict[Any, str] = {pn_vis.Variants.PERFORMANCE.value.Parameters.AGGREGATION_MEASURE: "mean", pn_vis.Variants.PERFORMANCE.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT}
+ gviz = pn_vis.apply(net, initial_marking, final_marking, log=log, variant=variant,
+ parameters=parameters_viz)
+ pn_vis.view(gviz)
+ # do another visualization with frequency
+ variant = pn_vis.Variants.FREQUENCY
+ parameters_viz = {pn_vis.Variants.FREQUENCY.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT}
+ gviz = pn_vis.apply(net, initial_marking, final_marking, log=log, variant=variant,
+ parameters=parameters_viz)
+ pn_vis.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/decisiontree_align_example.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/decisiontree_align_example.py
new file mode 100644
index 0000000000000000000000000000000000000000..5ddf06347183b8bf8da5753e9784b6f754cdc8b8
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/decisiontree_align_example.py
@@ -0,0 +1,34 @@
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.algo.decision_mining import algorithm
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+from examples import examples_conf
+import os
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ # in this case, we obtain a decision tree by alignments on a specific decision point
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = process_tree_converter.apply(process_tree)
+
+ if importlib.util.find_spec("sklearn") and importlib.util.find_spec("graphviz"):
+ # we need to specify a decision point. In this case, the place p_10 is a suitable decision point
+ clf, feature_names, classes = algorithm.get_decision_tree(log, net, im, fm, decision_point="p_10")
+
+ # we can visualize the decision tree
+ from pm4py.visualization.decisiontree import visualizer as visualizer
+ gviz = visualizer.apply(clf, feature_names, classes,
+ parameters={visualizer.Variants.CLASSIC.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/decisiontree_trivial_example.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/decisiontree_trivial_example.py
new file mode 100644
index 0000000000000000000000000000000000000000..7ef8071e17076f1dfc7e343d2945124b2f3fc250
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/decisiontree_trivial_example.py
@@ -0,0 +1,47 @@
+import os
+
+from pm4py.util import ml_utils
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.log.util import get_class_representation
+from pm4py.algo.transformation.trace_encodings import algorithm as trace_encodings
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "roadtraffic50traces.xes")
+ # log_path = os.path.join("..", "tests", "input_data", "receipt.xes")
+ log: EventLog = xes_importer.apply(log_path)
+ # now, it is possible to get a default representation of an event log
+ feature_names: list[str]
+ data, feature_names = trace_encodings.apply(log, variant=trace_encodings.Variants.TRACE_BASED)
+ # gets classes representation by final concept:name value (end activity)
+ target, classes = get_class_representation.get_class_representation_by_str_ev_attr_value_value(log, "concept:name")
+
+ if importlib.util.find_spec("sklearn") and importlib.util.find_spec("graphviz"):
+ # mine the decision tree given 'data' and 'target'
+ clf = ml_utils.DecisionTreeClassifier(max_depth=7)
+ clf.fit(data, target)
+
+ # visualize the decision tree
+ from pm4py.visualization.decisiontree import visualizer as dt_vis
+ gviz = dt_vis.apply(clf, feature_names, classes, parameters={dt_vis.Variants.CLASSIC.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ dt_vis.view(gviz)
+
+ # gets classes representation by trace duration (threshold between the two classes = 200D)
+ target, classes = get_class_representation.get_class_representation_by_trace_duration(log, 2 * 8640000)
+
+ if importlib.util.find_spec("sklearn") and importlib.util.find_spec("graphviz"):
+ # mine the decision tree given 'data' and 'target'
+ clf = ml_utils.DecisionTreeClassifier(max_depth=7)
+ clf.fit(data, target)
+
+ # visualize the decision tree
+ from pm4py.visualization.decisiontree import visualizer as dt_vis
+ gviz = dt_vis.apply(clf, feature_names, classes, parameters={dt_vis.Variants.CLASSIC.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ dt_vis.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/declare_simple.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/declare_simple.py
new file mode 100644
index 0000000000000000000000000000000000000000..9e29a4362fccf199f3e236f822c8f105d21b172f
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/declare_simple.py
@@ -0,0 +1,26 @@
+import pm4py
+import pandas
+from typing import Any
+
+
+def execute_script():
+ """
+ Example script to discover a DECLARE model from an event log,
+ obtain its textual (LLM) abstraction, and perform conformance checking.
+ """
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+
+ declare_model: dict[str, dict[Any, dict[str, int]]] = pm4py.discover_declare(log)
+ print(declare_model)
+
+ # prints a textual abstraction of the declare model that can be provided to GPT
+ text_abstr: str = pm4py.llm.abstract_declare(declare_model)
+ print(text_abstr)
+
+ # provides conformance checking based on the DECLARE model
+ conf_result: list[dict[str, Any]] = pm4py.conformance_declare(log, declare_model, return_diagnostics_dataframe=True)
+ print(conf_result)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/df_to_log_postpro.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/df_to_log_postpro.py
new file mode 100644
index 0000000000000000000000000000000000000000..9153722db23efda409551b12ad463cadd96a8631
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/df_to_log_postpro.py
@@ -0,0 +1,20 @@
+import pm4py
+from pm4py.util import constants, pandas_utils
+from pm4py.objects.conversion.log import converter as log_converter
+import os
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "running-example.csv"))
+ dataframe = pm4py.format_dataframe(dataframe, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT)
+ log = log_converter.apply(dataframe, variant=log_converter.Variants.TO_EVENT_LOG, parameters={"stream_postprocessing": False})
+ pm4py.write_xes(log, "non_postprocessed.xes")
+ log = log_converter.apply(dataframe, variant=log_converter.Variants.TO_EVENT_LOG, parameters={"stream_postprocessing": True})
+ pm4py.write_xes(log, "postprocessed.xes")
+ os.remove("non_postprocessed.xes")
+ os.remove("postprocessed.xes")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_align_log.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_align_log.py
new file mode 100644
index 0000000000000000000000000000000000000000..bb70bf0e97584f9e7f548a06a7469c17e2a52292
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_align_log.py
@@ -0,0 +1,61 @@
+import os
+import time
+
+import pm4py
+from pm4py.algo.conformance.alignments.petri_net import algorithm as petri_alignments
+from pm4py.algo.filtering.dfg import dfg_filtering
+from pm4py.algo.conformance.alignments.dfg import algorithm as dfg_alignment
+from pm4py.statistics.attributes.log import get
+from pm4py.objects.petri_net.utils import align_utils
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from typing import Any
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ print("number of cases", len(log))
+ print("number of events", sum(len(x) for x in log))
+ print("number of variants", len(pm4py.get_variants_as_tuples(log)))
+ ac: dict[Any, int] = get.get_attribute_values(log, "concept:name")
+ dfg: dict
+ sa: dict
+ ea: dict
+ dfg, sa, ea = pm4py.discover_dfg(log)
+ perc: float = 0.5
+ dfg, sa, ea, ac = dfg_filtering.filter_dfg_on_activities_percentage(dfg, sa, ea, ac, perc)
+ dfg, sa, ea, ac = dfg_filtering.filter_dfg_on_paths_percentage(dfg, sa, ea, ac, perc)
+ aa: float = time.time()
+ aligned_traces: dict[str, Any] | list[dict[str, Any]] = dfg_alignment.apply(log, dfg, sa, ea)
+ bb: float = time.time()
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.convert_to_petri_net(dfg, sa, ea)
+ for trace in aligned_traces:
+ if trace["cost"] != trace["internal_cost"]:
+ print(trace)
+ pass
+ print(bb - aa)
+ print(sum(x["visited_states"] for x in aligned_traces))
+ print(sum(x["cost"] // align_utils.STD_MODEL_LOG_MOVE_COST for x in aligned_traces))
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.dfg import visualizer
+ gviz = visualizer.apply(dfg, activities_count=ac, parameters={"start_activities": sa, "end_activities": ea,
+ "format": examples_conf.TARGET_IMG_FORMAT})
+ visualizer.view(gviz)
+
+ cc: float = time.time()
+ aligned_traces2 = petri_alignments.apply(log, net, im, fm,
+ variant=petri_alignments.Variants.VERSION_DIJKSTRA_LESS_MEMORY)
+ dd: float = time.time()
+ print(dd - cc)
+ print(sum(x["visited_states"] for x in aligned_traces2))
+ print(sum(x["cost"] // align_utils.STD_MODEL_LOG_MOVE_COST for x in aligned_traces2))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_align_metrics.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_align_metrics.py
new file mode 100644
index 0000000000000000000000000000000000000000..1581f6e63b0760918436cfa9a78150d393e29a46
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_align_metrics.py
@@ -0,0 +1,47 @@
+import pm4py
+from pm4py.algo.conformance.alignments.dfg.variants import classic as dfg_alignments
+import pandas
+
+
+def execute_script():
+ """
+ Executes the DFG-based alignment conformance checking process.
+
+ The process involves the following steps:
+ 1. Read an event log from an XES file.
+ 2. Filter the event log to include only the top 5 variants.
+ 3. Discover the Directly-Follows Graph (DFG) along with its start and end activities.
+ 4. Compute the DFG-based alignments against the original event log, which projects the alignment results onto the DFG.
+ - The conformance-annotated DFG shows the number of SYNC (synchronous) and MM (model moves)
+ executions for each edge.
+ - The conformance-annotated activity dictionary shows the number of SYNC, MM, and LM (log moves)
+ executions for each activity.
+ 5. Print the resulting conformance-annotated DFG and activity dictionary.
+ """
+ # Read the event log from the XES file
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+
+ # Filter the event log to the top 5 variants and discover the DFG, along with start (sa) and end (ea) activities
+ dfg: dict
+ sa: dict
+ ea: dict
+ dfg, sa, ea = pm4py.discover_dfg(pm4py.filter_variants_top_k(log, 5))
+
+ # Compute the DFG-based alignments and project the results on the DFG.
+ # The function returns two items:
+ # - conformance_dfg: a dictionary where each edge is annotated with the count of SYNC and MM moves.
+ # - activities_conformance: a dictionary where each activity is annotated with the count of SYNC, MM, and LM moves.
+ conformance_dfg: dict[tuple[str, str], dict[str, int]]
+ activities_conformance: dict[str, dict[str, int]]
+ conformance_dfg, activities_conformance = dfg_alignments.project_alignments_on_dfg(log, dfg, sa, ea)
+
+ # Output the conformance-annotated DFG and activities to the console
+ print("Conformance DFG:")
+ print(conformance_dfg)
+ print("\nConformance Activities:")
+ print(activities_conformance)
+
+
+if __name__ == "__main__":
+ # Execute the script if the module is run as the main program.
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_filt_act_paths_perc.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_filt_act_paths_perc.py
new file mode 100644
index 0000000000000000000000000000000000000000..ea4a1d9d6d7e72a7fd54be66e85302b8d0aaa54f
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_filt_act_paths_perc.py
@@ -0,0 +1,24 @@
+import pm4py
+from examples import examples_conf
+import importlib.util
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+ dfg: dict
+ start_act: dict
+ end_act: dict
+ dfg, start_act, end_act = pm4py.discover_dfg(log)
+ # keep the specified amount of activities
+ dfg, start_act, end_act = pm4py.filter_dfg_activities_percentage(dfg, start_act, end_act, percentage=0.3)
+ # keep the specified amount of paths
+ dfg, start_act, end_act = pm4py.filter_dfg_paths_percentage(dfg, start_act, end_act, percentage=0.3)
+
+ if importlib.util.find_spec("graphviz"):
+ # view the DFG
+ pm4py.view_dfg(dfg, start_act, end_act, format="svg")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_min_ex_log.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_min_ex_log.py
new file mode 100644
index 0000000000000000000000000000000000000000..9423ff683ed9399cd0444c68fefcb534945afdbe
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_min_ex_log.py
@@ -0,0 +1,62 @@
+import os
+
+from pm4py.algo.discovery.dfg import algorithm as dfg_algorithm
+from pm4py.objects.conversion.dfg import converter as dfg_conv
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.statistics.end_activities.log import get as ea_get
+from pm4py.statistics.start_activities.log import get as sa_get
+from pm4py.statistics.service_time.log import get as soj_time_get
+from pm4py.statistics.concurrent_activities.log import get as conc_act_get
+from pm4py.statistics.eventually_follows.log import get as efg_get
+from pm4py.util import constants
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "interval_event_log.xes")
+ #log_path = os.path.join("..", "tests", "input_data", "reviewing.xes")
+ log: EventLog = xes_importer.apply(log_path)
+ parameters = {}
+ parameters[constants.PARAMETER_CONSTANT_START_TIMESTAMP_KEY] = "start_timestamp"
+ parameters[constants.PARAMETER_CONSTANT_TIMESTAMP_KEY] = "time:timestamp"
+ parameters[constants.PARAMETER_CONSTANT_ACTIVITY_KEY] = "concept:name"
+ parameters["strict"] = False
+ parameters["format"] = examples_conf.TARGET_IMG_FORMAT
+ start_activities: dict[str, int] = sa_get.get_start_activities(log, parameters=parameters)
+ end_activities: dict[str, int] = ea_get.get_end_activities(log, parameters=parameters)
+ parameters["start_activities"] = start_activities
+ parameters["end_activities"] = end_activities
+ soj_time: dict[str, float] = soj_time_get.apply(log, parameters=parameters)
+ print("soj_time")
+ print(soj_time)
+ conc_act: dict[tuple[str, str], int] = conc_act_get.apply(log, parameters=parameters)
+ print("conc_act")
+ print(conc_act)
+ efg: dict[tuple[str, str], int] = efg_get.apply(log, parameters=parameters)
+ print("efg")
+ print(efg)
+ dfg_freq: dict[tuple[str, str], float] = dfg_algorithm.apply(log, parameters=parameters, variant=dfg_algorithm.Variants.FREQUENCY)
+ dfg_perf: dict[tuple[str, str], float] = dfg_algorithm.apply(log, parameters=parameters, variant=dfg_algorithm.Variants.PERFORMANCE)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.dfg import visualizer as dfg_vis_fact
+ from pm4py.visualization.petri_net import visualizer as pn_vis
+ dfg_gv_freq = dfg_vis_fact.apply(dfg_freq, log=log, variant=dfg_vis_fact.Variants.FREQUENCY,
+ parameters=parameters)
+ dfg_vis_fact.view(dfg_gv_freq)
+ dfg_gv_perf = dfg_vis_fact.apply(dfg_perf, log=log, variant=dfg_vis_fact.Variants.PERFORMANCE,
+ parameters=parameters)
+ dfg_vis_fact.view(dfg_gv_perf)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = dfg_conv.apply(dfg_freq)
+ gviz = pn_vis.apply(net, im, fm, parameters=parameters)
+ pn_vis.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_min_ex_pandas.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_min_ex_pandas.py
new file mode 100644
index 0000000000000000000000000000000000000000..40134fbef2a042383e2a7cfc64280e5d0e57d950
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_min_ex_pandas.py
@@ -0,0 +1,67 @@
+import os
+
+import pm4py
+from pm4py.util import constants, pandas_utils
+from pm4py.algo.discovery.dfg.adapters.pandas import df_statistics
+from pm4py.objects.conversion.dfg import converter as dfg_conv
+from pm4py.statistics.attributes.pandas import get as att_get
+from pm4py.statistics.end_activities.pandas import get as ea_get
+from pm4py.statistics.service_time.pandas import get as soj_time_get
+from pm4py.statistics.concurrent_activities.pandas import get as conc_act_get
+from pm4py.statistics.eventually_follows.pandas import get as efg_get
+from pm4py.statistics.start_activities.pandas import get as sa_get
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from typing import Any
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "interval_event_log.csv")
+ dataframe: pandas.DataFrame = pandas_utils.read_csv(log_path)
+ log_path = os.path.join("..", "tests", "input_data", "reviewing.xes")
+ log: pandas.DataFrame = pm4py.read_xes(log_path)
+ dataframe = pm4py.convert_to_dataframe(log)
+ parameters = {}
+ #parameters[constants.PARAMETER_CONSTANT_START_TIMESTAMP_KEY] = "start_timestamp"
+ parameters[constants.PARAMETER_CONSTANT_TIMESTAMP_KEY] = "time:timestamp"
+ parameters[constants.PARAMETER_CONSTANT_ACTIVITY_KEY] = "concept:name"
+ parameters[constants.PARAMETER_CONSTANT_CASEID_KEY] = "case:concept:name"
+ parameters["strict"] = True
+ parameters["format"] = examples_conf.TARGET_IMG_FORMAT
+ start_activities: dict[str, int] = sa_get.get_start_activities(dataframe, parameters=parameters)
+ end_activities: dict[str, int] = ea_get.get_end_activities(dataframe, parameters=parameters)
+ att_count: dict[Any, int] = att_get.get_attribute_values(dataframe, "concept:name", parameters=parameters)
+ parameters["start_activities"] = start_activities
+ parameters["end_activities"] = end_activities
+ soj_time: dict[str, float] = soj_time_get.apply(dataframe, parameters=parameters)
+ print("soj_time")
+ print(soj_time)
+ conc_act: dict[tuple[str, str], int] = conc_act_get.apply(dataframe, parameters=parameters)
+ print("conc_act")
+ print(conc_act)
+ efg: dict[tuple[str, str], int] = efg_get.apply(dataframe, parameters=parameters)
+ print("efg")
+ print(efg)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.dfg import visualizer as dfg_vis_fact
+ from pm4py.visualization.petri_net import visualizer as pn_vis
+ dfg_freq, dfg_perf = df_statistics.get_dfg_graph(dataframe, measure="both", start_timestamp_key="start_timestamp")
+ dfg_gv_freq = dfg_vis_fact.apply(dfg_freq, activities_count=att_count, variant=dfg_vis_fact.Variants.FREQUENCY,
+ serv_time=soj_time, parameters=parameters)
+ dfg_vis_fact.view(dfg_gv_freq)
+ dfg_gv_perf = dfg_vis_fact.apply(dfg_perf, activities_count=att_count, variant=dfg_vis_fact.Variants.PERFORMANCE,
+ serv_time=soj_time, parameters=parameters)
+ dfg_vis_fact.view(dfg_gv_perf)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = dfg_conv.apply(dfg_freq)
+ gviz = pn_vis.apply(net, im, fm, parameters=parameters)
+ pn_vis.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_playout.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_playout.py
new file mode 100644
index 0000000000000000000000000000000000000000..38a1b78109f36f51eb430995958e62987b187470
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dfg_playout.py
@@ -0,0 +1,52 @@
+import pm4py
+from pm4py.algo.filtering.dfg import dfg_filtering
+from pm4py.algo.simulation.playout.dfg.variants import classic as dfg_playout
+from examples import examples_conf
+import importlib.util
+import os
+import pandas
+from pm4py.objects.log.obj import EventLog, Trace
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ activities: dict[str, int] = pm4py.get_event_attribute_values(log, "concept:name")
+ dfg: dict
+ sa: dict
+ ea: dict
+ dfg, sa, ea = pm4py.discover_dfg(log)
+ # filters the DFG to make a simpler one
+ perc: float = 0.5
+ dfg, sa, ea, activities = dfg_filtering.filter_dfg_on_activities_percentage(dfg, sa, ea, activities, perc)
+ dfg, sa, ea, activities = dfg_filtering.filter_dfg_on_paths_percentage(dfg, sa, ea, activities, perc)
+ # creates the simulated log
+ simulated_log: EventLog | dict[tuple[str, str], int] = dfg_playout.apply(dfg, sa, ea)
+ print(simulated_log)
+ print(len(simulated_log))
+ print(sum(x.attributes["probability"] for x in simulated_log))
+ # shows the two DFGs to show that they are identical
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_dfg(dfg, sa, ea, log=log, format=examples_conf.TARGET_IMG_FORMAT)
+ new_dfg: dict
+ new_sa: dict
+ new_ea: dict
+ new_dfg, new_sa, new_ea = pm4py.discover_dfg(simulated_log)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_dfg(new_dfg, new_sa, new_ea, log=simulated_log, format=examples_conf.TARGET_IMG_FORMAT)
+
+ for trace in simulated_log:
+ print(list(x["concept:name"] for x in trace))
+ print(trace.attributes["probability"], dfg_playout.get_trace_probability(trace, dfg, sa, ea))
+ break
+ dfg, sa, ea = pm4py.discover_dfg(log)
+ variants: dict[tuple[str], list[Trace]] | dict[tuple[str], int] = pm4py.get_variants_as_tuples(log)
+ sum_prob_log_variants: float = 0.0
+ for var in variants:
+ sum_prob_log_variants += dfg_playout.get_trace_probability(variants[var][0], dfg, sa, ea)
+ print("percentage of behavior allowed from DFG that is in the log (from 0.0 to 1.0): ", sum_prob_log_variants)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/diagn_add_dataframe.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/diagn_add_dataframe.py
new file mode 100644
index 0000000000000000000000000000000000000000..8a250e7a30b0963c10aa0a271457530fcbd8aa0b
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/diagn_add_dataframe.py
@@ -0,0 +1,26 @@
+import pm4py
+from pm4py.algo.discovery.log_skeleton import algorithm as log_skeleton_discovery
+from pm4py.algo.conformance.log_skeleton import algorithm as log_skeleton_conformance
+from pm4py.util import constants, pandas_utils
+import pandas
+from typing import Any
+
+
+def execute_script():
+ # loads a XES event log
+ event_log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+ # gets the dataframe out of the event log (through conversion)
+ dataframe: pandas.DataFrame = pm4py.convert_to_dataframe(event_log)
+ # discovers the log skeleton model
+ log_skeleton: dict[str, Any] = log_skeleton_discovery.apply(event_log, parameters={log_skeleton_discovery.Variants.CLASSIC.value.Parameters.NOISE_THRESHOLD: 0.03})
+ # apply conformance checking
+ conf_result: list[set[Any]] = log_skeleton_conformance.apply(event_log, log_skeleton)
+ # gets the diagnostic result out of the dataframe
+ diagnostics: pandas.DataFrame = log_skeleton_conformance.get_diagnostics_dataframe(event_log, conf_result)
+ # merges the dataframe containing the events, and the diagnostics dataframe
+ merged_df = pandas_utils.merge(dataframe, diagnostics, how="left", left_on="case:concept:name", right_on="case_id", suffixes=('', '_diagn'))
+ print(merged_df)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/discovery_data_petri_net.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/discovery_data_petri_net.py
new file mode 100644
index 0000000000000000000000000000000000000000..9149f3b6555843c40cbfbd69713216eae2319a39
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/discovery_data_petri_net.py
@@ -0,0 +1,24 @@
+import pm4py
+from pm4py.algo.decision_mining import algorithm as decision_mining
+from examples import examples_conf
+import os
+import importlib.util
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "roadtraffic100traces.xes")
+ log: pandas.DataFrame = pm4py.read_xes(log_path)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.discover_petri_net_inductive(log)
+ net, im, fm = decision_mining.create_data_petri_nets_with_decisions(log, net, im, fm)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dotted_chart.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dotted_chart.py
new file mode 100644
index 0000000000000000000000000000000000000000..c9125b46a524ab62ee6fcfd5349ee4aa77fdf3bc
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/dotted_chart.py
@@ -0,0 +1,22 @@
+import pm4py
+from examples import examples_conf
+import importlib.util
+import os
+import pandas
+
+
+def execute_script():
+ # reads a XES log
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ log = pm4py.format_dataframe(log)
+
+ if importlib.util.find_spec("graphviz"):
+ # generates the default dotted chart (timestamp on X-axis, case ID on Y-axis, activity as color)
+ pm4py.view_dotted_chart(log, format=examples_conf.TARGET_IMG_FORMAT)
+ # generates the dotted chart with the activity on the X-axis, the resource on the Y-axis, and the group
+ # as color
+ pm4py.view_dotted_chart(log, format=examples_conf.TARGET_IMG_FORMAT, attributes=["concept:name", "org:resource", "org:group"])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/embeddings_cases_sim.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/embeddings_cases_sim.py
new file mode 100644
index 0000000000000000000000000000000000000000..be76b178081c49f2c7096aa7582e55af9c06ff2d
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/embeddings_cases_sim.py
@@ -0,0 +1,59 @@
+"""
+Case-level transformer similarity example.
+
+This example uses CASES_TRANSFORMERS through keep_top_k_per_similarity. Each
+case is converted to a sentence and embedded with a sentence-transformers
+model. With the default activity perspective, a trace such as:
+
+ register, check ticket, decide
+
+becomes a sentence similar to:
+
+ "register check ticket decide"
+
+The query text, for example "paid cases", is embedded with the same model.
+PM4Py then keeps the cases whose trace embeddings have the highest cosine
+similarity to the query embedding.
+"""
+
+import importlib.util
+
+import pandas
+import pm4py
+from pm4py.algo.transformation.trace_encodings import algorithm as trace_encodings
+from pm4py.util import constants
+
+
+def execute_script():
+ # CASES_TRANSFORMERS depends on sentence-transformers. The example skips
+ # cleanly when the optional dependency is not installed.
+ if not importlib.util.find_spec("sentence_transformers"):
+ print("sentence-transformers is not installed; skipping case embeddings")
+ return
+
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+
+ # Use activity names as the words in each case sentence. The result keeps
+ # the two cases whose learned sentence embeddings are closest to "paid
+ # cases". This is semantic filtering, not exact string matching.
+ log_paid = trace_encodings.keep_top_k_per_similarity(
+ log,
+ "paid cases",
+ 2,
+ parameters={constants.PARAMETER_CONSTANT_ATTRIBUTE_KEY: "concept:name"},
+ )
+ print(log_paid)
+
+ # The same case embeddings can be compared with a different query. Here the
+ # retained cases are those most similar to "rejected cases".
+ log_rejected = trace_encodings.keep_top_k_per_similarity(
+ log,
+ "rejected cases",
+ 2,
+ parameters={constants.PARAMETER_CONSTANT_ATTRIBUTE_KEY: "concept:name"},
+ )
+ print(log_rejected)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/embeddings_events_sim.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/embeddings_events_sim.py
new file mode 100644
index 0000000000000000000000000000000000000000..18d581d64df7cc2df69793e230636aa5b7aac811
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/embeddings_events_sim.py
@@ -0,0 +1,63 @@
+"""
+Event-level transformer similarity example.
+
+This example uses EVENTS_TRANSFORMERS through keep_top_k_per_similarity. Each
+event is converted to a short sentence and embedded with a sentence-transformers
+model. With the default activity perspective, an event such as:
+
+ {"concept:name": "pay compensation"}
+
+becomes the sentence:
+
+ "pay compensation"
+
+The query text is embedded with the same model, and PM4Py keeps the events
+whose embeddings are closest to the query embedding. With keep_cases=True, it
+keeps the full cases that contain those top events.
+"""
+
+import importlib.util
+
+import pandas
+import pm4py
+from pm4py.algo.transformation.trace_encodings import algorithm as trace_encodings
+
+
+def execute_script():
+ # EVENTS_TRANSFORMERS depends on sentence-transformers. The example skips
+ # cleanly when the optional dependency is not installed.
+ if not importlib.util.find_spec("sentence_transformers"):
+ print("sentence-transformers is not installed; skipping event embeddings")
+ return
+
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+ log = pm4py.format_dataframe(log)
+
+ # Event filtering mode:
+ # keep only the top three individual events whose embeddings are closest to
+ # the text query "pay compensation". The output dataframe can contain only a
+ # subset of events from a case.
+ filt_log_1 = trace_encodings.keep_top_k_per_similarity(
+ log,
+ "pay compensation",
+ k=3,
+ variant=trace_encodings.Variants.EVENTS_TRANSFORMERS,
+ )
+ print(filt_log_1)
+
+ # Case filtering mode:
+ # first find the top three matching events, then keep the complete cases
+ # containing those events. This is useful when the event match is a signal
+ # for selecting whole traces.
+ filt_log_2 = trace_encodings.keep_top_k_per_similarity(
+ log,
+ "pay compensation",
+ k=3,
+ variant=trace_encodings.Variants.EVENTS_TRANSFORMERS,
+ parameters={"keep_cases": True},
+ )
+ print(filt_log_2)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/emd_evaluation.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/emd_evaluation.py
new file mode 100644
index 0000000000000000000000000000000000000000..6a2a0831b57da7ad49d5a8c36ba08d84e8e38f87
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/emd_evaluation.py
@@ -0,0 +1,77 @@
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.discovery.alpha import algorithm as alpha_miner
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.algo.evaluation.earth_mover_distance import algorithm as earth_mover_distance
+from pm4py.statistics.variants.log import get as variants_get
+from pm4py.algo.simulation.playout.petri_net import algorithm
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+import os
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ M: dict[tuple[str, str, str, str], float] = {("a", "b", "d", "e"): 0.49, ("a", "d", "b", "e"): 0.49, ("a", "c", "d", "e"): 0.01, ("a", "d", "c", "e"): 0.01}
+
+ L1 = {("a", "b", "d", "e"): 0.49, ("a", "d", "b", "e"): 0.49, ("a", "c", "d", "e"): 0.01,
+ ("a", "d", "c", "e"): 0.01}
+ # the distance between M and L1, that we expect to be zero, is zero according to the EMD
+ emd: float = earth_mover_distance.apply(M, L1)
+ print("M L1 emd distance:", emd)
+
+ L2 = {("a", "b", "e"): 0.5, ("a", "b", "d", "e"): 0.245, ("a", "d", "b", "e"): 0.245, ("a", "c", "d", "e"): 0.005,
+ ("a", "d", "c", "e"): 0.005}
+ # the distance between M and L2 according to the EMD is 0.1275 (paper value 0.125)
+ emd = earth_mover_distance.apply(M, L2)
+ print("M L2 emd distance:", emd)
+
+ L3 = {("a", "b", "d", "e"): 0.489, ("a", "d", "b", "e"): 0.489, ("a", "c", "d", "e"): 0.01,
+ ("a", "d", "c", "e"): 0.01, ("a", "b", "e"): 0.002}
+ # the distance between M and L3 according to the EMD is 0.0005 (paper value 0.0005), perfect!
+ emd = earth_mover_distance.apply(M, L3)
+ print("M L3 emd distance:", emd)
+
+ L4: dict[tuple[str, str, str, str], float] = {("a", "b", "d", "e"): 0.5, ("a", "d", "b", "e"): 0.5}
+ # the distance between M and L4 according to the EMD is 0.005 (paper value 0.005), perfect!
+ emd = earth_mover_distance.apply(M, L4)
+ print("M L4 emd distance:", emd)
+
+ L5: dict[tuple[str, str, str, str], float] = {("a", "c", "d", "e"): 0.5, ("a", "d", "c", "e"): 0.5}
+ # the distance between M and L5 according to the EMD is 0.245 (paper value 0.245), perfect!
+ emd = earth_mover_distance.apply(M, L5)
+ print("M L5 emd distance:", emd)
+
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ lang_log: dict[list[str], float] | dict[str, float] = variants_get.get_language(log)
+ net0: PetriNet
+ im0: Marking
+ fm0: Marking
+ net0, im0, fm0 = alpha_miner.apply(log)
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net1: PetriNet
+ im1: Marking
+ fm1: Marking
+ net1, im1, fm1 = process_tree_converter.apply(process_tree)
+ lang_model0 = variants_get.get_language(
+ algorithm.apply(net0, im0, fm0, variant=algorithm.Variants.STOCHASTIC_PLAYOUT,
+ parameters={algorithm.Variants.STOCHASTIC_PLAYOUT.value.Parameters.LOG: log}))
+ lang_model1 = variants_get.get_language(
+ algorithm.apply(net1, im1, fm1, variant=algorithm.Variants.STOCHASTIC_PLAYOUT,
+ parameters={algorithm.Variants.STOCHASTIC_PLAYOUT.value.Parameters.LOG: log}))
+ emd = earth_mover_distance.apply(lang_model0, lang_log)
+ print("running-example alpha emd distance: ", emd)
+ emd = earth_mover_distance.apply(lang_model1, lang_log)
+ print("running-example inductive emd distance: ", emd)
+
+ #log = xes_importer.apply(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ #net, im, fm = inductive_miner.apply(log)
+ #lang_model = variants_get.get_language(simulator.apply(net, im, fm, variant=simulator.Variants.STOCHASTIC_PLAYOUT,
+ # parameters={
+ # simulator.Variants.STOCHASTIC_PLAYOUT.value.Parameters.LOG: log}))
+ #emd = earth_mover_distance.apply(lang_model, lang_log)
+ #print("receipt inductive emd distance: ", emd)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/enrich_log_with_align.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/enrich_log_with_align.py
new file mode 100644
index 0000000000000000000000000000000000000000..a11a87732dcb5cd1c79673e658bc2e889f410867
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/enrich_log_with_align.py
@@ -0,0 +1,25 @@
+import pm4py
+import os
+from pm4py.algo.conformance.alignments.petri_net import algorithm as alignments
+from pm4py.algo.conformance.alignments.petri_net.utils import log_enrichment
+from pm4py.objects.log.importer.xes import importer as xes_importer
+import pandas
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from typing import Any
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ filtered_log: EventLog | pandas.DataFrame = pm4py.filter_variants_top_k(log, 1)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.discover_petri_net_inductive(filtered_log)
+ aligned_traces: dict[str, Any] | list[dict[str, Any]] = alignments.apply(log, net, im, fm, parameters={"ret_tuple_as_trans_desc": True})
+ enriched_log: EventLog = log_enrichment.apply(log, aligned_traces)
+ print(enriched_log)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ev_to_obj_types_graph.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ev_to_obj_types_graph.py
new file mode 100644
index 0000000000000000000000000000000000000000..4e28d29cd0d9b0982e6c95f4d25fea6c0827e703
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ev_to_obj_types_graph.py
@@ -0,0 +1,17 @@
+import pm4py
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel('../tests/input_data/ocel/example_log.jsonocel')
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.ocel.eve_to_obj_types import visualizer
+ gviz = visualizer.apply(ocel, parameters={"format": examples_conf.TARGET_IMG_FORMAT, "annotate_frequency": True})
+ visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/events_distribution.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/events_distribution.py
new file mode 100644
index 0000000000000000000000000000000000000000..bb0dccfdfbfe3f197e4ce4bec4ededcb99bc3912
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/events_distribution.py
@@ -0,0 +1,77 @@
+import os
+
+from pm4py.util import constants, pandas_utils
+from pm4py.objects.log.util import dataframe_utils
+from pm4py.statistics.attributes.pandas import get as attr_get
+from examples import examples_conf
+import importlib.util
+import pandas
+
+
+def execute_script():
+ df: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "receipt.csv"))
+ df = dataframe_utils.convert_timestamp_columns_in_df(df, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["time:timestamp"])
+
+ # plots the distribution of the events over the days of a month
+ x0: list[str]
+ y0: list[int]
+ x0, y0 = attr_get.get_events_distribution(df, distr_type="days_month")
+
+ if importlib.util.find_spec("graphviz") and importlib.util.find_spec("matplotlib"):
+ from pm4py.visualization.graphs import visualizer
+ gviz = visualizer.apply(x0, y0, variant=visualizer.Variants.BARPLOT,
+ parameters={"format": examples_conf.TARGET_IMG_FORMAT, "title": "Distribution of the Events over the Days of a Month",
+ "x_axis": "Day of month", "y_axis": "Number of Events"})
+ visualizer.view(gviz)
+
+ # plots the distribution of the events over the months
+ x1: list[str]
+ y1: list[int]
+ x1, y1 = attr_get.get_events_distribution(df, distr_type="months")
+
+ if importlib.util.find_spec("graphviz") and importlib.util.find_spec("matplotlib"):
+ from pm4py.visualization.graphs import visualizer
+ gviz = visualizer.apply(x1, y1, variant=visualizer.Variants.BARPLOT,
+ parameters={"format": examples_conf.TARGET_IMG_FORMAT, "title": "Distribution of the Events over the Months",
+ "x_axis": "Month", "y_axis": "Number of Events"})
+ visualizer.view(gviz)
+
+ # plots the distribution of the events over the years
+ x2: list[str]
+ y2: list[int]
+ x2, y2 = attr_get.get_events_distribution(df, distr_type="years")
+
+ if importlib.util.find_spec("graphviz") and importlib.util.find_spec("matplotlib"):
+ from pm4py.visualization.graphs import visualizer
+ gviz = visualizer.apply(x2, y2, variant=visualizer.Variants.BARPLOT,
+ parameters={"format": examples_conf.TARGET_IMG_FORMAT, "title": "Distribution of the Events over the Years",
+ "x_axis": "Year", "y_axis": "Number of Events"})
+ visualizer.view(gviz)
+
+ # plots the distribution of the events over the hours (of the day)
+ x3: list[str]
+ y3: list[int]
+ x3, y3 = attr_get.get_events_distribution(df, distr_type="hours")
+
+ if importlib.util.find_spec("graphviz") and importlib.util.find_spec("matplotlib"):
+ from pm4py.visualization.graphs import visualizer
+ gviz = visualizer.apply(x3, y3, variant=visualizer.Variants.BARPLOT,
+ parameters={"format": examples_conf.TARGET_IMG_FORMAT, "title": "Distribution of the Events over the Hours",
+ "x_axis": "Hour (of day)", "y_axis": "Number of Events"})
+ visualizer.view(gviz)
+
+ # plots the distribution of the events over the days of the week
+ x4: list[str]
+ y4: list[int]
+ x4, y4 = attr_get.get_events_distribution(df, distr_type="days_week")
+
+ if importlib.util.find_spec("graphviz") and importlib.util.find_spec("matplotlib"):
+ from pm4py.visualization.graphs import visualizer
+ gviz = visualizer.apply(x4, y4, variant=visualizer.Variants.BARPLOT,
+ parameters={"format": examples_conf.TARGET_IMG_FORMAT, "title": "Distribution of the Events over the Days of a Week",
+ "x_axis": "Day of the Week", "y_axis": "Number of Events"})
+ visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/example_check_fitness.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/example_check_fitness.py
new file mode 100644
index 0000000000000000000000000000000000000000..3f9318a8b7e36f323e9863198c5fa29a664a4d30
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/example_check_fitness.py
@@ -0,0 +1,32 @@
+import time
+
+import pm4py
+from pm4py.objects.log.util import filtering_utils
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/compressed_input_data/02_teleclaims.xes.gz")
+ tree: ProcessTree = pm4py.discover_process_tree_inductive(log, noise_threshold=0.3)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.convert_to_petri_net(tree)
+ # reduce the log to one trace per variant
+ log = filtering_utils.keep_one_trace_per_variant(log)
+ for index, trace in enumerate(log):
+ print(index)
+ aa: float = time.time()
+ check_tree: bool = pm4py.check_is_fitting(trace, tree)
+ bb: float = time.time()
+ check_petri: bool = pm4py.check_is_fitting(trace, net, im, fm)
+ cc: float = time.time()
+ print("check on tree: ", check_tree, "time", bb - aa)
+ print("check on Petri net: ", check_petri, "time", cc - bb)
+ print()
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/examples_conf.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/examples_conf.py
new file mode 100644
index 0000000000000000000000000000000000000000..85c78f27dc6f79d22468b293f06793f247d5d7ff
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/examples_conf.py
@@ -0,0 +1 @@
+TARGET_IMG_FORMAT: str = "svg"
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/execute_everything.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/execute_everything.py
new file mode 100644
index 0000000000000000000000000000000000000000..762f2928ccac5334a70ddf978ee120d123737288
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/execute_everything.py
@@ -0,0 +1,1281 @@
+import inspect
+import os
+import sys
+import traceback
+import importlib.util
+import argparse
+
+
+
+EXECUTE_EXAMPLES: bool = True
+PRINT_FAILURE_TRACES: bool = True
+
+class OutcomeMeasurement:
+ SUCCESS: int = 0
+ FAILED: int = 0
+ FAILURE_TRACES = []
+
+
+def polars_process_cubes():
+ from examples import polars_process_cubes
+ print("\n\npolars_process_cubes")
+ polars_process_cubes.execute_script()
+
+
+def inductive_miner_dfg_lc():
+ from examples import inductive_miner_dfg_lc
+ print("\n\ninductive_miner_dfg_lc")
+ inductive_miner_dfg_lc.execute_script()
+
+
+def bpmn_js_visualization():
+ from examples import bpmn_js_visualization
+ print("\n\nbpmn_js_visualization")
+ bpmn_js_visualization.execute_script()
+
+
+def log_projection_dfg_variant():
+ from examples import log_projection_dfg_variant
+ print("\n\nlog_projection_dfg_variant")
+ log_projection_dfg_variant.execute_script()
+
+
+def streaming_live_to_static_stream():
+ from examples import streaming_live_to_static_stream
+ print("\n\nstreaming_live_to_static_stream")
+ streaming_live_to_static_stream.execute_script()
+
+
+def declare_simple():
+ from examples import declare_simple
+ print("\n\ndeclare_simple")
+ declare_simple.execute_script()
+
+
+def variants_paths_duration():
+ from examples import variants_paths_duration
+ print("\n\nvariants_paths_duration")
+ variants_paths_duration.execute_script()
+
+
+def ev_to_obj_types_graph():
+ from examples import ev_to_obj_types_graph
+ print("\n\nev_to_obj_types_graph")
+ ev_to_obj_types_graph.execute_script()
+
+
+def label_splitting():
+ from examples import label_splitting
+ print("\n\nlabel_splitting")
+ label_splitting.execute_script()
+
+
+def nx_ocel_to_graphviz():
+ from examples import nx_ocel_to_graphviz
+ print("\n\nnx_ocel_to_graphviz")
+ nx_ocel_to_graphviz.execute_script()
+
+
+def nx_traditional_to_graphviz():
+ from examples import nx_traditional_to_graphviz
+ print("\n\nnx_traditional_to_graphviz")
+ nx_traditional_to_graphviz.execute_script()
+
+
+def segments_retrieval_filtering():
+ from examples import segments_retrieval_filtering
+ print("\n\nsegments_retrieval_filtering")
+ segments_retrieval_filtering.execute_script()
+
+
+def feature_extraction_case_loc():
+ from examples import feature_extraction_case_loc
+ print("\n\nfeature_extraction_case_loc")
+ feature_extraction_case_loc.execute_script()
+
+
+def powl_discovery():
+ from examples import powl_discovery
+ print("\n\npowl_discovery")
+ powl_discovery.execute_script()
+
+
+def powl_parsing():
+ from examples import powl_parsing
+ print("\n\npowl_parsing")
+ powl_parsing.execute_script()
+
+def log_skeleton_manual_constraints():
+ from examples import log_skeleton_manual_constraints
+ print("\n\nlog_skeleton_manual_constraints")
+ log_skeleton_manual_constraints.execute_script()
+
+
+def stochastic_petri_playout():
+ from examples import stochastic_petri_playout
+ print("\n\nstochastic_petri_playout")
+ stochastic_petri_playout.execute_script()
+
+
+def trace_attrib_hierarch_cluster():
+ from examples import trace_attrib_hierarch_cluster
+ print("\n\ntrace_attrib_hierarch_cluster")
+ trace_attrib_hierarch_cluster.execute_script()
+
+
+def activities_to_alphabet():
+ from examples import activities_to_alphabet
+ print("\n\nactivities_to_alphabet")
+ activities_to_alphabet.execute_script()
+
+
+def ocel_filter_cc():
+ from examples import ocel_filter_cc
+ print("\n\nocel_filter_cc")
+ ocel_filter_cc.execute_script()
+
+
+def queue_check_exponential():
+ from examples import queue_check_exponential
+ print("\n\nqueue_check_exponential")
+ queue_check_exponential.execute_script()
+
+
+def queue_check_max_conc_exec():
+ from examples import queue_check_max_conc_exec
+ print("\n\nqueue_check_max_conc_exec")
+ queue_check_max_conc_exec.execute_script()
+
+
+def timestamp_granularity():
+ from examples import timestamp_granularity
+ print("\n\ntimestamp_granularity")
+ timestamp_granularity.execute_script()
+
+
+def ocel_occm_example():
+ from examples import ocel_occm_example
+ print("\n\nocel_occm_example")
+ ocel_occm_example.execute_script()
+
+
+def ocel_clustering():
+ from examples import ocel_clustering
+ print("\n\nocel_clustering")
+ ocel_clustering.execute_script()
+
+
+def ocel_enrichment():
+ from examples import ocel_enrichment
+ print("\n\nocel_enrichment")
+ ocel_enrichment.execute_script()
+
+
+def ocel_olap_operations():
+ from examples import ocel_olap_operations
+ print("\n\nocel_olap_operations")
+ ocel_olap_operations.execute_script()
+
+
+def validation_ocel20_xml():
+ from examples import validation_ocel20_xml
+ print("\n\nvalidation_ocel20_xml")
+ validation_ocel20_xml.execute_script()
+
+
+def consecutive_act_case_grouping_filter():
+ from examples import consecutive_act_case_grouping_filter
+ print("\n\nconsecutive_act_case_grouping_filter")
+ consecutive_act_case_grouping_filter.execute_script()
+
+
+def cost_based_dfg():
+ from examples import cost_based_dfg
+ print("\n\ncost_based_dfg")
+ cost_based_dfg.execute_script()
+
+
+def bpmn_merging():
+ from examples import bpmn_merging
+ print("\n\nbpmn_merging")
+ bpmn_merging.execute_script()
+
+
+def label_replacement():
+ from examples import label_replacement
+ print("\n\nlabel_replacement")
+ label_replacement.execute_script()
+
+
+def model_to_model_sim():
+ from examples import model_to_model_sim
+ print("\n\nmodel_to_model_sim")
+ model_to_model_sim.execute_script()
+
+
+def monte_carlo_example():
+ from examples import monte_carlo_example
+ print("\n\nmonte_carlo_example")
+ monte_carlo_example.execute_script()
+
+
+def df_to_log_postpro():
+ from examples import df_to_log_postpro
+ print("\n\ndf_to_log_postpro")
+ df_to_log_postpro.execute_script()
+
+
+def hybrid_ilp_miner():
+ from examples import hybrid_ilp_miner
+ print("\n\nhybrid_ilp_miner")
+ hybrid_ilp_miner.execute_script()
+
+
+def ml_insert_case_arrival_finish():
+ from examples import ml_insert_case_arrival_finish
+ print("\n\nml_insert_case_arrival_finish")
+ ml_insert_case_arrival_finish.execute_script()
+
+
+def ml_insert_waiting_service_time():
+ from examples import ml_insert_waiting_service_time
+ print("\n\nml_insert_waiting_service_time")
+ ml_insert_waiting_service_time.execute_script()
+
+
+def ml_log_to_target_vector():
+ from examples import ml_log_to_target_vectory
+ print("\n\nml_log_to_target_vector")
+ ml_log_to_target_vectory.execute_script()
+
+
+def ml_outcome_enriched():
+ from examples import ml_outcome_enriched
+ print("\n\nml_outcome_enriched")
+ ml_outcome_enriched.execute_script()
+
+
+def ocel20_import_export():
+ from examples import ocel20_import_export
+ print("\n\nocel20_import_export")
+ ocel20_import_export.execute_script()
+
+
+def revised_playout():
+ from examples import revised_playout
+ print("\n\nrevised_playout")
+ revised_playout.execute_script()
+
+
+def timestamp_case_grouping_filter():
+ from examples import timestamp_case_grouping_filter
+ print("\n\ntimestamp_case_grouping_filter")
+ timestamp_case_grouping_filter.execute_script()
+
+
+def trace_clustering():
+ from examples import trace_clustering
+ print("\n\ntrace_clustering")
+ trace_clustering.execute_script()
+
+
+def validation_ocel20_relational():
+ from examples import validation_ocel20_relational
+ print("\n\nvalidation_ocel20_relation")
+ validation_ocel20_relational.execute_script()
+
+
+def all_optimal_alignments():
+ from examples import all_optimal_alignments
+ print("\n\nall_optimal_alignments")
+ all_optimal_alignments.execute_script()
+
+
+def inductive_miner():
+ from examples import inductive_miner
+ print("\n\ninductive_miner")
+ inductive_miner.execute_script()
+
+
+def inductive_miner_dfg():
+ from examples import inductive_miner_dfg
+ print("\n\ninductive_miner_dfg")
+ inductive_miner_dfg.execute_script()
+
+
+def inductive_miner_variants():
+ from examples import inductive_miner_variants
+ print("\n\ninductive_miner_variants")
+ inductive_miner_variants.execute_script()
+
+
+def heu_miner_plus_plus():
+ from examples import heuminer_plusplus
+ print("\n\nheuminer_plusplus")
+ heuminer_plusplus.execute_script()
+
+
+def interval_events_overlap():
+ from examples import interval_events_overlap
+ print("\n\ninterval_events_overlap")
+ interval_events_overlap.execute_script()
+
+
+def kneighb_regression():
+ from examples import kneighb_regression
+ print("\n\nkneighb_regression")
+ kneighb_regression.execute_script()
+
+
+def log_to_int_tree_open_paths():
+ from examples import log_to_int_tree_open_paths
+ print("\n\nlog_to_int_tree_open_paths")
+ log_to_int_tree_open_paths.execute_script()
+
+
+def concept_drift():
+ from examples import concept_drift
+ print("\n\nconcept_drift")
+ concept_drift.execute_script()
+
+
+def dfg_align_metrics():
+ from examples import dfg_align_metrics
+ print("\n\ndfg_align_metrics")
+ dfg_align_metrics.execute_script()
+
+
+def process_cubes():
+ from examples import process_cubes
+ print("\n\nprocess_cubes")
+ process_cubes.execute_script()
+
+
+def variants_duration_vis():
+ from examples import variants_duration_vis
+ print("\n\nvariants_duration_vis")
+ variants_duration_vis.execute_script()
+
+
+def murata_reduction():
+ from examples import murata_reduction
+ print("\n\nmurata_reduction")
+ murata_reduction.execute_script()
+
+
+def ocel_merge_duplicates():
+ from examples import ocel_merge_duplicates
+ print("\n\nocel_merge_duplicates")
+ ocel_merge_duplicates.execute_script()
+
+
+def ocel_saw_net_disc():
+ from examples import ocel_saw_net_disc
+ print("\n\nocel_saw_net_disc")
+ ocel_saw_net_disc.execute_script()
+
+
+def ocel_to_nx():
+ from examples import ocel_to_nx
+ print("\n\nocel_to_nx")
+ ocel_to_nx.execute_script()
+
+
+def saw_net_ocel_multi():
+ from examples import saw_net_ocel_multi
+ print("\n\nsaw_net_ocel_multi")
+ saw_net_ocel_multi.execute_script()
+
+
+def saw_net_ocel_single():
+ from examples import saw_net_ocel_single
+ print("\n\nsaw_net_ocel_single")
+ saw_net_ocel_single.execute_script()
+
+
+def temporal_features():
+ from examples import temporal_features
+ print("\n\ntemporal_features")
+ temporal_features.execute_script()
+
+
+def transform_db_to_ocel():
+ from examples import transform_db_to_ocel
+ print("\n\ntransform_db_to_ocel")
+ transform_db_to_ocel.execute_script()
+
+
+def transform_db_to_ocel_2():
+ from examples import transform_db_to_ocel_2
+ print("\n\ntransform_db_to_ocel_2")
+ transform_db_to_ocel_2.execute_script()
+
+
+def transform_db_to_xes():
+ from examples import transform_db_to_xes
+ print("\n\ntransform_db_to_xes")
+ transform_db_to_xes.execute_script()
+
+
+def trie():
+ from examples import trie
+ print("\n\ntrie")
+ trie.execute_script()
+
+
+def feature_extraction_ocel():
+ from examples import feature_extraction_ocel
+ print("\n\nfeature_extraction_ocel")
+ feature_extraction_ocel.execute_script()
+
+
+def ocel_validation():
+ from examples import ocel_validation
+ print("\n\nocel_validation")
+ ocel_validation.execute_script()
+
+
+def process_tree_frequency_annotation():
+ from examples import process_tree_frequency_annotation
+ print("\n\nprocess_tree_frequency_annotation")
+ process_tree_frequency_annotation.execute_script()
+
+
+def tree_manual_generation():
+ from examples import tree_manual_generation
+ print("\n\ntree_manual_generation")
+ tree_manual_generation.execute_script()
+
+
+def workalendar_example():
+ from examples import workalendar_example
+ print("\n\nworkalendar_example")
+ workalendar_example.execute_script()
+
+
+def merging_case_relations():
+ from examples import merging_case_relations
+ print("\n\nmerging_case_relations")
+ merging_case_relations.execute_script()
+
+
+def activity_position():
+ from examples import activity_position
+ print("\n\nactivity_position")
+ activity_position.execute_script()
+
+
+def link_analysis_vbfa():
+ from examples import link_analysis_vbfa
+ print("\n\nlink_analysis_vbfa")
+ link_analysis_vbfa.execute_script()
+
+
+def ocel_streaming():
+ from examples import ocel_streaming
+ print("\n\nocel_streaming")
+ ocel_streaming.execute_script()
+
+
+def petri_manual_generation():
+ from examples import petri_manual_generation
+ print("\n\npetri_manual_generation")
+ petri_manual_generation.execute_script()
+
+
+def timestamp_interleavings():
+ from examples import timestamp_interleavings
+ print("\n\ntimestamp_interleavings")
+ timestamp_interleavings.execute_script()
+
+
+def object_centric_petri_net_discovery():
+ from examples import object_centric_petri_net_discovery
+ print("\n\nobject_centric_petri_net_discovery")
+ object_centric_petri_net_discovery.execute_script()
+
+
+def trans_system_stochastic_view():
+ from examples import trans_system_stochastic_vis
+ print("\n\ntrans_system_stochastic_view")
+ trans_system_stochastic_vis.execute_script()
+
+
+def network_analysis():
+ from examples import network_analysis
+ print("\n\nnetwork_analysis")
+ network_analysis.execute_script()
+
+
+def read_write_ocel():
+ from examples import read_write_ocel
+ print("\n\nread_write_ocel")
+ read_write_ocel.execute_script()
+
+
+def ocdfg_discovery():
+ from examples import ocdfg_discovery
+ print("\n\nocdfg_discovery")
+ ocdfg_discovery.execute_script()
+
+
+def enrich_log_with_align():
+ from examples import enrich_log_with_align
+ print("\n\nenrich_log_with_align")
+ enrich_log_with_align.execute_script()
+
+
+def extended_marking_equation():
+ from examples import extended_marking_equation
+ print("\n\nextended_marking_equation")
+ extended_marking_equation.execute_script()
+
+
+def features_locally_linear_embedding():
+ from examples import features_locally_linear_embedding
+ print("\n\nfeatures_locally_linear_embedding")
+ features_locally_linear_embedding.execute_script()
+
+
+def discovery_data_petri_net():
+ from examples import discovery_data_petri_net
+ print("\n\ndiscovery_data_petri_net")
+ discovery_data_petri_net.execute_script()
+
+
+def performance_dfg_simulation():
+ from examples import performance_dfg_simulation
+ print("\n\nperformance_dfg_simulation")
+ performance_dfg_simulation.execute_script()
+
+
+def data_petri_nets():
+ from examples import data_petri_nets
+ print("\n\ndata_petri_nets")
+ data_petri_nets.execute_script()
+
+
+def inhibitor_reset_arcs():
+ from examples import inhibitor_reset_arcs
+ print("\n\ninhibitor_reset_arcs")
+ inhibitor_reset_arcs.execute_script()
+
+
+def batch_detection():
+ from examples import batch_detection
+ print("\n\nbatch_detection")
+ batch_detection.execute_script()
+
+
+def case_overlap_stat():
+ from examples import case_overlap_stat
+ print("\n\ncase_overlap_stat")
+ case_overlap_stat.execute_script()
+
+
+def cycle_time():
+ from examples import cycle_time
+ print("\n\ncycle_time")
+ cycle_time.execute_script()
+
+
+def rework():
+ from examples import rework
+ print("\n\nrework")
+ rework.execute_script()
+
+
+def events_distribution():
+ from examples import events_distribution
+ print("\n\nevents_distribution")
+ events_distribution.execute_script()
+
+
+def dotted_chart():
+ from examples import dotted_chart
+ print("\n\ndotted_chart")
+ dotted_chart.execute_script()
+
+
+def performance_spectrum():
+ from examples import perf_spectrum_visualization
+ print("\n\nperformance_spectrum")
+ perf_spectrum_visualization.execute_script()
+
+
+def woflan():
+ from examples import woflan
+ print("\n\nwoflan")
+ woflan.execute_script()
+
+
+def bpmn_from_pt():
+ from examples import bpmn_from_pt_conversion
+ print("\n\nbpmn_from_pt_conversion")
+ bpmn_from_pt_conversion.execute_script()
+
+
+def bpmn_import_and_to_petri_net():
+ from examples import bpmn_import_and_to_petri_net
+ print("\n\nbpmn_import_and_to_petri_net")
+ bpmn_import_and_to_petri_net.execute_script()
+
+
+def tree_playout():
+ from examples import tree_playout
+ print("\n\ntree_playout")
+ tree_playout.execute_script()
+
+
+def emd_evaluation():
+ from examples import emd_evaluation
+ print("\n\nemd_evaluation")
+ emd_evaluation.execute_script()
+
+
+def footprints_tree_conf():
+ from examples import footprints_tree_conf
+ print("\n\nfootprints_tree_conf")
+ footprints_tree_conf.execute_script()
+
+
+def simplified_interface():
+ from examples import simplified_interface
+ print("\n\nsimplified_interface")
+ simplified_interface.execute_script()
+
+
+def footprints_petri_net():
+ from examples import footprints_petri_net
+ print("\n\nfootprints_petri_net")
+ footprints_petri_net.execute_script()
+
+
+def corr_mining():
+ from examples import corr_mining
+ print("\n\ncorr_mining")
+ corr_mining.execute_script()
+
+
+def log_skeleton():
+ from examples import log_skeleton
+ print("\n\nlog_skeleton")
+ log_skeleton.execute_script()
+
+
+def roles_detection():
+ from examples import roles_detection
+ print("\n\nroles_detection")
+ roles_detection.execute_script()
+
+
+def alignment_test():
+ from examples import alignment_test
+ print("\n\nalignment_test")
+ alignment_test.execute_script()
+
+
+def dec_treplay_imdf():
+ from examples import dec_treplay_imdf
+ print("\n\ndec_treplay_imdf")
+ dec_treplay_imdf.execute_script()
+
+
+def logs_petri_visual_comparison():
+ from examples import logs_petri_visual_comparison
+ print("\n\nlogs_petri_visual_comparison")
+ logs_petri_visual_comparison.execute_script()
+
+
+def imdf_example():
+ from examples import im_example
+ print("\n\nimdf_example")
+ im_example.execute_script()
+
+
+def test_evaluation():
+ from examples import test_evaluation
+ print("\n\ntestEvaluation")
+ test_evaluation.execute_script()
+
+
+def sna_log():
+ from examples import sna_log
+ print("\n\nsna_log")
+ sna_log.execute_script()
+
+
+def token_replay_alpha():
+ from examples import token_replay_alpha
+ print("\n\ntokenReplay_alpha")
+ token_replay_alpha.execute_script()
+
+
+def manual_log_generation():
+ from examples import manual_log_generation
+ print("\n\nmanual_log_generation")
+ manual_log_generation.execute_script()
+
+
+def token_replay_imdf():
+ from examples import token_replay_imdf
+ print("\n\ntokenReplay_imdf")
+ token_replay_imdf.execute_script()
+
+
+def decisiontree_trivial_example():
+ from examples import decisiontree_trivial_example
+ print("\n\ndecisiontree_trivial_example")
+ decisiontree_trivial_example.execute_script()
+
+
+def decisiontree_align_example():
+ from examples import decisiontree_align_example
+ print("\n\ndecisiontree_align_example")
+ decisiontree_align_example.execute_script()
+
+
+def align_decomposition_example():
+ from examples import align_decomposition_example
+ print("\n\nalign_decomposition_example")
+ align_decomposition_example.execute_script()
+
+
+def transition_system_test():
+ from examples import transition_system_test
+ print("\n\ntransition_system_test")
+ transition_system_test.execute_script()
+
+
+def heu_miner_test():
+ from examples import heu_miner_test
+ print("\n\nheu_miner_test")
+ heu_miner_test.execute_script()
+
+
+def dfg_min_ex_log():
+ from examples import dfg_min_ex_log
+ print("\n\ndfg_min_ex_log")
+ dfg_min_ex_log.execute_script()
+
+
+def dfg_min_ex_pandas():
+ from examples import dfg_min_ex_pandas
+ print("\n\ndfg_min_ex_pandas")
+ dfg_min_ex_pandas.execute_script()
+
+
+def dfg_filt_act_paths_perc():
+ from examples import dfg_filt_act_paths_perc
+ print("\n\ndfg_filt_act_paths_perc")
+ dfg_filt_act_paths_perc.execute_script()
+
+
+def graphs_visualization():
+ from examples import graphs_visualization
+ print("\n\ngraphs_visualization")
+ graphs_visualization.execute_script()
+
+
+def backwards_token_replay():
+ from examples import backwards_token_replay
+ print("\n\nbackwards_token_replay")
+ backwards_token_replay.execute_script()
+
+
+def transient_dfg():
+ from examples import transient_dfg
+ print("\n\ntransient_dfg")
+ transient_dfg.execute_script()
+
+
+def transient_petri_net():
+ from examples import transient_petri_net
+ print("\n\ntransient_petri_net")
+ transient_petri_net.execute_script()
+
+
+def monte_carlo_dfg():
+ from examples import montecarlo_dfg
+ print("\n\nmontecarlo_dfg")
+ montecarlo_dfg.execute_script()
+
+
+def monte_carlo_petri_net():
+ from examples import montecarlo_petri_net
+ print("\n\nmontecarlo_petri_net")
+ montecarlo_petri_net.execute_script()
+
+
+def visualization_processtree():
+ from examples import visualization_processtree
+ print("\n\nvisualization_processtree")
+ visualization_processtree.execute_script()
+
+
+def diagn_add_dataframe():
+ from examples import diagn_add_dataframe
+ print("\n\ndiagn_add_dataframe")
+ diagn_add_dataframe.execute_script()
+
+
+def pn_to_pt():
+ from examples import pn_to_pt
+ print("\n\npn_to_pt")
+ pn_to_pt.execute_script()
+
+
+def visualization_align_table():
+ from examples import visualization_align_table
+ print("\n\nvisualization_align_table")
+ visualization_align_table.execute_script()
+
+
+def align_approx_pt():
+ from examples import align_approx_pt
+ print("\n\nalign_approx_pt")
+ align_approx_pt.execute_script()
+
+
+def streaming_conformance_footprints():
+ from examples import streaming_conformance_footprints
+ print("\n\nstreaming_conformance_footprints")
+ streaming_conformance_footprints.execute_script()
+
+
+def streaming_conformance_tbr():
+ from examples import streaming_conformance_tbr
+ print("\n\nstreaming_conformance_tbr")
+ streaming_conformance_tbr.execute_script()
+
+
+def streaming_conformance_temporal_profile():
+ from examples import streaming_conformance_temporal_profile
+ print("\n\nstreaming_conformance_temporal_profile")
+ streaming_conformance_temporal_profile.execute_script()
+
+
+def streaming_csv_reader_event_stream():
+ from examples import streaming_csv_reader_event_stream
+ print("\n\nstreaming_csv_reader_event_stream")
+ streaming_csv_reader_event_stream.execute_script()
+
+
+def streaming_discovery_dfg():
+ from examples import streaming_discovery_dfg
+ print("\n\nstreaming_discovery_dfg")
+ streaming_discovery_dfg.execute_script()
+
+
+def streaming_xes_reader_event_stream():
+ from examples import streaming_xes_reader_event_stream
+ print("\n\nstreaming_xes_reader_event_stream")
+ streaming_xes_reader_event_stream.execute_script()
+
+
+def streaming_xes_reader_trace_stream():
+ from examples import streaming_xes_reader_trace_stream
+ print("\n\nstreaming_xes_reader_trace_stream")
+ streaming_xes_reader_trace_stream.execute_script()
+
+
+def example_check_fitness():
+ from examples import example_check_fitness
+ print("\n\nexample_check_fitness")
+ example_check_fitness.execute_script()
+
+
+def dfg_align_log():
+ from examples import dfg_align_log
+ print("\n\ndfg_align_log")
+ dfg_align_log.execute_script()
+
+
+def dfg_playout():
+ from examples import dfg_playout
+ print("\n\ndfg_playout")
+ dfg_playout.execute_script()
+
+
+def temporal_profile_log():
+ from examples import temporal_profile_log
+ print("\n\ntemporal_profile_log")
+ temporal_profile_log.execute_script()
+
+
+def temporal_profile_dataframe():
+ from examples import temporal_profile_dataframe
+ print("\n\ntemporal_profile_dataframe")
+ temporal_profile_dataframe.execute_script()
+
+
+def dataframe_prefix_and_fea_extraction():
+ from examples import dataframe_prefix_and_fea_extraction
+ print("\n\ndataframe_prefix_and_fea_extraction")
+ dataframe_prefix_and_fea_extraction.execute_script()
+
+
+def logs_alignments():
+ from examples import logs_alignment
+ print("\n\nlogs_alignment")
+ logs_alignment.execute_script()
+
+
+def orgmining_local_diagn():
+ from examples import orgmining_local_diagn
+ print("\n\norgmining_local_diagn")
+ orgmining_local_diagn.execute_script()
+
+
+def resource_profiles_log():
+ from examples import resource_profiles_log
+ print("\n\nresource_profiles_log")
+ resource_profiles_log.execute_script()
+
+
+def resource_profile_pandas():
+ from examples import resource_profiles_pandas
+ print("\n\nresource_profile_pandas")
+ resource_profiles_pandas.execute_script()
+
+
+def local_process_models():
+ from examples import local_process_models
+ print("\n\nlocal_process_models")
+ local_process_models.execute_script()
+
+def process_tree_reduction():
+ from examples import process_tree_reduction
+ print("\n\nprocess_tree_reduction")
+ process_tree_reduction.execute_script()
+
+
+def log_to_fit_precise_pn():
+ from examples import log_to_fit_precise_pn
+ print("\n\nlog_to_fit_precise_pn")
+ log_to_fit_precise_pn.execute_script()
+
+
+def streaming_declare():
+ from examples import streaming_declare
+ print("\n\nstreaming_declare")
+ streaming_declare.execute_script()
+
+def alignment_discounted_a_star():
+ from examples import alignment_discounted_a_star
+ print("\n\nalignment_discounted_a_star")
+ alignment_discounted_a_star.execute_script()
+
+def antialignments_and_precision():
+ from examples import antialignments_and_precision
+ print("\n\nantialignments_and_precision")
+ antialignments_and_precision.execute_script()
+
+def multialignments():
+ from examples import multialignments
+ print("\n\nmultialignments")
+ multialignments.execute_script()
+
+def timeline_dfg():
+ from examples import timeline_dfg
+ print("\n\ntimeline_dfg")
+ timeline_dfg.execute_script()
+
+def genetic_miner():
+ from examples import genetic_miner
+ print("\n\ngenetic_miner")
+ genetic_miner.execute_script()
+
+def obj_centr_conf_check():
+ from examples import obj_centr_conf_check
+ print("\n\nobj_centr_conf_check")
+ obj_centr_conf_check.execute_script()
+
+
+def ocpn_manual_construction():
+ from examples import ocpn_manual_construction
+ print("\n\nocpn_manual_construction")
+ ocpn_manual_construction.execute_script()
+
+
+def execute_script(f):
+ try:
+ f()
+ OutcomeMeasurement.SUCCESS += 1
+ except ImportError:
+ import time
+ trace: str = traceback.format_exc()
+ print(trace)
+ OutcomeMeasurement.FAILED += 1
+ OutcomeMeasurement.FAILURE_TRACES.append(trace)
+ time.sleep(3)
+ except KeyError:
+ import time
+ trace = traceback.format_exc()
+ print(trace)
+ OutcomeMeasurement.FAILED += 1
+ OutcomeMeasurement.FAILURE_TRACES.append(trace)
+ time.sleep(3)
+ except:
+ trace = traceback.format_exc()
+ print(trace)
+ OutcomeMeasurement.FAILED += 1
+ OutcomeMeasurement.FAILURE_TRACES.append(trace)
+ input("\npress INPUT if you want to continue")
+
+
+def print_versions():
+ import pm4py
+ import numpy
+ import pandas
+ import networkx
+
+ print("numpy version: "+str(numpy.__version__))
+ print("pandas version: "+str(pandas.__version__))
+ print("networkx version: "+str(networkx.__version__))
+
+ if importlib.util.find_spec("scipy"):
+ import scipy
+ print("scipy version: "+str(scipy.__version__))
+
+ if importlib.util.find_spec("lxml"):
+ import lxml
+ print("lxml version: "+str(lxml.__version__))
+
+ if importlib.util.find_spec("matplotlib"):
+ import matplotlib
+ print("matplotlib version: "+str(matplotlib.__version__))
+
+ if importlib.util.find_spec("sklearn"):
+ import sklearn
+ print("sklearn version: "+str(sklearn.__version__))
+
+ print("pm4py version: "+str(pm4py.__version__))
+ print("Python version: "+str(sys.version))
+ print(pm4py.util.lp.solver.DEFAULT_LP_SOLVER_VARIANT)
+ print(pm4py.util.pandas_utils.DATAFRAME)
+
+
+def parse_args():
+ parser = argparse.ArgumentParser(
+ prog='Example Tests',
+ description='Runs example tests')
+
+ # some libraries can not be installed in the pipeline, so some tests are disabled in pipelines
+ parser.add_argument('-p', '--pipeline',
+ action='store_true')
+
+ args = parser.parse_args()
+ return args.pipeline
+
+def main():
+ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))))
+
+ in_pipeline = parse_args()
+
+ import pm4py
+ import numpy
+ import pandas
+ import networkx
+
+ pm4py.util.constants.SHOW_PROGRESS_BAR = True
+ pm4py.util.constants.SHOW_EVENT_LOG_DEPRECATION = False
+ pm4py.util.constants.SHOW_INTERNAL_WARNINGS = False
+ #pm4py.util.constants.DEFAULT_TIMESTAMP_PARSE_FORMAT = None
+
+ print_versions()
+
+ skipped: int = 0
+
+ if EXECUTE_EXAMPLES:
+ if importlib.util.find_spec("polars"):
+ execute_script(polars_process_cubes)
+ execute_script(alignment_discounted_a_star)
+ execute_script(antialignments_and_precision)
+ execute_script(multialignments)
+ execute_script(timeline_dfg)
+ execute_script(genetic_miner)
+ execute_script(obj_centr_conf_check)
+ execute_script(ocpn_manual_construction)
+ execute_script(log_to_fit_precise_pn)
+ execute_script(inductive_miner_dfg_lc)
+ execute_script(log_projection_dfg_variant)
+ execute_script(streaming_live_to_static_stream)
+ execute_script(powl_discovery)
+ execute_script(powl_parsing)
+ execute_script(ev_to_obj_types_graph)
+ execute_script(label_splitting)
+ execute_script(nx_ocel_to_graphviz)
+ execute_script(nx_traditional_to_graphviz)
+ execute_script(segments_retrieval_filtering)
+ execute_script(stochastic_petri_playout)
+ execute_script(simplified_interface)
+ execute_script(bpmn_js_visualization)
+ execute_script(read_write_ocel)
+ if not in_pipeline:
+ execute_script(discovery_data_petri_net)
+ else:
+ skipped += 1
+ execute_script(data_petri_nets)
+ execute_script(inhibitor_reset_arcs)
+ execute_script(logs_petri_visual_comparison)
+ execute_script(align_decomposition_example)
+ execute_script(ocdfg_discovery)
+ execute_script(woflan)
+ execute_script(inductive_miner)
+ execute_script(inductive_miner_dfg)
+ execute_script(inductive_miner_variants)
+ execute_script(heu_miner_plus_plus)
+ execute_script(activities_to_alphabet)
+ execute_script(ocel_filter_cc)
+ execute_script(queue_check_exponential)
+ execute_script(queue_check_max_conc_exec)
+ execute_script(timestamp_granularity)
+ execute_script(ocel_occm_example)
+ execute_script(ocel_clustering)
+ execute_script(ocel_enrichment)
+ execute_script(ocel_olap_operations)
+ execute_script(validation_ocel20_xml)
+ execute_script(consecutive_act_case_grouping_filter)
+ execute_script(cost_based_dfg)
+ execute_script(df_to_log_postpro)
+ execute_script(hybrid_ilp_miner)
+ execute_script(ml_insert_case_arrival_finish)
+ execute_script(ml_insert_waiting_service_time)
+ execute_script(ml_log_to_target_vector)
+ execute_script(ml_outcome_enriched)
+ execute_script(ocel20_import_export)
+ execute_script(revised_playout)
+ execute_script(timestamp_case_grouping_filter)
+ if not in_pipeline:
+ execute_script(trace_clustering)
+ else:
+ skipped += 1
+ execute_script(validation_ocel20_relational)
+ execute_script(interval_events_overlap)
+ if not in_pipeline:
+ execute_script(kneighb_regression)
+ else:
+ skipped += 1
+ execute_script(log_to_int_tree_open_paths)
+ execute_script(concept_drift)
+ execute_script(dfg_align_metrics)
+ execute_script(process_cubes)
+ execute_script(variants_duration_vis)
+ execute_script(murata_reduction)
+ execute_script(ocel_merge_duplicates)
+ execute_script(ocel_saw_net_disc)
+ execute_script(ocel_to_nx)
+ execute_script(saw_net_ocel_multi)
+ execute_script(saw_net_ocel_single)
+ execute_script(temporal_features)
+ execute_script(transform_db_to_ocel)
+ execute_script(transform_db_to_xes)
+ #execute_script(transform_db_to_ocel_2)
+ execute_script(feature_extraction_ocel)
+ execute_script(ocel_validation)
+ execute_script(process_tree_frequency_annotation)
+ execute_script(tree_manual_generation)
+ if not in_pipeline:
+ execute_script(workalendar_example)
+ else:
+ skipped += 1
+ execute_script(merging_case_relations)
+ execute_script(activity_position)
+ execute_script(link_analysis_vbfa)
+ execute_script(ocel_streaming)
+ execute_script(petri_manual_generation)
+ execute_script(timestamp_interleavings)
+ execute_script(object_centric_petri_net_discovery)
+ execute_script(trans_system_stochastic_view)
+ execute_script(network_analysis)
+ execute_script(enrich_log_with_align)
+ execute_script(extended_marking_equation)
+ execute_script(features_locally_linear_embedding)
+ execute_script(dotted_chart)
+ execute_script(performance_spectrum)
+ execute_script(orgmining_local_diagn)
+ execute_script(resource_profiles_log)
+ execute_script(resource_profile_pandas)
+ execute_script(process_tree_reduction)
+ execute_script(dataframe_prefix_and_fea_extraction)
+ execute_script(logs_alignments)
+ execute_script(bpmn_from_pt)
+ execute_script(bpmn_import_and_to_petri_net)
+ execute_script(tree_playout)
+ #execute_script(emd_evaluation)
+ execute_script(footprints_tree_conf)
+ execute_script(footprints_petri_net)
+ execute_script(corr_mining)
+ execute_script(log_skeleton)
+ execute_script(roles_detection)
+ execute_script(alignment_test)
+ execute_script(dec_treplay_imdf)
+ execute_script(imdf_example)
+ execute_script(test_evaluation)
+ execute_script(sna_log)
+ execute_script(token_replay_alpha)
+ execute_script(manual_log_generation)
+ execute_script(token_replay_imdf)
+ execute_script(decisiontree_trivial_example)
+ #execute_script(decisiontree_align_example)
+ execute_script(transition_system_test)
+ execute_script(heu_miner_test)
+ execute_script(dfg_min_ex_log)
+ execute_script(dfg_min_ex_pandas)
+ execute_script(graphs_visualization)
+ execute_script(backwards_token_replay)
+ execute_script(transient_dfg)
+ execute_script(transient_petri_net)
+ execute_script(example_check_fitness)
+ execute_script(pn_to_pt)
+ execute_script(align_approx_pt)
+ execute_script(visualization_processtree)
+ execute_script(visualization_align_table)
+ execute_script(declare_simple)
+ execute_script(variants_paths_duration)
+ execute_script(feature_extraction_case_loc)
+ execute_script(log_skeleton_manual_constraints)
+ execute_script(trace_attrib_hierarch_cluster)
+ execute_script(streaming_declare)
+ execute_script(streaming_conformance_footprints)
+ execute_script(streaming_conformance_tbr)
+ execute_script(streaming_csv_reader_event_stream)
+ execute_script(streaming_discovery_dfg)
+ execute_script(streaming_xes_reader_event_stream)
+ execute_script(streaming_xes_reader_trace_stream)
+ execute_script(monte_carlo_dfg)
+ execute_script(monte_carlo_petri_net)
+ execute_script(local_process_models)
+
+ print_versions()
+
+ print("\n\nExamples executed correctly: %d\tExamples failed: %d\t" % (OutcomeMeasurement.SUCCESS, OutcomeMeasurement.FAILED))
+
+ print(f"Skipped {skipped} examples.")
+
+ # Compute the total and pass ratio
+ total_runs = OutcomeMeasurement.SUCCESS + OutcomeMeasurement.FAILED
+ if total_runs > 0:
+ pass_ratio = OutcomeMeasurement.SUCCESS / total_runs
+ else:
+ pass_ratio: float = 0.0
+
+ if PRINT_FAILURE_TRACES:
+ for i, trace in enumerate(OutcomeMeasurement.FAILURE_TRACES):
+ print(f"Failure {i}:")
+ print(trace)
+
+ print(f"Overall pass ratio: {round(pass_ratio * 100, 2)}%")
+
+ # If pass ratio is above 90%, exit code is 0; otherwise 1
+ if pass_ratio == 1:
+ #print("exiting with code 0")
+ sys.exit(0)
+ else:
+ #print("exiting with code 1")
+ sys.exit(1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/extended_marking_equation.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/extended_marking_equation.py
new file mode 100644
index 0000000000000000000000000000000000000000..800d5eae46e5127d1de706b3fa7353189dd2a0c9
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/extended_marking_equation.py
@@ -0,0 +1,47 @@
+import pm4py
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.algo.analysis.marking_equation import algorithm as marking_equation
+from pm4py.algo.analysis.extended_marking_equation import algorithm as extended_marking_equation
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+import os
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = process_tree_converter.apply(process_tree)
+ idx: int = 0
+ # try to resolve the marking equation to find an heuristics and possible a vector of transitions
+ # leading from im to fm
+ sync_net: PetriNet
+ sync_im: Marking
+ sync_fm: Marking
+ sync_net, sync_im, sync_fm = pm4py.construct_synchronous_product_net(log[idx], net, im, fm)
+ me_solver = marking_equation.build(sync_net, sync_im, sync_fm)
+ h, x = me_solver.solve()
+ firing_sequence, reach_fm1, explained_events = me_solver.get_firing_sequence(x)
+ print("for trace at index "+str(idx)+": marking equation h = ", h)
+ print("x vector reaches fm = ", reach_fm1)
+ print("firing sequence = ", firing_sequence)
+ # it fails and the value of heuristics is low
+ #
+ # now let's try with extended marking equation to find the heuristics and the vector!
+ eme_solver = extended_marking_equation.build(log[idx], sync_net, sync_im, sync_fm)
+ h, x = eme_solver.solve()
+ # the heuristics is much better
+ firing_sequence, reach_fm2, explained_events = eme_solver.get_firing_sequence(x)
+ print("for trace at index "+str(idx)+": extended marking equation h = ", h)
+ print("x vector reaches fm = ", reach_fm2)
+ print("firing sequence = ", firing_sequence)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/feature_extraction.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/feature_extraction.py
new file mode 100644
index 0000000000000000000000000000000000000000..bcc735ae2ec7b9b85f290f7b5e31f3e568a13f54
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/feature_extraction.py
@@ -0,0 +1,63 @@
+"""
+Basic trace and event feature extraction example.
+
+This example shows the two older structured encodings that are still exposed
+through the trace_encodings API.
+
+TRACE_BASED creates one fixed-size vector per trace. From an event-log point of
+view, the whole case is summarized as a single row: activity occurrences,
+selected trace attributes, selected event attributes, and optional engineered
+features can all become columns.
+
+EVENT_BASED keeps the event sequence shape. Each trace becomes a sequence of
+event vectors, padded to the maximum trace length in the log. This is useful
+when downstream code needs one vector per event rather than one summary vector
+per case.
+"""
+
+import os
+
+import pandas
+import pm4py
+from pm4py.algo.transformation.trace_encodings import algorithm as trace_encodings
+
+
+def execute_script():
+ # Load a compact XES log used throughout PM4Py examples/tests.
+ log: pandas.DataFrame = pm4py.read_xes(
+ os.path.join("..", "tests", "input_data", "running-example.xes")
+ )
+
+ # TRACE_BASED returns a matrix-like object:
+ # rows -> traces/cases
+ # columns -> extracted trace-level features
+ #
+ # Example intuition: if a trace contains activity "decide", then a column
+ # representing that activity can be set for the whole trace.
+ feature_names: list[str]
+ data, feature_names = trace_encodings.apply(
+ log, variant=trace_encodings.Variants.TRACE_BASED
+ )
+ print("trace-based data")
+ print(data)
+ print("trace-based feature names")
+ print(feature_names)
+
+ # EVENT_BASED returns a three-dimensional structure:
+ # first dimension -> traces/cases
+ # second dimension -> event positions inside each trace
+ # third dimension -> event-level features
+ #
+ # Example intuition: a trace A, B becomes two event vectors, one for A and
+ # one for B. Shorter traces are padded so the tensor has a stable shape.
+ data, feature_names = trace_encodings.apply(
+ log, variant=trace_encodings.Variants.EVENT_BASED
+ )
+ print("event-based data")
+ print(data)
+ print("event-based feature names")
+ print(feature_names)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/feature_extraction_case_loc.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/feature_extraction_case_loc.py
new file mode 100644
index 0000000000000000000000000000000000000000..398e3f99d97871cbe1ccfac74026fafb6f131607
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/feature_extraction_case_loc.py
@@ -0,0 +1,17 @@
+import pm4py
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+ fea_df: pandas.DataFrame = pm4py.extract_features_dataframe(log, include_case_id=True)
+ # sets the case ID as index for the dataframe, so a row for a specific case
+ # can be retrieved
+ fea_df = fea_df.set_index("case:concept:name")
+ # identifies the features for the case with identifier "case-10017"
+ features_per_case = fea_df.loc["case-10017"].to_dict()
+ print(features_per_case)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/feature_extraction_ocel.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/feature_extraction_ocel.py
new file mode 100644
index 0000000000000000000000000000000000000000..15cb33029a575d3f41942afb3ab77bd08893d2bb
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/feature_extraction_ocel.py
@@ -0,0 +1,21 @@
+import os
+import pm4py
+from pm4py.algo.transformation.ocel.features.events import algorithm as events_feature_extraction
+from pm4py.util import pandas_utils, constants
+import pandas
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel(os.path.join("..", "tests", "input_data", "ocel", "example_log.jsonocel"))
+ # extracts some features on the objects and embed them in a Pandas dataframe
+ objects_features_df: pandas.DataFrame = pm4py.extract_ocel_features(ocel, "element")
+ print(objects_features_df)
+ # extracts some features on the events and embed them in a Pandas dataframe
+ data_events, feature_names_events = events_feature_extraction.apply(ocel)
+ events_features_df: pandas.DataFrame = pandas_utils.instantiate_dataframe(data_events, columns=feature_names_events)
+ print(events_features_df)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/features_locally_linear_embedding.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/features_locally_linear_embedding.py
new file mode 100644
index 0000000000000000000000000000000000000000..5b714606002f1c712f56571a02988e556f2faf66
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/features_locally_linear_embedding.py
@@ -0,0 +1,30 @@
+import os
+
+import pm4py
+from pm4py.algo.transformation.trace_encodings.util import locally_linear_embedding
+from examples import examples_conf
+import importlib.util
+import numpy
+import pandas
+from datetime import datetime
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+
+ if importlib.util.find_spec("scipy") and importlib.util.find_spec("sklearn"):
+ # calculates the graph:
+ # values of y more distant from 0 signal executions that differ from the mainstream behavior
+ x: list[datetime]
+ y: numpy.ndarray
+ x, y = locally_linear_embedding.apply(log)
+
+ if importlib.util.find_spec("matplotlib") and importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.graphs import visualizer
+ gviz = visualizer.apply(x, y, variant=visualizer.Variants.DATES,
+ parameters={"title": "Locally Linear Embedding", "format": examples_conf.TARGET_IMG_FORMAT, "y_axis": "Intensity"})
+ visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/footprints_petri_net.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/footprints_petri_net.py
new file mode 100644
index 0000000000000000000000000000000000000000..b3458b36d125aef699e883c2b3252e02e6293487
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/footprints_petri_net.py
@@ -0,0 +1,59 @@
+from pm4py.objects.log.importer.xes import importer
+from pm4py.algo.filtering.log.variants import variants_filter
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.objects.conversion.process_tree import converter
+from pm4py.algo.discovery.footprints import algorithm as footprints_discovery
+from pm4py.algo.conformance.footprints import algorithm as footprints_conformance
+import os
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+
+def execute_script():
+ # import a log
+ log: EventLog = importer.apply(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ # found a filtered version of the log that is used to discover a process model
+ filtered_log = variants_filter.filter_log_variants_percentage(log, 0.2)
+ # discover a process tree using inductive miner
+ tree: ProcessTree = inductive_miner.apply(filtered_log)
+ print(tree)
+ # apply the conversion of a process tree into a Petri net
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = converter.apply(tree)
+ # Footprints discovery: discover a list of footprints
+ # for all the cases of the log
+ fp_log: dict[str, Any] = footprints_discovery.apply(log)
+ # discover the footpritns from the process tree
+ fp_tree: dict[str, Any] = footprints_discovery.apply(tree)
+ # discover the footpritns from the Petri net
+ fp_net: dict[str, Any] = footprints_discovery.apply(net, im)
+ print(len(fp_tree["sequence"]), len(fp_tree["parallel"]), len(fp_net["sequence"]), len(fp_net["parallel"]))
+ print(fp_tree["sequence"] == fp_net["sequence"] and fp_tree["parallel"] == fp_net["parallel"])
+ # apply the footprints conformance checking
+ conf: list[dict[str, Any]] | dict[str, Any] = footprints_conformance.apply(fp_log, fp_net)
+ for trace_an in conf:
+ if trace_an:
+ # print the first anomalous trace (containing deviations
+ # that are contained in the trace but not allowed by the model)
+ print(trace_an)
+ break
+ # finds the footprints for the entire log (not case-by-case, but taking
+ # the relations that appear inside the entire log)
+ fp_log_entire: dict[str, Any] = footprints_discovery.apply(log, variant=footprints_discovery.Variants.ENTIRE_EVENT_LOG)
+
+ if importlib.util.find_spec("graphviz"):
+ # visualize the footprint table
+ from pm4py.visualization.footprints import visualizer as fp_visualizer
+ gviz = fp_visualizer.apply(fp_log_entire, fp_net, parameters={"format": examples_conf.TARGET_IMG_FORMAT})
+ fp_visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/footprints_tree_conf.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/footprints_tree_conf.py
new file mode 100644
index 0000000000000000000000000000000000000000..5f815b1cb3d3633b2ab6b1cdef17124eb641e88f
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/footprints_tree_conf.py
@@ -0,0 +1,71 @@
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.algo.discovery.footprints import algorithm as fp_discovery
+from pm4py.algo.conformance.footprints import algorithm as fp_conformance
+from pm4py.statistics.traces.generic.log import case_statistics
+from pm4py.algo.discovery.dfg import algorithm as dfg_discovery
+from pm4py.algo.filtering.log.paths import paths_filter
+from pm4py.util.vis_utils import human_readable_stat
+from pm4py.algo.filtering.log.variants import variants_filter
+from pm4py.statistics.variants.log import get as variants_get
+from examples import examples_conf
+import os
+import importlib.util
+import numpy
+from pm4py.objects.log.obj import EventLog, Trace
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ throughput_time = case_statistics.get_median_case_duration(log)
+ variants: dict[list[str], list[Trace]] | dict[str, list[Trace]]
+ variants_times: dict[list[str], numpy.ndarray] | dict[str, numpy.ndarray]
+ variants, variants_times = variants_get.get_variants_along_with_case_durations(log)
+ dfg: dict[tuple[str, str], float] = dfg_discovery.apply(log)
+ filtered_log = variants_filter.filter_log_variants_percentage(log, 0.2)
+ # filtered_log = log
+ tree: ProcessTree = inductive_miner.apply(filtered_log)
+ fp_log: dict[str, Any] = fp_discovery.apply(log, variant=fp_discovery.Variants.ENTIRE_EVENT_LOG)
+ fp_model: dict[str, Any] = fp_discovery.apply(tree)
+ conf: list[dict[str, Any]] | dict[str, Any] = fp_conformance.apply(fp_log, fp_model)
+ conf_occ = sorted([(x, dfg[x]) for x in conf], key=lambda y: (y[1], y[0][0], y[0][1]), reverse=True)
+ print(
+ "source activity\t\ttarget activity\t\toccurrences\t\tthroughput time log\t\tthroughput time traces with path")
+ for i in range(min(10, len(conf_occ))):
+ path = conf_occ[i][0]
+ occ = conf_occ[i][1]
+ red_log: EventLog = paths_filter.apply(log, [path])
+ red_throughput_time = case_statistics.get_median_case_duration(red_log)
+ print("%s\t\t%s\t\t%d\t\t%s\t\t%s" % (
+ path[0], path[1], occ, human_readable_stat(throughput_time), human_readable_stat(red_throughput_time)))
+ variants_length = sorted([(x, len(variants[x])) for x in variants.keys()], key=lambda y: (y[1], y[0]), reverse=True)
+ print("\nvariant\t\toccurrences\t\tthroughput time log\t\tthroughput time traces with path")
+ for i in range(min(10, len(variants_length))):
+ var = variants_length[i][0]
+ vark: str = str(var)
+ if len(vark) > 10:
+ vark = vark[:10]
+ occ = variants_length[i][1]
+ fp_log_var: dict[str, Any] = fp_discovery.apply(variants[var], variant=fp_discovery.Variants.ENTIRE_EVENT_LOG)
+ conf_var: list[dict[str, Any]] | dict[str, Any] = fp_conformance.apply(fp_log_var, fp_model)
+ is_fit: str = str(len(conf_var) == 0)
+ var_throughput = case_statistics.get_median_case_duration(variants[var])
+ print("%s\t\t%d\t\t%s\t\t%s\t\t%s" % (vark, occ, is_fit, throughput_time, human_readable_stat(var_throughput)))
+
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.algo.conformance.footprints.util import tree_visualization
+ from pm4py.visualization.process_tree import visualizer as pt_visualizer
+ # print(conf_occ)
+ conf_colors = tree_visualization.apply(tree, conf)
+ if True:
+ gviz = pt_visualizer.apply(tree, parameters={"format": examples_conf.TARGET_IMG_FORMAT,
+ pt_visualizer.Variants.WO_DECORATION.value.Parameters.COLOR_MAP: conf_colors,
+ pt_visualizer.Variants.WO_DECORATION.value.Parameters.ENABLE_DEEPCOPY: False})
+ pt_visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/genetic_miner.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/genetic_miner.py
new file mode 100644
index 0000000000000000000000000000000000000000..ea35c0dba70336e8528da078bb98e642ce0a6002
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/genetic_miner.py
@@ -0,0 +1,27 @@
+import pm4py
+import os
+import importlib.util
+from examples import examples_conf
+from pm4py.algo.discovery.genetic.algorithm import Parameters
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.discover_petri_net_genetic(log, population_size = 10, generations = 10)
+
+ fitness_tbr: dict[str, float] = pm4py.fitness_token_based_replay(log, net, im, fm)
+ print("fitness_tbr", fitness_tbr)
+ precision_tbr: float = pm4py.precision_token_based_replay(log, net, im, fm)
+ print("precision_tbr", precision_tbr)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/graphs_visualization.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/graphs_visualization.py
new file mode 100644
index 0000000000000000000000000000000000000000..23d9009d62baefc10b5dd365d69fb0fca6021ddf
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/graphs_visualization.py
@@ -0,0 +1,21 @@
+import os
+
+import pm4py
+from examples import examples_conf
+import importlib.util
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+
+ if importlib.util.find_spec("graphviz"):
+ # visualize case duration graph
+ pm4py.view_case_duration_graph(log, format=examples_conf.TARGET_IMG_FORMAT)
+
+ # visualize events over time graph
+ pm4py.view_events_per_time_graph(log, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/heu_miner_test.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/heu_miner_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..48ec913bfe7a8a55e369e636ea903e014ef8ca50
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/heu_miner_test.py
@@ -0,0 +1,34 @@
+import os
+
+from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "compressed_input_data", "09_a32f0n00.xes.gz"))
+ heu_net = heuristics_miner.apply_heu(log, parameters={
+ heuristics_miner.Variants.CLASSIC.value.Parameters.DEPENDENCY_THRESH: 0.99})
+
+ if importlib.util.find_spec("pydotplus") and importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.heuristics_net import visualizer as hn_vis
+ gviz = hn_vis.apply(heu_net, parameters={hn_vis.Variants.PYDOTPLUS.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ hn_vis.view(gviz)
+
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = heuristics_miner.apply(log, parameters={
+ heuristics_miner.Variants.CLASSIC.value.Parameters.DEPENDENCY_THRESH: 0.99})
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as petri_vis
+ gviz2 = petri_vis.apply(net, im, fm, parameters={petri_vis.Variants.WO_DECORATION.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ petri_vis.view(gviz2)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/heuminer_plusplus.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/heuminer_plusplus.py
new file mode 100644
index 0000000000000000000000000000000000000000..81a7a81d61c510e92d97d14a558fe927ee8195a8
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/heuminer_plusplus.py
@@ -0,0 +1,44 @@
+import pm4py
+from pm4py.algo.discovery.heuristics.variants import plusplus
+from pm4py.util import constants, pandas_utils
+from pm4py.objects.log.util import dataframe_utils
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.heuristics_net.obj import HeuristicsNet
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ df: pandas.DataFrame = pandas_utils.read_csv("../tests/input_data/interval_event_log.csv")
+ df = dataframe_utils.convert_timestamp_columns_in_df(df, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["start_timestamp", "time:timestamp"])
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/interval_event_log.xes")
+ heu_net: HeuristicsNet = plusplus.apply_heu(log, parameters={"heu_net_decoration": "performance"})
+ heu_net_2: HeuristicsNet = plusplus.apply_heu_pandas(df, parameters={"heu_net_decoration": "performance"})
+
+ if importlib.util.find_spec("pydotplus") and importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.heuristics_net import visualizer
+ gviz = visualizer.apply(heu_net, parameters={"format": examples_conf.TARGET_IMG_FORMAT})
+ visualizer.view(gviz)
+ gviz2 = visualizer.apply(heu_net_2, parameters={"format": examples_conf.TARGET_IMG_FORMAT})
+ visualizer.view(gviz2)
+
+ net1: PetriNet
+ im1: Marking
+ fm1: Marking
+ net1, im1, fm1 = plusplus.apply(log)
+ net2: PetriNet
+ im2: Marking
+ fm2: Marking
+ net2, im2, fm2 = plusplus.apply(log)
+
+ if importlib.util.find_spec("pydotplus") and importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as pn_visualizer
+ gviz3 = pn_visualizer.apply(net1, im1, fm1, parameters={"format": examples_conf.TARGET_IMG_FORMAT})
+ pn_visualizer.view(gviz3)
+ gviz4 = pn_visualizer.apply(net2, im2, fm2, parameters={"format": examples_conf.TARGET_IMG_FORMAT})
+ pn_visualizer.view(gviz4)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/hybrid_ilp_miner.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/hybrid_ilp_miner.py
new file mode 100644
index 0000000000000000000000000000000000000000..425566d3d547dd6634100c3c4763fe30e410b830
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/hybrid_ilp_miner.py
@@ -0,0 +1,22 @@
+import pm4py
+import os
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.discover_petri_net_ilp(log)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/im_example.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/im_example.py
new file mode 100644
index 0000000000000000000000000000000000000000..fa363d7c10b785b7c431d003aebae9f603064138
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/im_example.py
@@ -0,0 +1,65 @@
+import os
+import traceback
+
+import pm4py
+from pm4py.algo.discovery.inductive import algorithm as inductive
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "running-example.xes")
+
+ log: EventLog = xes_importer.apply(log_path)
+ process_tree: ProcessTree = inductive.apply(log)
+ net: PetriNet
+ marking: Marking
+ final_marking: Marking
+ net, marking, final_marking = process_tree_converter.apply(process_tree)
+ for place in marking:
+ print("initial marking " + place.name)
+ for place in final_marking:
+ print("final marking " + place.name)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as pn_vis
+ gviz = pn_vis.apply(net, marking, final_marking,
+ parameters={pn_vis.Variants.WO_DECORATION.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT,
+ pn_vis.Variants.WO_DECORATION.value.Parameters.DEBUG: True})
+ pn_vis.view(gviz)
+
+ if True:
+ fit_traces = []
+
+ for i in range(0, len(log)):
+ try:
+ print("\n", i, [x["concept:name"] for x in log[i]])
+ cf_result = pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star.apply(log[i], net, marking,
+ final_marking)[
+ 'alignment']
+ if cf_result is None:
+ print("alignment is none!")
+ else:
+ is_fit: bool = True
+ for couple in cf_result:
+ print(couple)
+ if not (couple[0] == couple[1] or couple[0] == ">>" and couple[1] is None):
+ is_fit = False
+ print("isFit = " + str(is_fit))
+
+ if is_fit:
+ fit_traces.append(log[i])
+ except TypeError:
+ print("EXCEPTION ", i)
+ traceback.print_exc()
+ print(fit_traces)
+ print(len(fit_traces))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner.py
new file mode 100644
index 0000000000000000000000000000000000000000..c71dc1fe40dd0456202665fe22e028d40ab4a961
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner.py
@@ -0,0 +1,28 @@
+import pm4py
+import os
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ tree: ProcessTree = pm4py.discover_process_tree_inductive(log, noise_threshold=0.2)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_process_tree(tree, format=examples_conf.TARGET_IMG_FORMAT)
+
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.convert_to_petri_net(tree)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner_dfg.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner_dfg.py
new file mode 100644
index 0000000000000000000000000000000000000000..2b21039fbd97139917324b9ee5149f0486834e09
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner_dfg.py
@@ -0,0 +1,34 @@
+import pm4py
+import os
+from pm4py.objects.dfg.obj import DFG
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.dfg.obj import DirectlyFollowsGraph
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"), return_legacy_log_object=False)
+ typed_dfg_1: DirectlyFollowsGraph = pm4py.discover_dfg_typed(log)
+ # in alternative ...
+ dfg: dict
+ sa: dict
+ ea: dict
+ dfg, sa, ea = pm4py.discover_dfg(log)
+ typed_dfg_2: DirectlyFollowsGraph = DFG(dfg, sa, ea)
+
+ tree: ProcessTree = pm4py.discover_process_tree_inductive(typed_dfg_2, noise_threshold=0.2)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.convert_to_petri_net(tree)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_process_tree(tree, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner_dfg_lc.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner_dfg_lc.py
new file mode 100644
index 0000000000000000000000000000000000000000..8e82c9eda3d3bbd5ea89a03bca9c5ad2a2dbd94c
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner_dfg_lc.py
@@ -0,0 +1,56 @@
+import pm4py
+import os
+from collections import Counter
+from pm4py.objects.dfg.obj import DFG
+from pm4py.algo.discovery.inductive.variants.imd import IMD
+from pm4py.algo.discovery.inductive.dtypes.im_dfg import InductiveDFG
+from pm4py.algo.discovery.inductive.dtypes.im_ds import IMDataStructureDFG
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def __build_dfg_lc(log, act_key, start_timestamp, complete_timestamp):
+ dfg: Counter = Counter()
+ start_activities: Counter = Counter()
+ end_activities: Counter = Counter()
+ for trace in log:
+ if trace:
+ start_activities[trace[0][act_key]] += 1
+ i: int = 0
+ max_ct_idx: int = 0
+ while i < len(trace):
+ ct = trace[i][complete_timestamp]
+ if ct > trace[max_ct_idx][complete_timestamp]:
+ max_ct_idx = i
+ j: int = i + 1
+ while j < len(trace):
+ st = trace[j][start_timestamp]
+ dfg[(trace[i][act_key], trace[j][act_key])] += 1
+ if st >= ct:
+ break
+ else:
+ dfg[(trace[j][act_key], trace[i][act_key])] += 1
+ j = j + 1
+ i = i + 1
+ end_activities[trace[max_ct_idx][act_key]] += 1
+
+ return DFG(dfg, start_activities, end_activities)
+
+
+def execute_script():
+ log: EventLog = pm4py.read_xes(os.path.join("..", "tests", "input_data", "interval_event_log.xes"), return_legacy_log_object=True)
+
+ process_tree0: ProcessTree = pm4py.discover_process_tree_inductive(log)
+ print(process_tree0)
+
+ dfg = __build_dfg_lc(log, "concept:name", "start_timestamp", "time:timestamp")
+
+ imd: IMD = IMD({})
+ idfg: InductiveDFG = InductiveDFG(dfg=dfg, skip=False)
+ process_tree = imd.apply(IMDataStructureDFG(idfg), {})
+
+ print(process_tree)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner_variants.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner_variants.py
new file mode 100644
index 0000000000000000000000000000000000000000..e1dec126ca424a3c2164667ad212603a2c6856a7
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inductive_miner_variants.py
@@ -0,0 +1,35 @@
+import pm4py
+import os
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.util.compression.dtypes import UVCL
+from pm4py.algo.discovery.inductive.variants.imf import IMFUVCL
+from pm4py.algo.discovery.inductive.dtypes.im_ds import IMDataStructureUVCL
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.log.obj import Trace
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"), return_legacy_log_object=False)
+ variants: dict[tuple[str], list[Trace]] | dict[tuple[str], int] = pm4py.get_variants(log)
+ uvcl = UVCL()
+ for var, occ in variants.items():
+ uvcl[var] = occ
+ parameters: dict[str, float] = {"noise_threshold": 0.2}
+ imfuvcl: IMFUVCL = IMFUVCL(parameters)
+
+ tree = imfuvcl.apply(IMDataStructureUVCL(uvcl), parameters=parameters)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.convert_to_petri_net(tree)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_process_tree(tree, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inhibitor_reset_arcs.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inhibitor_reset_arcs.py
new file mode 100644
index 0000000000000000000000000000000000000000..2234b1f9f3b1e875ccea59eeb68ae59d30ca982c
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inhibitor_reset_arcs.py
@@ -0,0 +1,73 @@
+import pm4py
+from pm4py.objects.petri_net.obj import ResetInhibitorNet, Marking
+from pm4py.objects.petri_net.utils.petri_utils import add_arc_from_to
+from pm4py.objects.petri_net.inhibitor_reset import semantics
+from copy import deepcopy
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.petri_net.obj import PetriNet
+
+
+def execute_script():
+ net: ResetInhibitorNet = ResetInhibitorNet("")
+ source: PetriNet.Place = ResetInhibitorNet.Place("source")
+ sink: PetriNet.Place = ResetInhibitorNet.Place("sink")
+ p1: PetriNet.Place = ResetInhibitorNet.Place("p1")
+ p2: PetriNet.Place = ResetInhibitorNet.Place("p2")
+ p_inhibitor: PetriNet.Place = ResetInhibitorNet.Place("p_inhibitor")
+ p_reset: PetriNet.Place = ResetInhibitorNet.Place("p_reset")
+ trans_A: PetriNet.Transition = ResetInhibitorNet.Transition("A", "A")
+ trans_B: PetriNet.Transition = ResetInhibitorNet.Transition("B", "B")
+ trans_C: PetriNet.Transition = ResetInhibitorNet.Transition("C", "C")
+ trans_inhibitor: PetriNet.Transition = ResetInhibitorNet.Transition("inhibitor", None)
+ trans_free: PetriNet.Transition = ResetInhibitorNet.Transition("free", None)
+ net.places.add(source)
+ net.places.add(sink)
+ net.places.add(p1)
+ net.places.add(p2)
+ net.places.add(p_inhibitor)
+ net.places.add(p_reset)
+ net.transitions.add(trans_A)
+ net.transitions.add(trans_B)
+ net.transitions.add(trans_C)
+ net.transitions.add(trans_free)
+ net.transitions.add(trans_inhibitor)
+ add_arc_from_to(source, trans_A, net)
+ add_arc_from_to(trans_A, p1, net)
+ add_arc_from_to(p1, trans_B, net)
+ add_arc_from_to(trans_B, p2, net)
+ add_arc_from_to(p2, trans_C, net)
+ add_arc_from_to(trans_C, sink, net)
+ add_arc_from_to(trans_inhibitor, p_inhibitor, net)
+ inhibitor_arc: PetriNet.Arc = add_arc_from_to(p_inhibitor, trans_B, net, type="inhibitor")
+ add_arc_from_to(trans_free, p_reset, net)
+ reset_arc: PetriNet.Arc = add_arc_from_to(p_reset, trans_C, net, type="reset")
+ im: Marking = Marking({source: 1})
+ fm: Marking = Marking({sink: 1})
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+ m = semantics.execute(trans_A, net, im)
+ print(m)
+ # B is enabled in m because no tokens in the "inhibitor" place
+ print(semantics.enabled_transitions(net, m))
+ # if we put a token in the inhibitor place, B is not enabled anymore
+ m2 = deepcopy(m)
+ m2[p_inhibitor] = 1
+ print(semantics.enabled_transitions(net, m2))
+ # let's continue with m and fire B, and three times the "free" transition
+ m = semantics.execute(trans_B, net, m)
+ m = semantics.execute(trans_free, net, m)
+ m = semantics.execute(trans_free, net, m)
+ m = semantics.execute(trans_free, net, m)
+ # we have three tokens in the 'reset' place. Firing C, all of them are removed because of the reset arc
+ print(m)
+ m = semantics.execute(trans_C, net, m)
+ print(m)
+ print(m == fm)
+ # sink reached :)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inhibitor_reset_playout_and_alignment.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inhibitor_reset_playout_and_alignment.py
new file mode 100644
index 0000000000000000000000000000000000000000..0481a006b690035b43c19371ea7a241a166bd194
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/inhibitor_reset_playout_and_alignment.py
@@ -0,0 +1,163 @@
+"""
+Play out and align a reset/inhibitor Petri net.
+
+This example uses the hospital-discharge model stored in the test data. It
+demonstrates the two places where custom Petri-net semantics must be supplied:
+
+1. basic playout, so inhibitor arcs affect enablement and reset arcs affect
+ firing;
+2. the semantics-aware Dijkstra alignment variant, so its state-space search
+ follows exactly the same rules as the model simulation.
+
+Run this file from any working directory:
+
+ python examples/inhibitor_reset_playout_and_alignment.py
+"""
+
+import sys
+from pathlib import Path
+
+# A directly executed file puts examples/ (not the repository root) first on
+# sys.path. Add the checkout root before importing PM4Py so this example uses
+# the local implementation, including VERSION_DIJKSTRA_SEMANTICS.
+REPOSITORY_ROOT = Path(__file__).resolve().parent.parent
+sys.path.insert(0, str(REPOSITORY_ROOT))
+
+import pm4py
+from pm4py.algo.conformance.alignments.petri_net import (
+ algorithm as alignments,
+)
+from pm4py.algo.simulation.playout.petri_net import algorithm as playout
+from pm4py.objects.log.obj import Event, EventLog, Trace
+from pm4py.objects.petri_net.inhibitor_reset.semantics import (
+ InhibitorResetSemantics,
+)
+from pm4py.objects.petri_net.obj import InhibitorNet, ResetNet
+
+
+# Resolve input files relative to this source file. Using __file__ instead of
+# the current working directory makes the example work both from the repository
+# root and from the examples directory.
+DATA_DIR = REPOSITORY_ROOT / "tests" / "input_data" / "inh_res_nets"
+MODEL_PATH = DATA_DIR / "hospital_discharge.pnml"
+LOG_PATH = DATA_DIR / "logs" / "hospital_discharge.xes"
+
+
+def activity_sequence(trace: Trace):
+ """Return only the readable activity names from a PM4Py trace."""
+ return [event["concept:name"] for event in trace]
+
+
+def execute_script():
+ # PNML preserves the specialized reset and inhibitor arc types. The PM4Py
+ # importer therefore reconstructs a ResetInhibitorNet automatically.
+ net, initial_marking, final_marking = pm4py.read_pnml(str(MODEL_PATH))
+
+ # The companion XES file was generated by basic playout. Requesting the
+ # legacy EventLog representation gives us Trace/Event objects, which can be
+ # passed directly to the alignment API used below.
+ stored_log = pm4py.read_xes(
+ str(LOG_PATH), return_legacy_log_object=True
+ )
+
+ # A reset arc consumes every token from its source place when its transition
+ # fires. An inhibitor arc does not consume tokens; instead, it enables its
+ # transition only while the source place is empty. Checking the imported
+ # objects is a useful sanity check that PNML round-tripping retained both.
+ reset_arcs = [
+ arc for arc in net.arcs if isinstance(arc, ResetNet.ResetArc)
+ ]
+ inhibitor_arcs = [
+ arc for arc in net.arcs if isinstance(arc, InhibitorNet.InhibitorArc)
+ ]
+ assert reset_arcs, "the imported model should contain a reset arc"
+ assert inhibitor_arcs, "the imported model should contain an inhibitor arc"
+
+ print("Model:", net.name)
+ print("Visible activities:", len([t for t in net.transitions if t.label]))
+ print("Stored traces:", len(stored_log))
+ print("First stored trace:", activity_sequence(stored_log[0]))
+
+ # ClassicSemantics remains PM4Py's default because it is right for ordinary
+ # Petri nets. This model is not ordinary, so the same specialized semantics
+ # object is deliberately passed to both playout and alignment.
+ semantics = InhibitorResetSemantics()
+
+ # Generate a few fresh traces. "add_only_if_fm_is_reached" excludes partial
+ # runs stopped by the length limit, while maxTraceLength protects us from an
+ # unlucky sequence that repeatedly chooses one of the model's optional
+ # loops.
+ simulated_log = playout.apply(
+ net,
+ initial_marking,
+ final_marking,
+ variant=playout.Variants.BASIC_PLAYOUT,
+ parameters={
+ "petri_semantics": semantics,
+ "noTraces": 5,
+ "maxTraceLength": 40,
+ "add_only_if_fm_is_reached": True,
+ },
+ )
+
+ print("\nFreshly simulated traces:")
+ for index, trace in enumerate(simulated_log):
+ print(f" {index}: {activity_sequence(trace)}")
+
+ # VERSION_DIJKSTRA_SEMANTICS searches states of the form
+ # (position in trace, model marking). For each model or synchronous move it
+ # calls the supplied semantics to find enabled transitions and fire them.
+ # This avoids flattening the model into a classic synchronous-product net,
+ # which would lose the special behavior of reset and inhibitor arcs.
+ alignment_results = alignments.apply(
+ simulated_log,
+ net,
+ initial_marking,
+ final_marking,
+ variant=alignments.Variants.VERSION_DIJKSTRA_SEMANTICS,
+ parameters={
+ "petri_semantics": semantics,
+ "show_progress_bar": False,
+ },
+ )
+
+ # Every trace came from this exact model, so every event should synchronize
+ # with a model transition and every optimal alignment should cost zero.
+ assert all(result["cost"] == 0 for result in alignment_results)
+ print("\nAlignment costs for simulated traces:")
+ print([result["cost"] for result in alignment_results])
+
+ # Finally, insert an event that the model does not know. Dijkstra represents
+ # it as a log move: ("Unexpected Manual Override", ">>"). With PM4Py's
+ # standard costs that deviation contributes 10,000 to the alignment.
+ original = simulated_log[0]
+ deviating_trace = Trace(
+ [Event(dict(event)) for event in original],
+ attributes=dict(original.attributes),
+ )
+ deviating_trace.insert(
+ 1, Event({"concept:name": "Unexpected Manual Override"})
+ )
+ deviation = alignments.apply(
+ deviating_trace,
+ net,
+ initial_marking,
+ final_marking,
+ variant=alignments.Variants.VERSION_DIJKSTRA_SEMANTICS,
+ parameters={"petri_semantics": semantics},
+ )
+
+ assert deviation["cost"] == 10000
+ assert ("Unexpected Manual Override", ">>") in deviation["alignment"]
+ print("\nAlignment of a deliberately deviating trace:")
+ print(" cost:", deviation["cost"])
+ print(" moves:", deviation["alignment"])
+
+ # EventLog is imported above to make clear that both persisted and simulated
+ # logs use PM4Py's normal log type; this assertion also documents the return
+ # type of basic Petri-net playout.
+ assert isinstance(simulated_log, EventLog)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/interval_events_overlap.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/interval_events_overlap.py
new file mode 100644
index 0000000000000000000000000000000000000000..92657926d87b2eb9095d9720f2ffe711efb9678a
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/interval_events_overlap.py
@@ -0,0 +1,19 @@
+import pm4py
+from pm4py.statistics.overlap.interval_events.log import get as interval_events_overlap
+import os
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "interval_event_log.xes"))
+ # gets the overlap of each interval event with the other events of the log
+ overlap = interval_events_overlap.apply(log, parameters={
+ interval_events_overlap.Parameters.START_TIMESTAMP_KEY: "start_timestamp"})
+ # print the overlap for all the events
+ print(overlap)
+ # print the number of intersections of the event having max overlap
+ print(max(overlap))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/kneighb_regression.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/kneighb_regression.py
new file mode 100644
index 0000000000000000000000000000000000000000..b26ca18b33f94a680c2026ccc4f7fd7b1962f827
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/kneighb_regression.py
@@ -0,0 +1,49 @@
+import pm4py
+from pm4py.algo.transformation.trace_encodings import algorithm
+import random
+import numpy as np
+from pm4py.util import ml_utils
+from pm4py.objects.log.obj import EventLog
+
+
+def execute_script():
+ log: EventLog = pm4py.read_xes("../tests/input_data/receipt.xes", return_legacy_log_object=True)
+
+ # train a predictor of the throughput timebased on the attributes at the case level (known at the beginning of the case)
+
+ feature_names: list[str]
+ data, feature_names = algorithm.apply(log,
+ parameters={"str_tr_attr": ["channel", "group", "responsible", "department"],
+ "str_ev_attr": [], "num_tr_attr": [], "num_ev_attr": [],
+ "str_evsucc_attr": []})
+ data = [np.array(x) for x in data]
+
+ throughput_time = [y[-1]["time:timestamp"].timestamp() - y[0]["time:timestamp"].timestamp() for y in log]
+
+ # split the cases in training and test
+
+ available_cases = [i for i in range(len(log))]
+ training_cases = set(random.sample(available_cases, 500))
+ data_training = [data[i] for i in range(len(log)) if i in training_cases]
+ data_training = np.array(data_training)
+
+ throughput_time_training = [throughput_time[i] for i in range(len(log)) if i in training_cases]
+
+ # train the regressor
+
+ regressor = ml_utils.KNeighborsRegressor(n_neighbors=3)
+ regressor.fit(data_training, throughput_time_training)
+
+ data_validation = [data[i] for i in range(len(log)) if i not in training_cases]
+ throughput_time_validation = [throughput_time[i] for i in range(len(log)) if i not in training_cases]
+
+ # apply the predictor on the validation dataset and compare it with the actual throughput time
+ predicted_throughput_time = regressor.predict(data_validation)
+
+ for i in range(len(throughput_time_validation)):
+ print("case actual throughput=", throughput_time_validation[i], " predicted throughput = ",
+ predicted_throughput_time[i])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/label_replacement.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/label_replacement.py
new file mode 100644
index 0000000000000000000000000000000000000000..339fc590b5749ac3b0633ebde0b4d47013f04773
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/label_replacement.py
@@ -0,0 +1,29 @@
+import pm4py
+import os
+import pandas
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"))
+
+ # discovers a process moedl from the log
+ process_tree: ProcessTree = pm4py.discover_process_tree_inductive(log)
+ # gets the label from the process models
+ labels: list[str] = pm4py.get_activity_labels(process_tree)
+ # modify the labels
+ labels = {x: x+"ADD" for x in labels}
+
+ # replace the labels on the process model
+ process_tree_mod = pm4py.replace_activity_labels(labels, process_tree)
+ # view the modified process tree
+ pm4py.view_process_tree(process_tree_mod, format="svg")
+
+ # now, let's replace the labels back, with labels projection from another process model
+ process_tree_mod2 = pm4py.map_labels_from_second_model(process_tree_mod, process_tree)
+ # show the process tree modified
+ pm4py.view_process_tree(process_tree_mod2, format="svg")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/label_splitting.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/label_splitting.py
new file mode 100644
index 0000000000000000000000000000000000000000..26c436e13362b33fca79aa452e7e2c2de98e6df1
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/label_splitting.py
@@ -0,0 +1,23 @@
+import pm4py
+from pm4py.algo.label_splitting import algorithm as label_splitter
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+ log = log[["case:concept:name", "concept:name", "time:timestamp"]]
+
+ # relabeling with the default options
+ rlog1: pandas.DataFrame = label_splitter.apply(log, variant=label_splitter.Variants.CONTEXTUAL)
+ print(rlog1)
+
+ # relabeling with a single activity allowed in the prefix and suffix,
+ # plus the relabeling only applies to a given activity
+ rlog2 = label_splitter.apply(log, variant=label_splitter.Variants.CONTEXTUAL,
+ parameters={"prefix_length": 1, "suffix_length": 1,
+ "target_activities": ["Confirmation of receipt"]})
+ print(rlog2)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/link_analysis_vbfa.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/link_analysis_vbfa.py
new file mode 100644
index 0000000000000000000000000000000000000000..50ae9abcaf6c3a64d7c159816e6f558ea5494f47
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/link_analysis_vbfa.py
@@ -0,0 +1,27 @@
+from pm4py.util import constants, pandas_utils
+from pm4py.algo.discovery.ocel.link_analysis import algorithm as link_analysis
+from pm4py.objects.log.util import dataframe_utils
+import os
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "ocel", "VBFA.zip"), compression="zip", dtype="str")
+ dataframe["time:timestamp"] = dataframe["ERDAT"] + " " + dataframe["ERZET"]
+ dataframe = dataframe_utils.convert_timestamp_columns_in_df(dataframe, timest_format="%Y%m%d %H%M%S", timest_columns=["time:timestamp"])
+ dataframe["RFWRT"] = dataframe["RFWRT"].astype(float)
+ dataframe = link_analysis.apply(dataframe, parameters={"out_column": "VBELN", "in_column": "VBELV",
+ "sorting_column": "time:timestamp", "propagate": True})
+
+ # finds the connected documents in which the currency in one document is different from the currency in the connected document.
+ df_currency = dataframe[(dataframe["WAERS_out"] != " ") & (dataframe["WAERS_in"] != " ") & (
+ dataframe["WAERS_out"] != dataframe["WAERS_in"])]
+ print(df_currency[["WAERS_out", "WAERS_in"]].value_counts())
+
+ # finds the connected documents in which the amount in one document is lower than the amount in the connected document.
+ df_amount: pandas.DataFrame = dataframe[(dataframe["RFWRT_out"] > 0) & (dataframe["RFWRT_out"] < dataframe["RFWRT_in"])]
+ print(df_amount[["RFWRT_out", "RFWRT_in"]])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/01_1_protected_group_identification.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/01_1_protected_group_identification.py
new file mode 100644
index 0000000000000000000000000000000000000000..fb56f1c29f51145e04c42ebccb22f71a0f3dd360
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/01_1_protected_group_identification.py
@@ -0,0 +1,24 @@
+import pm4py
+import os
+import pandas
+
+
+def execute_script():
+ """
+ Prompt asking to the LLM to generate a SQL query that, given the attributes of the event log,
+ identifies the cases with higher risk of discrimination ("protected" group).
+ """
+ dataframe: pandas.DataFrame = pm4py.read_xes("../../tests/input_data/fairness/renting_log_high.xes.gz")
+ dataframe = dataframe[[x for x in dataframe.columns if 'protected' not in x]]
+ print(dataframe)
+ print(dataframe.columns)
+ prompt: str = "Given an event log describing a process with the following directly-follows graph:\n\n"
+ prompt += pm4py.llm.abstract_dfg(dataframe, max_len=5000, response_header=False)
+ prompt += "\n\nand the following attributes:\n\n"
+ prompt += pm4py.llm.abstract_log_attributes(dataframe, max_len=5000)
+ prompt += "\n\nCould you make an hypothesis and provide me a DuckDB SQL query that I can execute to filter the dataframe on the cases in which unfairness is likely to happen? It can be an OR query (several different conditions could signal unfairness) The dataframe is called 'dataframe'. Please only a single query. The single query should only look at the case attributes, not the activities in a case. Quote the names of the attributes with a \" at start and at the end."
+ print(prompt)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/01_2_protected_group_query.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/01_2_protected_group_query.py
new file mode 100644
index 0000000000000000000000000000000000000000..f01733268d07ffca869ef58b5b8c92415697c1db
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/01_2_protected_group_query.py
@@ -0,0 +1,40 @@
+import pm4py
+import duckdb
+import pandas
+
+
+def execute_script():
+ """
+ Scripts to check the query provided (in the script 01_1_...) for the "protected"
+ group against the ground truth (that for the logs included in pm4py is reported in the log)
+ and measure the quality of the classification.
+ """
+ dataframe: pandas.DataFrame = pm4py.read_xes("../../tests/input_data/fairness/renting_log_high.xes.gz")
+ protected_attr = [x for x in dataframe.columns if "protected" in x][0]
+
+ sql_query = """
+SELECT * FROM dataframe
+WHERE "case:citizen" = 'False'
+OR "case:gender" = 'True'
+OR "case:german speaking" = 'False'
+OR "case:married" = 'False';
+ """
+ dataframe_pos = duckdb.sql(sql_query).to_df()
+ cases_pos = dataframe_pos["case:concept:name"].unique()
+ dataframe_neg: pandas.DataFrame = dataframe[~dataframe["case:concept:name"].isin(cases_pos)]
+
+ dataframe_pos = dataframe_pos.groupby("case:concept:name").first()
+ dataframe_neg = dataframe_neg.groupby("case:concept:name").last()
+
+ tp = len(dataframe_pos[dataframe_pos[protected_attr].eq(True)])
+ fp = len(dataframe_pos[dataframe_pos[protected_attr].eq(False)])
+ print("true positives", tp)
+ print("false positives", fp)
+ fn = len(dataframe_neg[dataframe_neg[protected_attr].eq(True)])
+ tn = len(dataframe_neg[dataframe_neg[protected_attr].eq(False)])
+ print("false negatives", fn)
+ print("true negatives", tn)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/02_group_fairness_factors.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/02_group_fairness_factors.py
new file mode 100644
index 0000000000000000000000000000000000000000..70813bd2de2e2bae39d7a95d67392b51cea8f41a
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/02_group_fairness_factors.py
@@ -0,0 +1,33 @@
+import pm4py
+import pandas
+
+
+def execute_script():
+ """
+ Script that, given the process variants of the "protected" and "non-protected" groups,
+ generates a (first) prompt asking to the LLM which are the procedural differences between the two groups.
+ The second prompt works on the output of the first prompt, and generates a SQL query isolating the
+ paths or the process variants that lead to discrimination.
+ """
+ dataframe: pandas.DataFrame = pm4py.read_xes("../../tests/input_data/fairness/renting_log_high.xes.gz")
+ protected_attr = [x for x in dataframe.columns if "protected" in x][0]
+ dataframe_prot: pandas.DataFrame = dataframe[
+ dataframe[protected_attr].eq(True)
+ ]
+ dataframe_unprot: pandas.DataFrame = dataframe[
+ dataframe[protected_attr].eq(False)
+ ]
+ prompt: str = "I want to identify the unfair differences between the treatment of the 'protected' group (first) and the 'unprotected' group (second). I report the process variants. Each process variant is also reported with its execution time."
+ prompt += "\n\nProcess variants of the protected group:"
+ prompt += pm4py.llm.abstract_variants(dataframe_prot, max_len=5000)
+ prompt += "\n\nProcess variants of the unprotected group:"
+ prompt += pm4py.llm.abstract_variants(dataframe_unprot, max_len=5000)
+ prompt += "\n\nwhich are the main differences? use your domain knowledge."
+ print(prompt)
+ input()
+ prompt = "Perfect. Now please provide me a single DuckDB SQL query to filter the dataframe to such variants that are critical for fairness. More in detail, the data is stored in a Pandas dataframe where each row is an event having the provided attributes (so there are no separate table containing the variant). Please consider the following information: the case identifier is called 'case:concept:name', the activity is stored inside the attribute 'concept:name', the timestamp is stored inside the attribute 'time:timestamp', the resource is stored inside the attribute 'org:resource', there is not a variant column but that can be obtained as concatenation of the activities of a case, there is not a duration column but that can be obtained as difference between the timestamp of the first and the last event. Also, the dataframe is called 'dataframe'. You should use the EPOCH function of DuckDB to get the timestamp from the date. Note that I want the original dataframe with its rows and columns back (so add the variant column on the original dataframe and filter on that). Please filter on a comprehensive list of unfair variants, use several messages if necessary."
+ print(prompt)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/03_case_procedural.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/03_case_procedural.py
new file mode 100644
index 0000000000000000000000000000000000000000..7a0ac2de90e609b446f9af53f8016740423f8cbe
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/03_case_procedural.py
@@ -0,0 +1,67 @@
+import pm4py
+import duckdb
+import pandas
+
+
+def execute_script():
+ """
+ Measures the quality of the SQL query provided in 02_...
+ to isolate the procedural behavior leading to discrimination,
+ and assess the quality of the classification against the ground truth written in the log.
+ """
+ dataframe: pandas.DataFrame = pm4py.read_xes("../../tests/input_data/fairness/renting_log_high.xes.gz")
+ protected_attr = [x for x in dataframe.columns if "protected" in x][0]
+
+ sql_query = """
+WITH cases AS (
+ SELECT
+ "case:concept:name",
+ STRING_AGG("concept:name", ' -> ') OVER (PARTITION BY "case:concept:name" ORDER BY "time:timestamp") AS variant
+ FROM
+ dataframe
+),
+filtered_cases AS (
+ SELECT
+ "case:concept:name"
+ FROM
+ cases
+ WHERE variant IN (
+ 'Request Appointment -> Set Appointment -> Hand In Credit Appliaction -> Verify Borrowers Information -> Submit File to Underwriter -> Loan Denied',
+ 'Request Appointment -> Set Appointment -> Hand In Credit Appliaction -> Verify Borrowers Information -> Application Rejected',
+ 'Request Appointment -> Appointment Denied',
+ 'Request Appointment -> Set Appointment -> Hand In Credit Appliaction -> Verify Borrowers Information -> Request Co-Signer On Loan -> Submit File to Underwriter -> Loan Denied',
+ 'Request Appointment -> Set Appointment -> Hand In Credit Appliaction -> Verify Borrowers Information -> Make Visit to Assess Colatteral -> Submit File to Underwriter -> Loan Denied',
+ 'Request Appointment -> Set Appointment -> Hand In Credit Appliaction -> Verify Borrowers Information -> Make Visit to Assess Colatteral -> Submit File to Underwriter -> Sign Loan Agreement'
+)
+ GROUP BY
+ "case:concept:name"
+)
+SELECT
+ df.*,
+ cases.variant
+FROM
+ dataframe AS df
+JOIN
+ filtered_cases ON df."case:concept:name" = filtered_cases."case:concept:name"
+JOIN
+ cases ON df."case:concept:name" = cases."case:concept:name"
+ """
+ dataframe_pos = duckdb.sql(sql_query).to_df()
+ cases_pos = dataframe_pos["case:concept:name"].unique()
+ dataframe_neg: pandas.DataFrame = dataframe[~dataframe["case:concept:name"].isin(cases_pos)]
+
+ dataframe_pos = dataframe_pos.groupby("case:concept:name").first()
+ dataframe_neg = dataframe_neg.groupby("case:concept:name").last()
+
+ tp = len(dataframe_pos[dataframe_pos[protected_attr].eq(True)])
+ fp = len(dataframe_pos[dataframe_pos[protected_attr].eq(False)])
+ print("true positives", tp)
+ print("false positives", fp)
+ fn = len(dataframe_neg[dataframe_neg[protected_attr].eq(True)])
+ tn = len(dataframe_neg[dataframe_neg[protected_attr].eq(False)])
+ print("false negatives", fn)
+ print("true negatives", tn)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/04_hypothesis_generation.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/04_hypothesis_generation.py
new file mode 100644
index 0000000000000000000000000000000000000000..8a58afd37a49a6ff170f999d30e7c57c8c6e9a48
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/04_hypothesis_generation.py
@@ -0,0 +1,34 @@
+import pm4py
+import pandas
+
+
+def execute_script():
+ """
+ Generates some hypothesis for the analysis of an event log starting
+ from the process variants and log attributes abstraction of the event log.
+ The hypothesis shall come with a DuckDB SQL query that can be verified against the dataframe
+ """
+ log: pandas.DataFrame = pm4py.read_xes("../../tests/input_data/roadtraffic100traces.xes")
+ prompt = []
+ prompt.append("\n\nIf I have the following process variants:\n")
+ prompt.append(pm4py.llm.abstract_variants(log, max_len=3000, response_header=False))
+ prompt.append("\n\nand attributes in the log:\n")
+ prompt.append(pm4py.llm.abstract_log_attributes(log, max_len=3000))
+ prompt.append("\n\n")
+ prompt.append("can you formulate some hypothesis on the given process?\n")
+ prompt.append("please also formulate for every hypothesis a SQL query.\n")
+ prompt.append("\n\n")
+ prompt.append("Can you provide me a DuckDB SQL query.\n")
+ prompt.append("You should use the EPOCH function of DuckDB to get the timestamp from the date.\n")
+ prompt.append("The data is stored in a Pandas dataframe where each row is an event having the provided attributes (so there are no separate table containing the variant).\n")
+ prompt.append('The dataframe is called "dataframe".\n')
+ prompt.append('Please consider the following information: the case identifier is called "case:concept:name", the activity is stored inside the attribute "concept:name", the timestamp is stored inside the attribute "time:timestamp", the resource is stored inside the attribute "org:resource".\n')
+ prompt.append('There is not a variant column but that can be obtained as concatenation of the activities of a case.\n')
+ prompt.append('There is not a duration column but that can be obtained as difference between the timestamp of the first and the last event.\n')
+ prompt.append("\n\n")
+ prompt = "".join(prompt)
+ print(prompt)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.1
new file mode 100644
index 0000000000000000000000000000000000000000..ca1e6f794e078cff934f8bdc54a06bda2feb81a3
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.1
@@ -0,0 +1,23 @@
+A small company manufactures customized bicycles.
+
+Whenever the sales department receives an order , a new process instance is created.
+
+A member of the sales department can then reject or accept the order for a customized bike.
+
+In the former case , the process instance is finished.
+
+In the latter case , the storehouse and the engineering department are informed.
+
+The storehouse immediately processes the part list of the order and checks the required quantity of each part.
+
+If the part is available in-house , it is reserved.
+
+If it is not available , it is back-ordered.
+
+This procedure is repeated for each item on the part list.
+
+In the meantime , the engineering department prepares everything for the assembling of the ordered bicycle.
+
+If the storehouse has successfully reserved or back-ordered every item of the part list and the preparation activity has finished , the engineering department assembles the bicycle.
+
+Afterwards , the sales department ships the bicycle to the customer and finishes the process instance .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.2 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.2
new file mode 100644
index 0000000000000000000000000000000000000000..7d515d93bf749aa3d50f38741a58b57097ac91d6
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.2
@@ -0,0 +1,11 @@
+A customer brings in a defective computer and the CRS checks the defect and hands out a repair cost calculation back.
+
+If the customer decides that the costs are acceptable , the process continues , otherwise she takes her computer home unrepaired.
+
+The ongoing repair consists of two activities , which are executed , in an arbitrary order.
+
+The first activity is to check and repair the hardware , whereas the second activity checks and configures the software.
+
+After each of these activities , the proper system functionality is tested.
+
+If an error is detected another arbitrary repair activity is executed , otherwise the repair is finished .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.3 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.3
new file mode 100644
index 0000000000000000000000000000000000000000..0b15218fea08785a221a5a8345be0f64799483b7
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.3
@@ -0,0 +1,25 @@
+The Evanstonian is an upscale independent hotel.
+
+When a guest calls room service at The Evanstonian , the room-service manager takes down the order.
+
+She then submits an order ticket to the kitchen to begin preparing the food.
+
+She also gives an order to the sommelier ( i.e.
+
+, the wine waiter ) to fetch wine from the cellar and to prepare any other alcoholic beverages.
+
+Eighty percent of room-service orders include wine or some other alcoholic beverage.
+
+Finally , she assigns the order to the waiter.
+
+While the kitchen and the sommelier are doing their tasks , the waiter readies a cart ( i.e.
+
+, puts a tablecloth on the cart and gathers silverware ).
+
+The waiter is also responsible for nonalcoholic drinks.
+
+Once the food , wine , and cart are ready , the waiter delivers it to the guest ’ s room.
+
+After returning to the room-service station , the waiter debits the guest ’ s account.
+
+The waiter may wait to do the billing if he has another order to prepare or deliver .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.4 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.4
new file mode 100644
index 0000000000000000000000000000000000000000..09f803c003f71bec5cba677a502886045291de13
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-1.4
@@ -0,0 +1,21 @@
+Whenever a company makes the decision to go public , its first task is to select the underwriters.
+
+Underwriters act as financial midwives to a new issue.
+
+Usually they play a triple role : First they provide the company with procedural and financial advice , then they buy the issue , and finally they resell it to the public.
+
+Established underwriters are careful of their reputation and will not handle a new issue unless they believe the facts have been presented fairly.
+
+Thus , in addition to handling the sale of a company ’ s issue , the underwriters in effect give their seal of approval to it.
+
+They prepare a registration statement for the approval of the Securities and Exchange Commission ( SEC ).
+
+In addition to registering the issue with the SEC , they need to check that the issue complies with the so-called blue-sky laws of each state that regulate sales of securities within the state.
+
+While the registration statement is awaiting approval , underwriters begin to firm up the issue price.
+
+They arrange a road show to talk to potential investors.
+
+Immediately after they receive clearance from the SEC , underwriters fix the issue price.
+
+After that they enter into a firm commitment to buy the stock and then offer it to the public , when they haven ’ t still found any reason not to do it .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.1
new file mode 100644
index 0000000000000000000000000000000000000000..d5a965a44f62a29ce864119ec48650f1f57fde28
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.1
@@ -0,0 +1,5 @@
+The MPON sents the dismissal to the MPOO.
+
+The MPOO reviews the dismissal.
+
+The MPOO opposes the dismissal of MPON or the MPOO confirmes the dismissal of the MPON .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.10 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.10
new file mode 100644
index 0000000000000000000000000000000000000000..5f10a5b768a574c5f4a9af483b99cb4e89121911
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.10
@@ -0,0 +1,15 @@
+The fault detector reports a failure to the MPO or MPO has a suspicion of their own fault.
+
+The MPO shall examine the failure.
+
+The MPO rejects the failure of the fault detector or the MPO confirms the failure of the fault detector.
+
+If the MPO confirms the failure of the fault detector , he informes the GO and the MSP.
+
+The MPO fixes the fault at the measuring device.
+
+The MPO shares the results of the repairs carried out with the fault detector.
+
+The MPO will inform the GO about the resolution of the interference.
+
+The MPO will inform the MSP about the resolution of the interference .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.11 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.11
new file mode 100644
index 0000000000000000000000000000000000000000..ba391be0cce57029683114139cfbb10d743f7254
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.11
@@ -0,0 +1,13 @@
+The GO requests the measurements to the MSP.
+
+The MSP checks the received request.
+
+The MSP denies the request of the GO or the MSP performs the measurement.
+
+The MSP informs the GO about the failure of the reading or the MSP transmits the measured values to the GO.
+
+The GO processes the measured values.
+
+The GO sends the changed values to the MSP.
+
+The GO transmit the readings to the SP .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.12 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.12
new file mode 100644
index 0000000000000000000000000000000000000000..0af5570323096b8e317ded065c174938eceacacf
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.12
@@ -0,0 +1,7 @@
+The EC tells the INQ about the change of his master data.
+
+The INQ notifies the IP of the change.
+
+The IP checks whether the master data can be changed at the desired time.
+
+The IP confirmes the changes of the INQ or the IP rejectes the changes of the INQ .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.13 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.13
new file mode 100644
index 0000000000000000000000000000000000000000..617b0014140532668e1f9a8778afc2139f12d0aa
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.13
@@ -0,0 +1,7 @@
+The INQ transmits the transaction data request to the IP.
+
+The IP checks the request of the INQ.
+
+The IP answers the question of the INQ depending on the outcome of the examination , i.e.
+
+Transmission of data or rejection .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.14 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.14
new file mode 100644
index 0000000000000000000000000000000000000000..30f1c99b0c44a05b01d345ac9ac5fb9f0a3e41b7
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.14
@@ -0,0 +1,9 @@
+If the MPOO sends the bill for the temporary continuation of the metering point operations to the GO , the GO examines the bill.
+
+If the MSPO sends the bill for the temporary continuation of the measurement to the GO , the GO examines the bill.
+
+If the MSPO sends the bill for additional readings to the GO , the GO examines the bill.
+
+If the MPOO sends the bill for the equipment acquisition to the MPON or the GO , the MPON or the GO examines the bill.
+
+The GO or the MPON confirms the invoice with payment advice to the MPOO or the MSPO , or the GO or the MPON rejects the invoice of the MPOO or the MSPO .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.2 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.2
new file mode 100644
index 0000000000000000000000000000000000000000..ea4e5af800179295d73fbbded114ce007ad726f9
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.2
@@ -0,0 +1,27 @@
+The MPON reports the meter operation to the GO.
+
+The GO examines the application of the MPON.
+
+The GO rejects the application of the MPON or the GO confirmes the application of the MPON.
+
+The GO informs the MPOO about the registration confirmation of the MPON.
+
+The GO informs the MSPO about the registration confirmation of the MPON.
+
+The MPON and the MPOO perform the equipment acquisition and / or equipment changes.
+
+The MPON informs the GO about the failure of the entire process or the MPON informs the GO about the successful completion of the entire process.
+
+The GO informs the MPON about the failure of the overall transaction by deadline if after a maximum time limit no message of the MPON is present at the GO.
+
+If the MPON informs the GO about the failure of the entire process , the GO confirms the failure of the assignment to the MPON.
+
+If the MPON informs the GO about the successful completion of the overall process , the GO assigns the MPON.
+
+The GO confirms the assignment to the MPON.
+
+The GO informs the MPOO about the failure of the assignment of the MPON or the GO informs the MPOO about the assignment of the MPON.
+
+The GO informs the MSPO about the failure of the assignment of the MPON or the GO informs the MSPO about the assignment of the MPON.
+
+The GO informs the SP about the assignment of the MPON .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.3 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.3
new file mode 100644
index 0000000000000000000000000000000000000000..75f540d8b1644529ce1a8267eaa9b96817fbec5d
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.3
@@ -0,0 +1,21 @@
+The MPOO deregisters at the GO.
+
+The GO verifies the deregistration.
+
+The GO rejects the deregistration of the MPOO or the GO preliminarily confirms the deregistration of the MPOO.
+
+The GO prepares the readmission of the measuring point.
+
+Optionally , the GO may oblige the MPOO to continue the operations.
+
+If the GO binds the MPOO to continue the operation , the MPOO confirmes the continuation to the MPOO.
+
+The GO performs the equipment acquisition and / or equipment changes.
+
+The GO assigns the GO as MPO.
+
+The GO informs the MPOO about the end of the assignment of the MPOO and the beginning of the assignment of the GO.
+
+The GO informs the MSPO about the assignment of the GO.
+
+The GO informs the SP about the assignment of the GO .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.4 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.4
new file mode 100644
index 0000000000000000000000000000000000000000..d20303d1995a6980deb8f8e7f7416fdb18d710ea
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.4
@@ -0,0 +1,17 @@
+The MPON notifies the MPOO about equipment change intentions.
+
+The MPOO announces self dismounting to the MPON or the MPOO shall notify the MPON about no self-dismounting of the MPOO.
+
+The MPON or the MPOO perform the final reading.
+
+The MPON or the MPOO dismount the old equipment.
+
+The MPON mounts the new device.
+
+The MPON reads the meter count from the installed meter.
+
+The MPON sents the values of the final reading to the GO.
+
+The MPON tells the GO about the device changes , the master data and the meter count at installation.
+
+The GO shall notify the MSP about the device changes , the master data , the meter count at dismounting , and the meter count at installation .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.5 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.5
new file mode 100644
index 0000000000000000000000000000000000000000..2fe3c6a700a51f32903134f3ad64c33293065edc
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.5
@@ -0,0 +1,7 @@
+The MPON requests a device takeover bid of the MPOO.
+
+The MPOO sends a tender for the equipment takeover to the MPON.
+
+The MPON places an order at the MPOO.
+
+The MPOO confirms the order of the MPON and sends the master data .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.6 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.6
new file mode 100644
index 0000000000000000000000000000000000000000..adc435faf6d71ffa61e35f1af33029d598f12b9b
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.6
@@ -0,0 +1,5 @@
+The MSPN sents a dismissal to the MSPO.
+
+The MSPO reviews the dismissal.
+
+The MSPO rejects the dismissal of the MSPN or The MSPO confirms the dismissal of the MSPN .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.7 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.7
new file mode 100644
index 0000000000000000000000000000000000000000..51891b673f9b31d29726ae426c159fe1d42f6dba
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.7
@@ -0,0 +1,13 @@
+The MSPN registers the measurement at the GO.
+
+The GO examines the application of the MSPN.
+
+The GO rejects the application of the MSPN or the GO confirmes the application of the MSPN.
+
+The GO assigns the MSPN.
+
+The GO informs the MSPO about the assignment of MSPN.
+
+The GO informs the MPO about the assignment of the MSPN.
+
+The GO informs the SP about the assignment of MSPN .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.8 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.8
new file mode 100644
index 0000000000000000000000000000000000000000..aaf276ac9cd3896579e92bb737bc90899502a1c1
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.8
@@ -0,0 +1,13 @@
+The MSPO deregisters at the GO.
+
+The GO verifies the deregistration.
+
+The GO rejects the deregistration of the MSPO or the GO preliminarily confirms the deregistration of the MSPO.
+
+The GO assigns himself as MSP.
+
+The GO informs the MSPO about the end of the assignment and the beginning of the assignment of the GO.
+
+The GO informs the MPO about the assignment of the GO.
+
+The GO informs the SP about the assignment of the GO .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.9 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.9
new file mode 100644
index 0000000000000000000000000000000000000000..184d4b38c46c93f30c79398aa358ec9b7f581895
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-10.9
@@ -0,0 +1,9 @@
+The SP / PU / GO request changes to the MPO or the MPO himself causes a change.
+
+The MPO reviews the change request.
+
+The MPO rejects the change of the measuring point by the SP / PU / GO or the MPO confirmes the request of the SP / PU / GO.
+
+The MPO performs the measuring point change.
+
+The MPO reports the implementation to the SP / PU / GO or notifies the SP / PU / GO about the failure of the changes .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-2.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-2.1
new file mode 100644
index 0000000000000000000000000000000000000000..8d0a66a4c1701a9e7a26a8dc38c377447ca8d2d5
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-2.1
@@ -0,0 +1,79 @@
+At the beginning the customer perceives that her subscribed service has degraded.
+
+A list with all the problem parameters is then sent to the Customer Service department of TELECO.
+
+At the customer service an employee enters ( based on the received data ) a problem report into system T.
+
+. Then the problem report is compared to the customer SLA to identify what the extent and the details of the service degradation are.
+
+Based on this , the necessary counter measures are determined including their respective priorities.
+
+An electronic service then determines the significance of the customer based on information that has been collected during the history of the contractual relationship.
+
+In case the customer is premium , the process will link to an extra problem fix process ( this process will not be detailed here ).
+
+In case the customer is of certain significance which would affect the counter measures previously decided upon , the process goes back to re-prioritize these measures otherwise the process continues.
+
+Taking together the information ( i.e.
+
+contract commitment data + prioritized actions ) a detailed problem report is created.
+
+The detailed problem report is then sent to Service Management.
+
+Service Management deals on a first level with violations of quality in services that are provided to customers.
+
+After receiving the detailed problem report , Service management investigates whether the problem is analyzable at the level of their department or whether the problem may be located at Resource Provisioning.
+
+In case Service Management assesses the problem to be not analyzable by themselves , the detailed problem report is sent out to Resource Provisioning.
+
+If Service Management is sure they can analyze it , they perform the analysis and based on the outcome they create a trouble report that indicates the type of problem.
+
+After Resource Provisioning receives the detailed problem report , it is checked whether there are any possible problems.
+
+If no problems are detected , a notification about the normal service execution is created.
+
+If a problem is detected this will be analyzed by Resource Provisioning and a trouble report is created.
+
+Either trouble report or the normal execution notification will be included in a status report and sent back to Service Management.
+
+Service Management then prepares the final status report based on the received information.
+
+Subsequently it has to be determined what counter measures should be taken depending on the information in the final status report.
+
+Three alternative process paths may be taken.
+
+For the case that no problem was detected at all , the actual service performance is sent back to the Customer Service.
+
+For the case that minor corrective actions are required , Service Management will undertake corrective actions by themselves.
+
+Subsequently , the problem resolution report is created and then sent out to Customer Service.
+
+After sending , this process path of Service Management ends.
+
+For the case that automatic resource restoration from Resource Provisioning is required , Service Management must create a request for automatic resource restoration.
+
+This message is then sent to Resource Provisioning.
+
+Resource Provisioning has been on-hold and waiting for a restoration request but this must happen within 2 days after the status report was sent out , otherwise Resource Provisioning terminates the process.
+
+After the restoration request is received , all possible errors are tracked.
+
+Based on the tracked errors , all necessary corrective actions are undertaken by Resource Provisioning.
+
+Then a trouble-shooting report is created.
+
+This report is sent out to Service Management ; then the process ends.
+
+The trouble-shooting report is received by Service Management and this information goes then into the creation of the problem resolution report just as described for ii ).
+
+Customer Service either receives the actual service performance ( if there was no problem ) or the problem resolution report.
+
+Then , two concurrent activities are triggered , i.e.
+
+i ) a report is created for the customer which details the current service performance and the resolution of the problem , and ii ) an SLA violation rebate is reported to Billing & Collections who will adjust the billing.
+
+The report for the customer is sent out to her.
+
+After all three activities are completed the process ends within Customer Service.
+
+After the customer then receives the report about service performance and problem resolution from Customer Service , the process flow at the customer also ends .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-2.2 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-2.2
new file mode 100644
index 0000000000000000000000000000000000000000..54fc9cf6187fc51d5e8bebb07bae22e9e9d937df
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-2.2
@@ -0,0 +1,65 @@
+The process is initiated by a switch-over request.
+
+In doing so , the customer transmits his data to the customer service department of the company.
+
+Customer service is a shared service center between the departments Sales and Distribution.
+
+The customer data is received by customer service and based on this data a customer data object is entered into the CRM system.
+
+After customer data has been entered it should then be compared with the internal customer data base and checked for completeness and plausibility.
+
+In case of any errors these should be corrected on the basis of a simple error list.
+
+The comparison of data is done to prevent individual customer data being stored multiple times.
+
+In case the customer does not exist in the customer data base , a new customer object is being created which will remain the data object of interest during the rest of the process flow.
+
+This object consists of data elements such as the customer's name and address and the assigned power gauge.
+
+The generated customer object is then used , in combination with other customer data to prepare the contract documents for the power supplier switch ( including data such as bank connection , information on the selected rate , requested date of switch-over ).
+
+In the following an automated check of the contract documents is carried out within the CIS ( customer information system ) in order to confirm their successful generation.
+
+In case of a negative response , i.e.
+
+the contract documents are not ( or incorrectly ) generated , the causing issues are being analyzed and resolved.
+
+Subsequently the contract documents are generated once again.
+
+In case of a positive response a confirmation document is sent out to the customer stating that the switch-over to the new supplier can be executed.
+
+A request to the grid operator is automatically sent out by the CIS.
+
+It puts the question whether the customer may be supplied by the selected supplier in the future.
+
+The switch-over request is checked by the grid operator for supplier concurrence , and the grid operator transmits a response comment.
+
+In the case of supplier concurrence the grid operator would inform all involved suppliers and demand the resolution of the conflict.
+
+The grid operator communicates with the old supplier and carries out the termination of the sales agreement between the customer and the old supplier ( i.e.
+
+the customer service ( of the new supplier ) does not have to interact with the old supplier regarding termination ).
+
+If there are not any objections by the grid operator ( i.e.
+
+no supplier concurrence ) , customer service creates a CIS contract.
+
+The customer then has the chance to check the contract details and based on this check may decide to either withdraw from the switch contract or confirm it.
+
+Depending on the customer's acceptance / rejection the process flow at customer service either ends ( in case of withdrawal ) or continues ( in case of a confirmation ).
+
+An additional constraint is that the customer can only withdraw from the offered contract within 7 days after the 7th day the contract will be regarded as accepted and the process continues.
+
+The confirmation message by the customer is therefore not absolutely necessary ( as it will count as accepted after 7 days in any way ) but it can speed up the switch process.
+
+On the switch-date , but no later than 10 days after power supply has begun , the grid operator transmits the power meter data to the customer service and the old supplier via messages containing a services consumption report.
+
+At the same time , the grid operator computes the final billing based on the meter data and sends it to the old supplier.
+
+Likewise the old supplier creates and sends the final billing to the customer.
+
+For the customer as well as the grid operator the process ends then.
+
+After receiving the meter data customer service imports the meter data to systems that require the information.
+
+The process of winning a new customer ends here .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.1
new file mode 100644
index 0000000000000000000000000000000000000000..368dcf1d2c37ef45c9d88b679bd7c5ff03fc4108
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.1
@@ -0,0 +1,13 @@
+The party sends a warrant possession request asking a warrant to be released.
+
+The Client Service Back Office as part of the Small Claims Registry Operations receives the request and retrieves the SCT file.
+
+Then , the SCT Warrant Possession is forwarded to Queensland Police.
+
+The SCT physical file is stored by the Back Office awaiting a report to be sent by the Police.
+
+When the report is received , the respective SCT file is retrieved.
+
+Then , Back Office attaches the new SCT document , and stores the expanded SCT physical file.
+
+After that , some other MC internal staff receives the physical SCT file ( out of scope ) .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.2 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.2
new file mode 100644
index 0000000000000000000000000000000000000000..6e4d0dfb5eccb8a20a52b145724edfaab84fe7ad
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.2
@@ -0,0 +1,7 @@
+Each morning , the files which have yet to be processed need to be checked , to make sure they are in order for the court hearing that day.
+
+If some files are missing , a search is initiated , otherwise the files can be physically tracked to the intended location.
+
+Once all the files are ready , these are handed to the Associate , and meantime the Judgeis Lawlist is distributed to the relevant people.
+
+Afterwards , the directions hearings are conducted .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.3 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.3
new file mode 100644
index 0000000000000000000000000000000000000000..fc5f61fd5160aa75c70126648b5db475e5e6e175
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.3
@@ -0,0 +1,9 @@
+After a claim is registered , it is examined by a claims officer.
+
+The claims officer then writes a settlement recommendation.
+
+This recommendation is then checked by a senior claims officer who may mark the claim as OK or Not OK.
+
+If the claim is marked as Not OK , it is sent back to the claims officer and the recommendation is repeated.
+
+If the claim is OK , the claim handling process proceeds .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.5 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.5
new file mode 100644
index 0000000000000000000000000000000000000000..38651596b6d7f2db93ef8d571e22a2d9d35e4ed0
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.5
@@ -0,0 +1,17 @@
+Mail from the party is collected on a daily basis by the Mail Processing Unit.
+
+Within this unit , the Mail Clerk sorts the unopened mail into the various business areas.
+
+The mail is then distributed.
+
+When the mail is received by the Registry , it is opened and sorted into groups for distribution , and thus registered in a manual incoming Mail Register.
+
+Afterwards , the Assistant Registry Manager within the Registry performs a quality check.
+
+If the mail is not compliant , a list of requisition explaining the reason for rejection is compiled and sent back to the party.
+
+Otherwise , the matter details ( types of action ) are captured and provided to the Cashier , who takes the applicable fees attached to the mail.
+
+At this point , the Assistant Registry Manager puts the receipt and copied documents into an envelope and posts it to the party.
+
+Meantime , the Cashier captures the Party Details and prints the Physical Court File .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.6 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.6
new file mode 100644
index 0000000000000000000000000000000000000000..4f59b2984ce7b4f1d3fa1f65ef66cd5f88f61530
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.6
@@ -0,0 +1,15 @@
+When a claim is received , it is first checked whether the claimant is insured by the organization.
+
+If not , the claimant is informed that the claim must be rejected.
+
+Otherwise , the severity of the claim is evaluated.
+
+Based on the outcome ( simple or complex claims ) , relevant forms are sent to the claimant.
+
+Once the forms are returned , they are checked for completeness.
+
+If the forms provide all relevant details , the claim is registered in the Claims Management system , which ends the Claims Notification process.
+
+Otherwise , the claimant is informed to update the forms.
+
+Upon reception of the updated forms , they are checked again .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.7 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.7
new file mode 100644
index 0000000000000000000000000000000000000000..cd679b25095aca40a7ac52d0222cedd8e29a38d0
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.7
@@ -0,0 +1,9 @@
+The Police Report related to the car accident is searched within the Police Report database and put in a file together with the Claim Documentation.
+
+This file serves as input to a claims handler who calculates an initial claim estimate.
+
+Then , the claims handler creates an Action Plan based on an Action Plan Checklist available in the Document Management system.
+
+Based on the Action Plan , a claims manager tries to negotiate a settlement on the claim estimate.
+
+The claimant is informed of the outcome , which ends the process .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.8 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.8
new file mode 100644
index 0000000000000000000000000000000000000000..85e70d2fe06c47f7d8641dce432a2645c151ca21
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-3.8
@@ -0,0 +1,13 @@
+The process starts when a customer submits a claim by sending in relevant documentation.
+
+The Notification department at the car insurer checks the documents upon completeness and registers the claim.
+
+Then , the Handling department picks up the claim and checks the insurance.
+
+Then , an assessment is performed.
+
+If the assessment is positive , a garage is phoned to authorise the repairs and the payment is scheduled ( in this order ).
+
+Otherwise , the claim is rejected.
+
+In any case ( whether the outcome is positive or negative ) , a letter is sent to the customer and the process is considered to be complete .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-4.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-4.1
new file mode 100644
index 0000000000000000000000000000000000000000..3cca0cf1a5421ec92ef38e22c09946ba5b73d8ef
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-4.1
@@ -0,0 +1,79 @@
+The intake workflow starts with a notice by telephone at the secretarial office of the mental health care institute.
+
+This notice is done by the family doctor of somebody who is in need of mental treatment.
+
+The secretarial worker inquires after the name and residence of the patient.
+
+On the basis of this information , the doctor is put through to the nursing officer responsible for the part of the region that the patient lives in.
+
+The nursing officer makes a full inquiry into the mental , health , and social state of the patient in question.
+
+This information is recorded on a registration form.
+
+At the end of the conversation , this form is handed in at the secretarial office of the institute.
+
+Here , the information on the form is stored in the information system and subsequently printed.
+
+For new patients , a patient file is created.
+
+The registration form as well as the print from the information system are stored in the patient file.
+
+Patient files are kept at the secretarial office and may not leave the building.
+
+At the secretarial office , two registration cards are produced for respectively the future first and second intaker of the patient.
+
+The registration card contains a set of basic patient data.
+
+The new patient is added on the list of new notices.
+
+Halfway the week , at Wednesday , a staff meeting of the entire medical team takes place.
+
+The medical team consists of social-medical workers , physicians , and a psychiatrist.
+
+At this meeting , the team-leader assigns all new patients on the list of new notices to members of the team.
+
+Each patient will be assigned to a social-medical worker , who will act as the first intaker of the patient.
+
+One of the physicians will act as the second intaker.
+
+In assigning intakers , the teamleader takes into account their expertise , the region they are responsible for , earlier contacts they might have had with the patient , and their case load.
+
+The assignments are recorded on an assignment list which is handed to the secretarial office.
+
+For each new assignment , it is also determined whether the medical file of the patient is required.
+
+This information is added to the assignment list.
+
+The secretarial office stores the assignment of each patient of the assignment list in the information system.
+
+It passes the produced registration cards to the first and second intaker of each newly assigned patient.
+
+An intaker keeps this registration with him at times when visiting the patient and in his close proximity when he is at the office.
+
+For each patient for which the medical file is required , the secretarial office prepares and sends a letter to the family doctor of the patient , requesting for a copy of the medical file.
+
+As soon as this copy is received , the secretarial office will inform the second intaker and add the copy to the patient file.
+
+The first intaker plans a meeting with the patient as soon as this is possible.
+
+During the first meeting , the patient is examined using a standard checklist which is filled out.
+
+Additional observations are registered in a personal notebook.
+
+After a visit , the first intaker puts a copy of these notes in the file of a patient.
+
+The standard checklist is also added to the patient's file.
+
+The second intaker plans the first meeting only after the medical information of the physician if required has been received.
+
+Physicians use dictaphones to record their observations made during meetings with patients.
+
+The secretarial office types out these tapes , after which the information is added to the patient file.
+
+As soon as the meetings of the first and second intaker with the patient have taken place , the secretarial office puts the patient on the list of patients that reach this status.
+
+For the staff meeting on Wednesday , they provide the team-leader with a list of these patients.
+
+For each of these patients , the first and second intaker together with the team-leader and the attending psychiatrist formulate a treatment plan.
+
+This treatment plan formally ends the intake procedure .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.1
new file mode 100644
index 0000000000000000000000000000000000000000..387fe5f00457b53fd6ce6cfc734e6bc7323eca1b
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.1
@@ -0,0 +1,11 @@
+The loan approval process starts by receiving a customer request for a loan amount.
+
+The risk assessment Web service is invoked to assess the request.
+
+If the loan is small and the customer is low risk , the loan is approved.
+
+If the customer is high risk , the loan is denied.
+
+If the customer needs further review or the loan amount is for $10,000 or more , the request is sent to the approver Web service.
+
+The customer receives feedback from the assessor or approver .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.2 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.2
new file mode 100644
index 0000000000000000000000000000000000000000..2e41b548c7d36b6be3ded7e22b70a79959706f3b
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.2
@@ -0,0 +1,9 @@
+The process of Vacations Request starts when any employee of the organization submits a vacation request.
+
+Once the requirement is registered , the request is received by the immediate supervisor of the employee requesting the vacation.
+
+The supervisor must approve or reject the request.
+
+If the request is rejected , the application is returned to the applicant / employee who can review the rejection reasons.
+
+If the request is approved a notification is generated to the Human Resources Representative , who must complete the respective management procedures .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.3 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.3
new file mode 100644
index 0000000000000000000000000000000000000000..e64cb6a5944293958c412f15ca39653a98b947eb
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.3
@@ -0,0 +1,19 @@
+The process of an Office Supply Request starts when any employee of the organization submits an office supply request.
+
+Once the requirement is registered , the request is received by the immediate supervisor of the employee requesting the office supplies.
+
+The supervisor must approve or ask for a change , or reject the request.
+
+If the request is rejected the process will end.
+
+If the request is asked to make a change then it is returned to the petitioner / employee who can review the comments for the change request.
+
+If the request is approved it will go to the purchase department that will be in charge of making quotations ( using a subprocess ) and select a vendor.
+
+If the vendor is not valid in the system the purchase department will have to choose a different vendor.
+
+After a vendor is selected and confirmed , the system will generate and send a purchase order and wait for the product to be delivered and the invoice received.
+
+In any case the system will send a notification to let the user know what the result was.
+
+In any of the cases , approval , rejection or change required the system will send the user a notification .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.4 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.4
new file mode 100644
index 0000000000000000000000000000000000000000..5fd1716a3f607aae14e4d5dec61c08954a601fc2
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-5.4
@@ -0,0 +1,31 @@
+An employee purchases a product or service he requires.
+
+For instance , a sales person on a trip rents a car.
+
+The employee submits an expense report with a list of items , along with the receipts for each item.
+
+A supervisor reviews the expense report and approves or rejects the report.
+
+Since the company has expense rules , there are circumstances where the supervisor can accept or reject the report upon first inspection.
+
+These rules could be automated , to reduce the workload on the supervisor.
+
+If the supervisor rejects the report , the employee , who submitted it , is given a chance to edit it , for example to correct errors or better describe an expense.
+
+If the supervisor approves the report , it goes to the treasurer.
+
+The treasurer checks that all the receipts have been submitted and match the items on the list.
+
+If all is in order , the treasurer accepts the expenses for processing ( including , e.g.
+
+, payment or refund , and accounting ).
+
+If receipts are missing or do not match the report , he sends it back to the employee.
+
+If a report returns to the employee for corrections , it must again go to a supervisor , even if the supervisor previously approved the report.
+
+If the treasurer accepts the expenses for processing , the report moves to an automatic activity that links to a payment system.
+
+The process waits for the payment confirmation.
+
+After the payment is confirmed , the process ends .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.1
new file mode 100644
index 0000000000000000000000000000000000000000..3091da445778be00519708f9a32081f98badbf3e
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.1
@@ -0,0 +1,37 @@
+As a basic principle , ACME AG receives invoices on paper or fax.
+
+These are received by the Secretariat in the central inbox and forwarded after a short visual inspection to an accounting employee.
+
+In `` ACME Financial Accounting `` , a software specially developed for the ACME AG , she identifies the charging suppliers and creates a new instance ( invoice ).
+
+She then checks the invoice items and notes the corresponding cost center at the ACME AG and the related cost center managers for each position on a separate form ( `` docket `` ).
+
+The docket and the copy of the invoice go to the internal mail together and are sent to the first cost center manager to the list.
+
+He reviews the content for accuracy after receiving the copy of the invoice.
+
+Should everything be in order , he notes his code one on the docket ( `` accurate position - AP `` ) and returns the copy of the invoice to the internal mail.
+
+From it , the copy of the invoice is passed on to the next cost center manager , based on the docket , or if all items are marked correct , sent back to accounting.
+
+Therefore , the copy of invoice and the docket gradually move through the hands of all cost center managers until all positions are marked as completely accurate.
+
+However , if inconsistencies exist , e.g.
+
+because the ordered product is not of the expected quantity or quality , the cost center manager rejects the AP with a note and explanatory statement on the docket , and the copy of the invoice is sent back to accounting directly.
+
+Based on the statements of the cost center managers , she will proceede with the clarification with the vendor , but , if necessary , she consults the cost center managers by telephone or e-mail again.
+
+When all inconsistencies are resolved , the copy of the invoice is sent to the cost center managers again , and the process continues.
+
+After all invoice items are AP , the accounting employee forwards the copy of the invoice to the commercial manager.
+
+He makes the commercial audit and issues the approval for payment.
+
+If the bill amount exceeds EUR 20 , the Board wants to check it again ( 4 - eyes-principle ).
+
+The copy of the invoice including the docket moves back to the accounting employee in the appropriate signature file.
+
+Should there be a complaint during the commercial audit , it will be resolved by the accounting employee with the supplier.
+
+After the commercial audit is successfully completed , the accounting employee gives payment instructions and closes the instance in `` ACME financial accounting `` .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.2 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.2
new file mode 100644
index 0000000000000000000000000000000000000000..7a2b69edd2c307c22b9cd606144697d6cafc870e
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.2
@@ -0,0 +1,9 @@
+The process starts periodically on the first of each month , when Assembler AG places an order with the supplier in order to request more product parts.
+
+a ) Assembler AG sends the order to the supplier.
+
+b ) The supplier processes the order.
+
+c ) The supplier sends an invoice to Assembler AG.
+
+d ) Assembler AG receives the invoice .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.3 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.3
new file mode 100644
index 0000000000000000000000000000000000000000..be120e59ea1820101d2fa60d98eab1c240958231
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.3
@@ -0,0 +1,17 @@
+Every time we get a new order from the sales department , first , one of my masters determines the necessary parts and quantities as well as the delivery date.
+
+Once that information is present , it has to be entered into our production planning system ( PPS ).
+
+It optimizes our production processes and creates possibly uniform work packages so that the setup times are minimized.
+
+Besides , it creates a list of parts to be procured.
+
+Unfortunately it is not coupled correctly to our Enterprise Resource Planning system ( ERP ) , so the data must be transferred manually.
+
+By the way , that is the second step.
+
+Once all the data is present , we need to decide whether any parts are missing and must be procured or if this is not necessary.
+
+Once production is scheduled to start , we receive a notice from the system and an employee takes care of the implementation.
+
+Finally , the order will be checked again for its quality .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.4 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.4
new file mode 100644
index 0000000000000000000000000000000000000000..b49728d946090d8c35e564e20cd99b1703289efa
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-6.4
@@ -0,0 +1,27 @@
+The first step is to determine contact details of potential customers.
+
+This can be achieved in several ways.
+
+Sometimes , we buy details for cold calls , sometimes , our marketing staff participates in exhibitions and sometimes , you just happen to know somebody , who is interested in the product.
+
+Then we start calling the customer.
+
+That is done by the call center staff.
+
+They are determining the contact person and the budget which would be available for the project.
+
+Of course , asking the customer whether he is generally interested is also important.
+
+If this is not the case , we leave him alone , except if the potential project budget is huge.
+
+Then the head of development personally tries to acquire the customer.
+
+If the customer is interested in the end , the next step is a detailed online presentation.
+
+It is given either by a sales representative or by a pre-sales employee in case of a more technical presentation.
+
+Afterwards we are waiting for the customer to come back to us.
+
+If we are not contacted within 2 weeks , a sales representative is calling the customer.
+
+The last phase is the creation of a quotation .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-7.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-7.1
new file mode 100644
index 0000000000000000000000000000000000000000..2e2af1ea6b329a9eaf1ca540a516ff92d07c61bf
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-7.1
@@ -0,0 +1,13 @@
+First , the Manager checks the open leads.
+
+Afterwards , he selects the top five ones.
+
+He then tells his Sales Assistant to call the contact person of the leads.
+
+The Sales Assistant calls each customer.
+
+If someone is interested , he sends a note to the Manager.
+
+The Manager then processes the lead.
+
+Otherwise , he calls the next customer .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-8.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-8.1
new file mode 100644
index 0000000000000000000000000000000000000000..a4519a23568c17ed5a05fea063b9c38257545bf7
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-8.1
@@ -0,0 +1,5 @@
+The process is triggered by the demand of a functional department to fill a post.
+
+The post is advertised , applicants apply , the applications are checked and the post is filled.
+
+The process finishes when the post was filled , precisely through the conclusion of a contract of employment .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-8.2 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-8.2
new file mode 100644
index 0000000000000000000000000000000000000000..134082b628c2220decfd38acea02535226b5cc09
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-8.2
@@ -0,0 +1,13 @@
+I am the HR clerk.
+
+When a vacancy is reported to me , I create a job description from the information.
+
+Sometimes there is still confusion in the message , then I must ask the Department again.
+
+I am submitting the job description for consideration and waiting for the approval.
+
+But , it can also happen that the department does not approve it , but rejects it , and requests a correction.
+
+Then I correct the description and submit it again for consideration.
+
+If the description is finally approved , I post the job .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-8.3 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-8.3
new file mode 100644
index 0000000000000000000000000000000000000000..516df82d6b0eef9a6d13abd5cbcfdf6f764283d6
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-8.3
@@ -0,0 +1,11 @@
+I am the Head of the functional department.
+
+When I have detected a number of personnel requirements , I report the vacancy to the Personnel Department.
+
+Then I wait to get the job description for review before it is advertized.
+
+Under certain circumstances , I must ask for corrections again , otherwise I approve the job description.
+
+Sometimes it also happens that the colleague from the HR department still has questions about the tasks and requirements before he can describe the job.
+
+Then I am available for clarifications , of course .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.1 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.1
new file mode 100644
index 0000000000000000000000000000000000000000..ee22b5dfc646b8792862435e62d473d361e9e53e
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.1
@@ -0,0 +1,15 @@
+Every weekday morning , the database is backed up and then it is checked to see whether the Account Defaulter table has new records.
+
+If no new records are found , then the process should check the CRM system to see whether new returns have been filed.
+
+If new returns exist , then register all defaulting accounts and customers.
+
+If the defaulting client codes have not been previously advised , produce another table of defaulting accounts and send to account management.
+
+All of this must be completed by 2 : 30 pm , if it is not , then an alert should be sent to the supervisor.
+
+Once the new defaulting account report has been completed , check the CRM system to see whether new returns have been filed.
+
+If new returns have been filed , reconcile with the existing account defaulters table.
+
+This must be completed by 4 : 0 pm otherwise a supervisor should be sent a message .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.2 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.2
new file mode 100644
index 0000000000000000000000000000000000000000..97b2d9578017a50f846b023aa29bbdb88e689aa1
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.2
@@ -0,0 +1,9 @@
+The Customer Service Representative sends a Mortgage offer to the customer and waits for a reply.
+
+If the customer calls or writes back declining the mortgage , the case details are updated and the work is then archived prior to cancellation.
+
+If the customer sends back the completed offer documents and attaches all prerequisite documents then the case is moved to administration for completion.
+
+If all pre-requisite documents are not provided a message is generated to the customer requesting outstanding documents.
+
+If no answer is received after 2 weeks , the case details are updated prior to archive and cancellation .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.3 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.3
new file mode 100644
index 0000000000000000000000000000000000000000..ac2dc4a43810115703df1ebf657bc1602d0771a6
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.3
@@ -0,0 +1,7 @@
+In November of each year , the Coordination Unit at the Town Planning Authority drafts a schedule of meetings for the next calendar year and adds draft dates to all calendars.
+
+The Support Officer then checks the dates and suggests modifications.
+
+The Coordination Unit then rechecks all dates and looks for potential conflicts.
+
+The final schedule of meeting dates is sent to all the independent Committee Members by email , who then check their diaries and advise the Coordination Unit of any conflicts .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.4 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.4
new file mode 100644
index 0000000000000000000000000000000000000000..2e7879146b9667733f04dafa02feccb9cdf27bbe
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.4
@@ -0,0 +1,9 @@
+Once the dates are finalized ( by the Coordination Unit ) , the Support Officer updates all group calendars and creates meeting folders for each meeting and ensures all appropriate documents are uploaded to system.
+
+Committee Members are advised a week before each meeting to read all related documents.
+
+The Committee Members hold their meeting , and the Support Office then produces minutes including any Action Points for each Committee Member.
+
+Within 5 working days , the Coordination Unit must conduct a QA check on the minutes , which are then sent to all Committee Members.
+
+The Support Officer then updates all departmental records .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.5 b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.5
new file mode 100644
index 0000000000000000000000000000000000000000..850d0c5f0d8a98f30c905129df3a890a91a56565
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/PET/doc-9.5
@@ -0,0 +1,13 @@
+After the Expense Report is received , a new account must be created if the employee does not already have one.
+
+The report is then reviewed for automatic approval.
+
+Amounts under $200 are automatically approved , whereas amounts equal to or over $200 require approval of the supervisor.
+
+In case of rejection , the employee must receive a rejection notice by email.
+
+Otherwise , the reimbursement goes to the employees direct deposit bank account.
+
+If the request is not completed in 7 days , then the employee must receive an approval in progress email.
+
+If the request is not finished within 30 days , then the process is stopped and the employee receives an email cancellation notice and must re-submit the expense report .
\ No newline at end of file
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/abstractions/log_to_acti_summary.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/abstractions/log_to_acti_summary.py
new file mode 100644
index 0000000000000000000000000000000000000000..8ad8a80bab203764145496bd8d7170609e20c8d2
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/abstractions/log_to_acti_summary.py
@@ -0,0 +1,132 @@
+import pm4py
+from pm4py.objects.conversion.log import converter as log_converter
+from typing import Union, Optional, Dict, Any
+from pm4py.objects.log.obj import EventLog, EventStream
+from enum import Enum
+from pm4py.util import exec_utils, constants, xes_constants
+from pm4py.statistics.service_time.pandas import get as service_time_get
+from pm4py.statistics.eventually_follows.pandas import get as eventually_follows
+import pandas as pd
+import pandas
+
+
+class Parameters(Enum):
+ MAX_LEN: str = "max_len"
+ RESPONSE_HEADER: str = "response_header"
+ PERFORMANCE_AGGREGATION: str = "performance_aggregation"
+ ACTIVITY_KEY = constants.PARAMETER_CONSTANT_ACTIVITY_KEY
+ TIMESTAMP_KEY = constants.PARAMETER_CONSTANT_TIMESTAMP_KEY
+ START_TIMESTAMP_KEY = constants.PARAMETER_CONSTANT_START_TIMESTAMP_KEY
+ CASE_ID_KEY = constants.PARAMETER_CONSTANT_CASEID_KEY
+
+
+def apply(log_obj: Union[EventLog, EventStream, pd.DataFrame],
+ parameters: Optional[Dict[Union[str, Parameters], Any]] = None) -> str:
+ """
+ Provides an abstraction of the activities' frequency and performance.
+
+ Minimum Viable Example:
+
+ import pm4py
+ from pm4py.algo.querying.llm.abstractions import log_to_acti_summary
+
+ log = pm4py.read_xes("tests/input_data/receipt.xes")
+ print(log_to_acti_summary.apply(log))
+
+ Example output:
+
+ Below you find the top activities of the event log, specified with their total number of occurrences, the number of cases in which they occur, an aggregation of the service time, an aggregation of the times from the preceding activities and to the succeeding activities.
+
+ Confirmation of receipt [tot.occ=1434; num.cases=1434; service time=0.00 s; time from prec.=0.00 s; time to succ.=76014.05 s]
+ T02 Check confirmation of receipt [tot.occ=1368; num.cases=1316; service time=0.00 s; time from prec.=100581.24 s; time to succ.=44701.62 s]
+ T06 Determine necessity of stop advice [tot.occ=1416; num.cases=1309; service time=0.00 s; time from prec.=186313.29 s; time to succ.=44757.08 s]
+ T04 Determine confirmation of receipt [tot.occ=1307; num.cases=1303; service time=0.00 s; time from prec.=36815.50 s; time to succ.=65668.55 s]
+
+
+ Parameters
+ ---------------
+ log_obj
+ Log object
+ parameters
+ Optional parameters of the algorithm, including:
+ - Parameters.MAX_LEN => desidered length of the textual abstraction
+ - Parameters.RESPONSE_HEADER => includes an header in the textual abstraction, which explains the context
+ - Parameters.PERFORMANCE_AGGREGATION => performance metric to be used to express the performance (e.g., mean). Available options: mean, median, stdev, min, max, sum
+ - Parameters.ACTIVITY_KEY => the attribute of the log to be used as activity
+ - Parameters.TIMESTAMP_KEY => the attribute of the log to be used as timestamp
+ - Parameters.CASE_ID_KEY => the attribute of the log to be used as case identifier
+
+ Returns
+ --------------
+ textual_abstraction
+ Textual abstraction of the activities frequency and of their performance.
+ """
+ if parameters is None:
+ parameters = {}
+
+ response_header: bool = exec_utils.get_param_value(Parameters.RESPONSE_HEADER, parameters, True)
+ max_len = exec_utils.get_param_value(Parameters.MAX_LEN, parameters, constants.OPENAI_MAX_LEN)
+
+ activity_key = exec_utils.get_param_value(Parameters.ACTIVITY_KEY, parameters, xes_constants.DEFAULT_NAME_KEY)
+ timestamp_key = exec_utils.get_param_value(Parameters.TIMESTAMP_KEY, parameters,
+ xes_constants.DEFAULT_TIMESTAMP_KEY)
+ start_timestamp_key = exec_utils.get_param_value(Parameters.START_TIMESTAMP_KEY, parameters,
+ xes_constants.DEFAULT_TIMESTAMP_KEY)
+ case_id_key = exec_utils.get_param_value(Parameters.CASE_ID_KEY, parameters, constants.CASE_CONCEPT_NAME)
+ performance_aggregation: str = exec_utils.get_param_value(Parameters.PERFORMANCE_AGGREGATION, parameters, "mean")
+
+ log_obj = log_converter.apply(log_obj, variant=log_converter.Variants.TO_DATA_FRAME, parameters=parameters)
+ log_obj = log_obj[list({activity_key, timestamp_key, start_timestamp_key, case_id_key})]
+
+ num_occ = log_obj[activity_key].value_counts().to_dict()
+ num_cases = log_obj.groupby([case_id_key, activity_key]).first().reset_index()[
+ activity_key].value_counts().to_dict()
+
+ parameters["aggregationMeasure"] = performance_aggregation
+ service_times: dict[str, float] = service_time_get.apply(log_obj, parameters=parameters)
+
+ dir_follo_dataframe = eventually_follows.get_partial_order_dataframe(log_obj.copy(), activity_key=activity_key,
+ start_timestamp_key=start_timestamp_key,
+ timestamp_key=timestamp_key,
+ case_id_glue=case_id_key,
+ sort_caseid_required=False,
+ sort_timestamp_along_case_id=False,
+ reduce_dataframe=False)
+
+ post_times = dir_follo_dataframe.groupby(activity_key)[constants.DEFAULT_FLOW_TIME].agg(
+ performance_aggregation).to_dict()
+ pre_times = dir_follo_dataframe.groupby(activity_key + "_2")[constants.DEFAULT_FLOW_TIME].agg(
+ performance_aggregation).to_dict()
+
+ activities_list = []
+ for act in num_occ:
+ activities_list.append({"activity": act, "num_occ": num_occ[act], "num_cases": num_cases[act],
+ "agg_service_time": service_times[act] if act in service_times else 0.0,
+ "agg_pre_times": pre_times[act] if act in pre_times else 0.0,
+ "agg_post_times": post_times[act] if act in post_times else 0.0})
+
+ activities_list = sorted(activities_list, key=lambda x: (x["num_cases"], x["num_occ"], x["activity"]), reverse=True)
+
+ ret: str = "\n\n"
+
+ if response_header:
+ ret += "Below you find the top activities of the event log, specified with their total number of occurrences, the number of cases in which they occur, an aggregation of the service time, an aggregation of the times from the preceding activities and to the succeeding activities.\n\n"
+
+ for dct in activities_list:
+ ths = "%s [tot.occ=%d; num.cases=%d; service time=%.2f s; time from prec.=%.2f s; time to succ.=%.2f s]\n" % (
+ dct["activity"], dct["num_occ"], dct["num_cases"], dct["agg_service_time"], dct["agg_pre_times"],
+ dct["agg_post_times"])
+ if len(ret) + len(ths) < max_len:
+ ret = ret + ths
+ else:
+ break
+
+ ret += "\n\n"
+
+ return ret
+
+
+if __name__ == "__main__":
+ log: pandas.DataFrame = pm4py.read_xes("../../../tests/input_data/receipt.xes")
+ textual_abstraction = apply(log)
+ print(textual_abstraction)
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/abstractions/log_to_top_resources.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/abstractions/log_to_top_resources.py
new file mode 100644
index 0000000000000000000000000000000000000000..b260398c0c0ddcb5ebbee506ddbc1d5e61f19564
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/abstractions/log_to_top_resources.py
@@ -0,0 +1,148 @@
+from pm4py.objects.conversion.log import converter as log_converter
+from typing import Union, Optional, Dict, Any
+from pm4py.objects.log.obj import EventLog, EventStream
+from enum import Enum
+from pm4py.util import exec_utils, constants, xes_constants
+import pandas as pd
+import pm4py
+from copy import copy
+import pandas
+
+
+class Parameters(Enum):
+ MAX_LEN: str = "max_len"
+ RESPONSE_HEADER: str = "response_header"
+ DEFAULT_MIN_ACTIVITIES: str = "default_min_activities"
+ ACTIVITY_KEY = constants.PARAMETER_CONSTANT_ACTIVITY_KEY
+ RESOURCE_KEY = constants.PARAMETER_CONSTANT_RESOURCE_KEY
+
+
+def get_abstr_from_dict(ret, activities_dict, response_header):
+ """
+ Internal method to get the textual abstraction starting from the computations already performed.
+ """
+ abstr: list[str] = ["\n\n"]
+
+ if response_header:
+ abstr.append(
+ "In the following text, you find the top activities along with their number of occurrences in the event log and the number of unique resources performing them.")
+ abstr.append("The top resources for such activities are included.\n\n")
+
+ sort_act = sorted([(x, activities_dict[x][0], activities_dict[x][1], ret[x]) for x in ret],
+ key=lambda x: (x[1], x[2], x[0]), reverse=True)
+
+ for el in sort_act:
+ abstr.append("%s (num.occ=%d ; num.resources=%d)" % (el[0], el[1], el[2]))
+
+ if el[3]:
+ abstr.append(" top resources=[")
+
+ this_res = sorted([(x, y) for x, y in el[3].items()], key=lambda z: (z[1], z[0]), reverse=True)
+
+ for i in range(len(this_res)):
+ if i > 0:
+ abstr.append("; ")
+ abstr.append("%s=%d" % (this_res[i][0], this_res[i][1]))
+ abstr.append("]")
+
+ abstr.append("\n")
+
+ abstr.append("\n\n")
+
+ abstr1 = "".join(abstr)
+ return abstr1
+
+
+def apply(log: Union[EventLog, EventStream, pd.DataFrame], parameters: Optional[Dict[Any, Any]] = None) -> str:
+ """
+ Textually abstracts the top activities/resources combinations in the event log.
+
+
+ Minimum Viable Example:
+
+ import pm4py
+ from pm4py.algo.querying.llm.abstractions import log_to_resources
+
+
+ log = pm4py.read_xes("C:/receipt.xes")
+ res = log_to_resources.apply(log)
+ print(res)
+
+
+ Example output:
+
+ In the following text, you find the top activities along with their number of occurrences in the event log and the number of unique resources performing them.The top resources for such activities are included.
+
+ Confirmation of receipt (num.occ=1434 ; num.resources=41) top resources=[Resource01=195; admin2=114; Resource02=102; Resource03=87; Resource04=81; Resource07=78; Resource08=74; Resource06=70; Resource05=65; Resource11=58; Resource09=55; Resource15=51; Resource12=49; Resource13=47; Resource14=44; Resource17=43; Resource27=37; Resource16=35; Resource18=29; Resource10=21; Resource21=19; Resource20=18; Resource23=14; Resource22=12; Resource26=7; Resource25=7; Resource30=4; Resource33=2; Resource31=2; Resource29=2; Resource28=2; admin3=1; admin1=1; Resource43=1; Resource42=1; Resource38=1; Resource37=1; Resource36=1; Resource35=1; Resource34=1; Resource19=1]
+ T06 Determine necessity of stop advice (num.occ=1416 ; num.resources=34) top resources=[Resource01=203; Resource02=114; Resource04=85; Resource03=85; Resource05=84; Resource07=83; Resource08=75; Resource06=75; Resource11=74; Resource12=72; Resource09=67; Resource15=58; Resource13=53; Resource14=48; Resource17=43; Resource16=36; Resource18=28; admin2=20; Resource20=18; Resource21=16; Resource22=15; Resource23=14; Resource26=12; Resource25=12; Resource29=6; Resource28=6; Resource37=2; Resource35=2; Resource34=2; Resource33=2; Resource31=2; Resource30=2; test=1; Resource36=1]
+ T02 Check confirmation of receipt (num.occ=1368 ; num.resources=40) top resources=[Resource01=209; Resource02=95; Resource04=91; Resource03=86; Resource06=73; Resource08=65; Resource05=65; Resource19=64; Resource10=62; Resource13=55; Resource09=51; Resource07=50; Resource24=44; Resource12=44; Resource14=43; Resource16=36; Resource17=32; Resource15=32; Resource18=30; Resource11=30; Resource21=18; Resource20=18; Resource22=13; Resource23=12; admin2=9; Resource32=9; Resource25=6; Resource26=5; Resource28=4; Resource30=3; Resource39=2; Resource34=2; Resource31=2; Resource29=2; admin1=1; TEST=1; Resource38=1; Resource36=1; Resource35=1; Resource33=1]
+ T04 Determine confirmation of receipt (num.occ=1307 ; num.resources=37) top resources=[Resource10=240; Resource01=184; Resource03=81; Resource04=68; Resource02=67; Resource06=66; Resource19=61; Resource05=60; Resource07=58; Resource09=46; Resource14=41; Resource12=41; Resource13=40; Resource18=36; Resource16=36; Resource08=31; Resource11=29; Resource15=28; Resource20=18; Resource21=15; Resource17=13; Resource22=12; Resource23=11; admin2=3; Resource26=3; Resource25=3; admin3=2; admin1=2; Resource31=2; Resource29=2; Resource28=2; Resource38=1; Resource36=1; Resource35=1; Resource34=1; Resource33=1; Resource24=1]
+
+
+ Parameters
+ ----------------
+ log
+ Log object
+ parameters
+ Parameters of the algorithm, including:
+ - Parameters.ACTIVITY_KEY => the attribute to be used as activity
+ - Parameters.RESOURCE_KEY => the attribute to be used as resource
+ - Parameters.DEFAULT_MIN_ACTIVITIES => minimum number of different activities to include in the textual abstraction
+ - Parameters.ACTIVITY_KEY => attribute of the log to be used as activity
+ - Parameters.RESOURCE_KEY => attribute of the log to be used as resource
+
+ Returns
+ ----------------
+ textual_abstraction
+ Textual abstraction
+ """
+ if parameters is None:
+ parameters = {}
+
+ max_len = exec_utils.get_param_value(Parameters.MAX_LEN, parameters, constants.OPENAI_MAX_LEN)
+ response_header: bool = exec_utils.get_param_value(Parameters.RESPONSE_HEADER, parameters, True)
+ default_min_activities: int = exec_utils.get_param_value(Parameters.DEFAULT_MIN_ACTIVITIES, parameters, 15)
+ activity_key = exec_utils.get_param_value(Parameters.ACTIVITY_KEY, parameters, xes_constants.DEFAULT_NAME_KEY)
+ resource_key = exec_utils.get_param_value(Parameters.RESOURCE_KEY, parameters, xes_constants.DEFAULT_RESOURCE_KEY)
+
+ log = log_converter.apply(log, variant=log_converter.Variants.TO_DATA_FRAME, parameters=parameters)
+
+ activities = log[activity_key].value_counts().to_dict()
+ activities_unq_resources = log.groupby(activity_key)[resource_key].nunique().to_dict()
+ activities = [(x, y, activities_unq_resources[x]) for x, y in activities.items()]
+ activities_dict = {x[0]: (x[1], x[2]) for x in activities}
+
+ activities = sorted(activities, key=lambda z: (z[1], z[2], z[0]), reverse=True)
+
+ ret = {}
+ for i in range(min(len(activities), default_min_activities)):
+ new_ret = copy(ret)
+ new_ret[activities[i][0]] = {}
+
+ if len(get_abstr_from_dict(new_ret, activities_dict, response_header)) > max_len:
+ break
+
+ ret = new_ret
+
+ activities_resources = log.groupby([activity_key, resource_key]).size().to_dict()
+ activities_resources = sorted([(x, y) for x, y in activities_resources.items()], key=lambda z: (z[1], z[0]),
+ reverse=True)
+
+ for el in activities_resources:
+ new_ret = copy(ret)
+ if el[0][0] not in new_ret:
+ new_ret[el[0][0]] = {}
+ new_ret[el[0][0]][el[0][1]] = el[1]
+
+ if len(get_abstr_from_dict(new_ret, activities_dict, response_header)) > max_len:
+ break
+
+ ret = new_ret
+
+ return get_abstr_from_dict(ret, activities_dict, response_header)
+
+
+if __name__ == "__main__":
+ log: pandas.DataFrame = pm4py.read_xes("../../../tests/input_data/receipt.xes")
+ textual_abstraction = apply(log)
+ print(textual_abstraction)
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/abstractions/log_to_var_paths.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/abstractions/log_to_var_paths.py
new file mode 100644
index 0000000000000000000000000000000000000000..9add60ecd4b54cc21bd6e3bc309447642156bfec
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/abstractions/log_to_var_paths.py
@@ -0,0 +1,109 @@
+from pm4py.objects.conversion.log import converter as log_converter
+from typing import Union, Optional, Dict, Any
+from pm4py.objects.log.obj import EventLog, EventStream
+from enum import Enum
+from pm4py.util import exec_utils, constants, xes_constants
+import pm4py
+import pandas as pd
+import pandas
+
+
+class Parameters(Enum):
+ MAX_LEN: str = "max_len"
+ RESPONSE_HEADER: str = "response_header"
+ PERFORMANCE_AGGREGATION: str = "performance_aggregation"
+ ACTIVITY_KEY = constants.PARAMETER_CONSTANT_ACTIVITY_KEY
+ TIMESTAMP_KEY = constants.PARAMETER_CONSTANT_TIMESTAMP_KEY
+ CASE_ID_KEY = constants.PARAMETER_CONSTANT_CASEID_KEY
+
+
+def apply(log_obj: Union[EventLog, EventStream, pd.DataFrame], parameters: Optional[Dict[Any, Any]] = None) -> str:
+ """
+ Provides an abstraction of the paths performance for the process variants of the provided event log.
+
+ Minimum Viable Example:
+
+ import pm4py
+ from pm4py.algo.querying.llm.abstractions import log_to_var_paths
+
+ log = pm4py.read_xes("tests/input_data/receipt.xes")
+ print(log_to_var_paths.apply(log))
+
+
+ Example output:
+
+ Below your find a description of the top process variants of the event logs, along with their frequency. The paths of every reported variant are decorated with an aggregation (mean) of the performance of the path in the given variant.
+
+ Confirmation of receipt -(8064.44 s)-> T02 Check confirmation of receipt -(29250.98 s)-> T04 Determine confirmation of receipt -(218458.20 s)-> T05 Print and send confirmation of receipt -(39225.28 s)-> T06 Determine necessity of stop advice [frequency=713]
+ Confirmation of receipt -(3621.01 s)-> T06 Determine necessity of stop advice -(157907.57 s)-> T10 Determine necessity to stop indication -(116514.54 s)-> T02 Check confirmation of receipt -(144858.47 s)-> T04 Determine confirmation of receipt [frequency=123]
+ Confirmation of receipt -(79543.37 s)-> T02 Check confirmation of receipt -(169.38 s)-> T06 Determine necessity of stop advice -(144037.68 s)-> T10 Determine necessity to stop indication -(86823.89 s)-> T04 Determine confirmation of receipt [frequency=115]
+
+
+ Parameters
+ ---------------
+ log_obj
+ Log object
+ parameters
+ Optional parameters of the algorithm, including:
+ - Parameters.MAX_LEN => desidered length of the textual abstraction
+ - Parameters.RESPONSE_HEADER => includes an header in the textual abstraction, which explains the context
+ - Parameters.PERFORMANCE_AGGREGATION => performance metric to be used to express the performance (e.g., mean). Available options: mean, median, stdev, min, max, sum
+ - Parameters.ACTIVITY_KEY => the attribute of the log to be used as activity
+ - Parameters.TIMESTAMP_KEY => the attribute of the log to be used as timestamp
+ - Parameters.CASE_ID_KEY => the attribute of the log to be used as case identifier
+
+ Returns
+ --------------
+ textual_abstraction
+ Textual abstraction of the paths' performance for every process variant
+ """
+ if parameters is None:
+ parameters = {}
+
+ activity_key = exec_utils.get_param_value(Parameters.ACTIVITY_KEY, parameters, xes_constants.DEFAULT_NAME_KEY)
+ timestamp_key = exec_utils.get_param_value(Parameters.TIMESTAMP_KEY, parameters,
+ xes_constants.DEFAULT_TIMESTAMP_KEY)
+ case_id_key = exec_utils.get_param_value(Parameters.CASE_ID_KEY, parameters, constants.CASE_CONCEPT_NAME)
+ performance_aggregation: str = exec_utils.get_param_value(Parameters.PERFORMANCE_AGGREGATION, parameters, "mean")
+
+ response_header: bool = exec_utils.get_param_value(Parameters.RESPONSE_HEADER, parameters, True)
+ max_len = exec_utils.get_param_value(Parameters.MAX_LEN, parameters, constants.OPENAI_MAX_LEN)
+
+ log_obj = log_converter.apply(log_obj, variant=log_converter.Variants.TO_DATA_FRAME, parameters=parameters)
+
+ import pm4py.stats
+ var_paths0 = pm4py.stats.get_variants_paths_duration(log_obj, activity_key=activity_key,
+ timestamp_key=timestamp_key, case_id_key=case_id_key,
+ times_agg=performance_aggregation).to_dict(orient="records")
+ var_paths = []
+ for el in var_paths0:
+ if el["@@index_in_trace"] == 0:
+ var_paths.append([])
+ var_paths[-1].append(el)
+
+ ret: str = "\n\n"
+
+ if response_header:
+ ret += "Below your find a description of the top process variants of the event logs, along with their frequency. The paths of every reported variant are decorated with an aggregation (" + performance_aggregation + ") of the performance of the path in the given variant.\n\n"
+
+ for var in var_paths:
+ ths = var[0][activity_key]
+ for i in range(1, len(var)):
+ ths += " -(%.2f s)-> %s" % (var[i]["@@flow_time"], var[i][activity_key])
+
+ ths += " [frequency=%d]\n" % (var[0]["@@variant_count"])
+
+ if len(ret) + len(ths) < max_len:
+ ret = ret + ths
+ else:
+ break
+
+ ret = ret + "\n\n"
+
+ return ret
+
+
+if __name__ == "__main__":
+ log: pandas.DataFrame = pm4py.read_xes("../../../tests/input_data/receipt.xes")
+ textual_abstraction = apply(log)
+ print(textual_abstraction)
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/openai_stt_tss.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/openai_stt_tss.py
new file mode 100644
index 0000000000000000000000000000000000000000..d47554085753f2ac62b74dde9f40b5e54f485ffd
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm/openai_stt_tss.py
@@ -0,0 +1,226 @@
+from enum import Enum
+from typing import Optional, Dict, Any
+from pm4py.util import exec_utils, constants
+from tempfile import NamedTemporaryFile
+import pm4py
+import os
+import sys
+import subprocess
+import importlib.util
+import pandas
+
+
+class Parameters(Enum):
+ API_KEY: str = "api_key"
+ MODEL: str = "openai_model"
+ RECORDING_DURATION: str = "recording_duration"
+ VOICE: str = "voice"
+ PLAY_SOUND: str = "play_sound"
+ MAX_LEN: str = "max_len"
+
+
+def check_ffmpeg_installed():
+ try:
+ # Try to execute "ffmpeg -version" command and capture its output
+ result = subprocess.run(["ffmpeg", "-version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True)
+ # If the command was executed successfully, ffmpeg is installed
+ return True
+ except:
+ # If the command execution leads to an error, ffmpeg is not installed
+ return False
+
+
+def speech_to_text(sound_file_path: Optional[str] = None, parameters: Optional[Dict[Any, Any]] = None) -> str:
+ """
+ Uses an OpenAI speech-to-text model
+
+ Parameters
+ ------------------
+ sound_file_path
+ If provided, path to a .mp3 file containing the voice to be transcribed as text. If not, a recording of the specified duration is started, and provided to the model.
+ parameters
+ Parameters of the method, including:
+ - Parameters.API_KEY => the API key to be used
+ - Parameters.MODEL => the speech-to-text model to be used (default: whisper-1)
+ - Parameters.RECORDING_DURATION => the duration of the voice recording
+
+ Returns
+ -------------------
+ text
+ Transcription as text of the sound
+ """
+ if parameters is None:
+ parameters = {}
+
+ api_key = exec_utils.get_param_value(Parameters.API_KEY, parameters, constants.OPENAI_API_KEY)
+ model = exec_utils.get_param_value(Parameters.MODEL, parameters, constants.OPENAI_DEFAULT_STT_MODEL)
+ recording_duration: int = exec_utils.get_param_value(Parameters.RECORDING_DURATION, parameters, 10)
+
+ if sound_file_path is None:
+ import pyaudio
+ from pydub import AudioSegment
+ import wave
+
+ # Audio recording parameters
+ FORMAT = pyaudio.paInt16
+ CHANNELS: int = 1
+ RATE: int = 44100
+ CHUNK: int = 1024
+ RECORD_SECONDS: int = recording_duration
+
+ F = NamedTemporaryFile(suffix=".wav")
+ WAVE_OUTPUT_FILENAME = F.name
+ F.close()
+
+ F = NamedTemporaryFile(suffix=".mp3")
+ sound_file_path = F.name
+ F.close()
+
+ audio = pyaudio.PyAudio()
+
+ # Start recording
+ stream = audio.open(format=FORMAT, channels=CHANNELS,
+ rate=RATE, input=True,
+ frames_per_buffer=CHUNK)
+ print("Recording...")
+
+ frames = []
+
+ for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
+ data = stream.read(CHUNK)
+ frames.append(data)
+
+ print("Finished recording.")
+
+ # Stop recording
+ stream.stop_stream()
+ stream.close()
+ audio.terminate()
+
+ # Save the recorded data as a WAV file
+ wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
+ wf.setnchannels(CHANNELS)
+ wf.setsampwidth(audio.get_sample_size(FORMAT))
+ wf.setframerate(RATE)
+ wf.writeframes(b''.join(frames))
+ wf.close()
+
+ sound = AudioSegment.from_wav(WAVE_OUTPUT_FILENAME)
+ sound.export(sound_file_path, format="mp3")
+
+ if sound_file_path is not None:
+ from openai import OpenAI
+
+ client = OpenAI(api_key=api_key)
+
+ transcript = client.audio.transcriptions.create(
+ model=model,
+ file=open(sound_file_path, "rb")
+ )
+
+ return transcript.text
+
+
+def text_to_speech(stri: str, parameters: Optional[Dict[Any, Any]] = None) -> str:
+ """
+ Uses an OpenAI text-to-speech model
+
+ Parameters
+ ---------------
+ stri
+ String that needs to be translated to voice
+ parameters
+ Parameters of the algorithm, including:
+ - Parameters.API_KEY => the API key of OpenAI to be used
+ - Parameters.MODEL => the TTS model of OpenAI to be used (default: tts-1)
+ - Parameters.VOICE => the voice of the TTS model to be used (default: alloy)
+ - Parameters.PLAY_SOUND => boolean that determines if the voice should be played
+
+ Returns
+ ---------------
+ stru
+ Path to the .mp3 file obtained after the transcription
+ """
+ if parameters is None:
+ parameters = {}
+
+ api_key = exec_utils.get_param_value(Parameters.API_KEY, parameters, constants.OPENAI_API_KEY)
+ model = exec_utils.get_param_value(Parameters.MODEL, parameters, constants.OPENAI_DEFAULT_TTS_MODEL)
+ voice = exec_utils.get_param_value(Parameters.VOICE, parameters, constants.OPENAI_DEFAULT_TTS_VOICE)
+ max_len: int = exec_utils.get_param_value(Parameters.MAX_LEN, parameters, 4096)
+ play_sound: bool = exec_utils.get_param_value(Parameters.PLAY_SOUND, parameters, True)
+
+ F = NamedTemporaryFile(suffix=".mp3")
+ speech_file_path = F.name
+ F.close()
+
+ from openai import OpenAI
+
+ client = OpenAI(api_key=api_key)
+
+ if len(stri) > max_len:
+ # TTS limit
+ stri = stri[:max_len]
+
+ response = client.audio.speech.create(
+ model=model,
+ voice=voice,
+ input=stri
+ )
+
+ response.stream_to_file(speech_file_path)
+
+ if play_sound:
+ if importlib.util.find_spec("pygame"):
+ # if the user installed pygame, use that to seamlessy play the .mp3 file
+ import pygame
+
+ pygame.mixer.init()
+ pygame.mixer.music.load(speech_file_path)
+ pygame.mixer.music.play()
+
+ while pygame.mixer.music.get_busy():
+ pygame.time.Clock().tick(10)
+ else:
+ # calls the system .mp3 opener
+ if sys.platform.startswith('darwin'):
+ subprocess.call(('open', speech_file_path))
+ elif os.name == 'nt': # For Windows
+ os.startfile(speech_file_path)
+ elif os.name == 'posix': # For Linux, Mac, etc.
+ subprocess.call(('xdg-open', speech_file_path))
+
+ return speech_file_path
+
+
+if __name__ == "__main__":
+ if not check_ffmpeg_installed():
+ raise Exception("install ffmpeg and add it to the environment variables!")
+
+ if not importlib.util.find_spec("pydub") or not importlib.util.find_spec("pyaudio"):
+ raise Exception("install pydub and pyaudio using pip!")
+
+ api_key: str = "sk-"
+
+ log: pandas.DataFrame = pm4py.read_xes("../../tests/compressed_input_data/15_bpic2020_permit_log_1t_per_variant.xes.gz")
+ var_abstr: str = pm4py.llm.abstract_variants(log)
+
+ parameters = {}
+
+ parameters["api_key"] = api_key # OpenAI key
+ parameters["recording_duration"] = 6 # 6 seconds recording duration
+
+ print("Please insert your inquiry:")
+ user_inquiry = speech_to_text(None, parameters=parameters)
+ print("This is your inquiry:", user_inquiry)
+
+ print("Now your inquiry is vocalized before execution:")
+ text_to_speech(user_inquiry, parameters=parameters)
+
+ prompt: str = var_abstr + "\n\n" + user_inquiry
+
+ response: str = pm4py.llm.openai_query(prompt, api_key=api_key)
+ print("This is the response of the OpenAI model:", response)
+
+ print("Now the response is vocalized:")
+ text_to_speech(response, parameters=parameters)
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm_clustering.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm_clustering.py
new file mode 100644
index 0000000000000000000000000000000000000000..24c985e10a18bb8949c448d54376be0ead4b1425
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/llm_clustering.py
@@ -0,0 +1,18 @@
+import pm4py
+import os
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "roadtraffic100traces.xes"))
+
+ clusters: list[tuple[str, pandas.DataFrame]] = pm4py.llm.clustering(log, openai_model="o3-mini")
+
+ for cluster_name, dataframe in clusters:
+ print("\n")
+ print(cluster_name)
+ print(dataframe)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/local_process_models.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/local_process_models.py
new file mode 100644
index 0000000000000000000000000000000000000000..fc5edeff58042531f23d6c632fac3b3c7a5f5583
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/local_process_models.py
@@ -0,0 +1,23 @@
+import os
+
+from pm4py.algo.discovery.local_process_models.algorithm import find_local_process_models
+from pm4py.objects.log.importer.xes import importer as xes_import
+from pm4py.objects.log.obj import EventLog
+
+
+def execute_script():
+ log_path: str = os.path.join(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ log: EventLog = xes_import.apply(log_path)
+
+ lpms = find_local_process_models(log,
+ selected_activities=None,
+ parameters = {"max_iterations": 2})
+
+ if len(lpms):
+ process_tree, metrics = lpms[0]
+
+ print(process_tree)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_projection_dfg_variant.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_projection_dfg_variant.py
new file mode 100644
index 0000000000000000000000000000000000000000..85af31f58558f04a31e45e2852df8a942436d714
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_projection_dfg_variant.py
@@ -0,0 +1,27 @@
+import pm4py
+from pm4py.algo.conformance.alignments.dfg.variants import classic as dfg_alignments
+from pm4py.algo.conformance.alignments.edit_distance.variants import edit_distance
+import pandas
+from pm4py.objects.log.obj import EventLog
+
+
+def execute_script():
+ log: EventLog = pm4py.read_xes("../tests/input_data/receipt.xes", return_legacy_log_object=True)
+
+ filtered_log: EventLog | pandas.DataFrame = pm4py.filter_variants_top_k(log, 1)
+ dfg: dict
+ sa: dict
+ ea: dict
+ dfg, sa, ea = pm4py.discover_dfg(filtered_log)
+ projected_log: EventLog = dfg_alignments.project_log_on_dfg(log, dfg, sa, ea)
+ print(projected_log)
+
+ variant = ('Confirmation of receipt', 'T02 Check confirmation of receipt', 'T04 Determine confirmation of receipt',
+ 'T05 Print and send confirmation of receipt', 'T06 Determine necessity of stop advice',
+ 'T10 Determine necessity to stop indication')
+ projected_log2: EventLog = edit_distance.project_log_on_variant(log, variant)
+ print(projected_log2)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_skeleton.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_skeleton.py
new file mode 100644
index 0000000000000000000000000000000000000000..8819b178954f197243432ae2374d2c9f9dae0cbe
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_skeleton.py
@@ -0,0 +1,22 @@
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.discovery.log_skeleton import algorithm as lsk
+from pm4py.algo.conformance.log_skeleton import algorithm as lsk_conf
+import os
+from pm4py.objects.log.obj import EventLog
+from typing import Any
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ # discovers the log skeleton with a minimal noise
+ log_skeleton: dict[str, Any] = lsk.apply(log, parameters={lsk.Variants.CLASSIC.value.Parameters.NOISE_THRESHOLD: 0.01})
+ print(log_skeleton)
+ # applies conformance checking to it
+ results: list[set[Any]] = lsk_conf.apply(log, log_skeleton)
+ for i in range(min(len(results), 5)):
+ # print the i-the conformance checking
+ print(results[i])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_skeleton_manual_constraints.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_skeleton_manual_constraints.py
new file mode 100644
index 0000000000000000000000000000000000000000..e14403c8646c3b99a18654904c46005a83205776
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_skeleton_manual_constraints.py
@@ -0,0 +1,35 @@
+import pm4py
+import pandas
+from typing import Any
+
+
+def execute_script():
+ # example where the log skeleton is manullay built, and not automatically discovered from the log.
+
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+
+ log_skeleton = {"always_after": set(), "always_before": set(), "equivalence": set(), "never_together": set(),
+ "directly_follows": set(), "activ_freq": dict()}
+
+ for act in pm4py.get_event_attribute_values(log, "concept:name"):
+ # initially sets that every activity of the log can occur from 0 to 10 times
+ # (without this constraints, conformance checking will signal deviations for every event)
+ log_skeleton["activ_freq"][act] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
+
+ # sets that the 'reinitiate request' activity should not occur (so it occurs 0 times)
+ log_skeleton["activ_freq"]["reinitiate request"] = {0}
+
+ # sets that the 'pay compensation' activity should occur somewhen after the 'decide' activity.
+ log_skeleton["always_after"].add(('decide', 'pay compensation'))
+
+ # gets the conformance checking results. The first describes for each case of the log the exact deviations
+ detailed_conf_results: list[set[Any]] = pm4py.conformance_log_skeleton(log, log_skeleton)
+ print(detailed_conf_results)
+
+ # the second provides a summary (as a dataframe) of the fitness per case
+ summary_df: list[set[Any]] = pm4py.conformance_log_skeleton(log, log_skeleton, return_diagnostics_dataframe=True)
+ print(summary_df)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_to_fit_precise_pn.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_to_fit_precise_pn.py
new file mode 100644
index 0000000000000000000000000000000000000000..54087fc6eae94f089116cbfd09a16d7f97c03d5a
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_to_fit_precise_pn.py
@@ -0,0 +1,22 @@
+import pm4py
+from pm4py.objects.conversion.trie import converter as trie_converter
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.trie.obj import Trie
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+
+ prefix_tree: Trie = pm4py.discover_prefix_tree(log)
+
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = trie_converter.apply(prefix_tree, variant=trie_converter.Variants.TO_PETRI_NET)
+
+ pm4py.view_petri_net(net, im, fm, format="svg")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_to_int_tree_open_paths.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_to_int_tree_open_paths.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee6584df7a18316c3eb924ff4a2669cd5a929a69
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/log_to_int_tree_open_paths.py
@@ -0,0 +1,27 @@
+import pm4py
+import os
+from pm4py.algo.transformation.log_to_interval_tree import algorithm as log_to_interval_tree
+import pandas
+from pm4py.util.intervaltree import IntervalTree
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ tree: IntervalTree = log_to_interval_tree.apply(log, variant=log_to_interval_tree.Variants.OPEN_PATHS)
+ # see how many paths are open at the timestamp 1319616410
+ print(len(tree[1319616410]))
+ # read the detailed information about the source and target event of each path
+ print(tree[1319616410])
+
+ # builds a new tree considering only the intervals going from an event with activity
+ # 'T06 Determine necessity of stop advice'
+ # to an event with activity 'T02 Check confirmation of receipt'
+ tree = log_to_interval_tree.apply(log, variant=log_to_interval_tree.Variants.OPEN_PATHS, parameters={"filter_activity_couple": ("T06 Determine necessity of stop advice", "T02 Check confirmation of receipt")})
+ # see how many paths are open at the timestamp 1319616410
+ print(len(tree[1319616410]))
+ # read the detailed information about the source and target event of each path
+ print(tree[1319616410])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/logs_alignment.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/logs_alignment.py
new file mode 100644
index 0000000000000000000000000000000000000000..5de5ca25655521630b38fd9a1c7b103b978a0410
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/logs_alignment.py
@@ -0,0 +1,47 @@
+import time
+
+import pm4py
+from pm4py.algo.conformance.alignments.edit_distance import algorithm as logs_alignment
+from pm4py.algo.evaluation.replay_fitness.variants import alignment_based
+from pm4py.objects.process_tree.utils import bottomup as bottomup_discovery
+from pm4py.algo.simulation.playout.process_tree import algorithm as tree_playout
+import pandas
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ # read an event log
+ log: pandas.DataFrame = pm4py.read_xes("../tests/compressed_input_data/02_teleclaims.xes.gz")
+ # log = pm4py.read_xes("../tests/input_data/receipt.xes")
+ print("number of variants of the original log ->", len(pm4py.get_variants_as_tuples(log)))
+ # discover a process model
+ tree: ProcessTree = pm4py.discover_process_tree_inductive(log)
+ # simulate a log out of the model (to have another log that is similar to the original)
+ aa: float = time.time()
+ min_trace_length = bottomup_discovery.get_min_trace_length(tree)
+ simulated_log = tree_playout.apply(tree, variant=tree_playout.Variants.EXTENSIVE,
+ parameters={"max_trace_length": min_trace_length + 2})
+ print("number of variants of the simulated log -> ", len(simulated_log))
+ # apply the alignments between this log and the model
+ bb: float = time.time()
+ aligned_traces: list[dict[str, Any]] = logs_alignment.apply(log, simulated_log)
+ cc: float = time.time()
+ print(aligned_traces[0])
+ print("playout time", bb - aa)
+ print("alignments time", cc - bb)
+ print("TOTAL", cc - aa)
+ print(alignment_based.evaluate(aligned_traces))
+ # apply the anti alignments between this log and the model
+ dd: float = time.time()
+ anti_aligned_traces = logs_alignment.apply(log, simulated_log,
+ parameters={
+ logs_alignment.Variants.EDIT_DISTANCE.value.Parameters.PERFORM_ANTI_ALIGNMENT: True})
+ ee: float = time.time()
+ print(anti_aligned_traces[0])
+ print("anti alignments time", ee - dd)
+ print(alignment_based.evaluate(anti_aligned_traces))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/logs_petri_visual_comparison.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/logs_petri_visual_comparison.py
new file mode 100644
index 0000000000000000000000000000000000000000..d18989ebd11649d0b051117482200aa10f882203
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/logs_petri_visual_comparison.py
@@ -0,0 +1,34 @@
+import os
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.comparison.petrinet import element_usage_comparison
+from pm4py.objects.log.util import sorting
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ log = sorting.sort_timestamp(log)
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = process_tree_converter.apply(process_tree)
+ log1: EventLog = EventLog(log[:500])
+ log2: EventLog = EventLog(log[len(log) - 500:])
+ statistics = element_usage_comparison.compare_element_usage_two_logs(net, im, fm, log1, log2)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as pn_vis
+ gviz = pn_vis.apply(net, im, fm, variant=pn_vis.Variants.FREQUENCY, aggregated_statistics=statistics,
+ parameters={pn_vis.Variants.FREQUENCY.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ pn_vis.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/lstm_predict_next_activity.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/lstm_predict_next_activity.py
new file mode 100644
index 0000000000000000000000000000000000000000..f2ef59a38cb71ea0ccfd2ab8fc612ade09f358e6
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/lstm_predict_next_activity.py
@@ -0,0 +1,44 @@
+import numpy as np
+import pm4py
+from pm4py.algo.transformation.trace_encodings.variants import event_based
+from pm4py.algo.transformation.log_to_target.variants import next_activity
+from tensorflow.keras.models import Sequential
+from tensorflow.keras.layers import LSTM, Dense, TimeDistributed
+from pm4py.objects.log.obj import EventLog
+
+
+def execute_script():
+ log: EventLog = pm4py.read_xes("../tests/input_data/running-example.xes", return_legacy_log_object=True)
+
+ feature_names: list[str]
+ data, feature_names = event_based.apply(log)
+ target: list[list[list[int]]]
+ classes: list[str]
+ target, classes = next_activity.apply(log, parameters={"enable_padding": True})
+ target = np.array(target)
+
+ model = Sequential()
+ model.add(LSTM(50, input_shape=(data.shape[1], data.shape[2]), return_sequences=True))
+ model.add(TimeDistributed(Dense(len(classes), activation='softmax')))
+
+ model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
+
+ model.summary()
+
+ # train the model
+ model.fit(data, target, epochs=100)
+
+ # test the model on an event log (in this case the same)
+
+ # re-extract the features
+ data, feature_names = event_based.apply(log, parameters={"feature_names": feature_names})
+
+ # perform the prediction
+ predictions = model.predict(data)
+ predictions = [[classes[np.argmax(y)] for y in x] for x in predictions]
+
+ print(predictions)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/lstm_predict_remaining_time.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/lstm_predict_remaining_time.py
new file mode 100644
index 0000000000000000000000000000000000000000..1e3ce3aead3f592b0b3074165213e8cf18615b37
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/lstm_predict_remaining_time.py
@@ -0,0 +1,64 @@
+import numpy as np
+import pm4py
+from pm4py.algo.transformation.trace_encodings.variants import event_based
+from pm4py.algo.transformation.log_to_target.variants import remaining_time
+from sklearn.preprocessing import MinMaxScaler
+from tensorflow.keras.models import Sequential
+from tensorflow.keras.layers import LSTM, Dense
+from tensorflow.keras.optimizers import Adam
+from pm4py.objects.log.obj import EventLog
+
+
+
+def execute_script():
+ log: EventLog = pm4py.read_xes("../tests/input_data/running-example.xes", return_legacy_log_object=True)
+ max_len_log = max([len(x) for x in log])
+
+ feature_names: list[str]
+ data, feature_names = event_based.apply(log)
+ target: list[list[int]]
+ classes: list[str]
+ target, classes = remaining_time.apply(log, parameters={"enable_padding": True})
+ target = np.array(target)
+ scaler: MinMaxScaler = MinMaxScaler(feature_range=(-1, 1))
+ # Reshape for scaling
+ target_reshaped = target.reshape(-1, 1)
+ target_scaled = scaler.fit_transform(target_reshaped)
+ # Reshape back to original shape
+ target_scaled = target_scaled.reshape(-1, max_len_log)
+
+ model = Sequential()
+ model.add(LSTM(50, input_shape=(data.shape[1], data.shape[2]), return_sequences=True)) # Adjust the input shape as necessary
+ model.add(Dense(1, activation='linear'))
+
+ model.compile(optimizer=Adam(), loss='mean_squared_error', metrics=['mae'])
+
+ model.summary()
+
+ # train the model
+ history = model.fit(data, target_scaled, batch_size=32, epochs=100, validation_split=0.2)
+
+ # test the model on an event log (in this case the same)
+
+ # re-extract the features
+ test_log: EventLog = log
+ data, feature_names = event_based.apply(test_log, parameters={"feature_names": feature_names})
+
+ # Make predictions
+ predictions_scaled = model.predict(data)
+ print(predictions_scaled)
+ # Ensuring prediction values are within range
+ predictions_clipped = np.clip(predictions_scaled, -1, 1)
+ # Reshape predictions for inverse transformation
+ predictions_scaled_reshaped = predictions_clipped.reshape(-1, 1)
+ # Inverse transform to original scale
+ predictions_original = scaler.inverse_transform(predictions_scaled_reshaped)
+ # Reshape back to original predictions shape
+ predictions_original = predictions_original.reshape(-1, max_len_log)
+
+ # final output:
+ print(predictions_original)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/manual_log_generation.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/manual_log_generation.py
new file mode 100644
index 0000000000000000000000000000000000000000..6249dd465606489d76bc502836ad9fafa29ec0f8
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/manual_log_generation.py
@@ -0,0 +1,27 @@
+from copy import deepcopy
+
+from pm4py.objects.log.obj import EventLog, Trace, Event
+
+
+def execute_script():
+ L: EventLog = EventLog()
+ e1: Event = Event()
+ e1["concept:name"] = "A"
+ e2: Event = Event()
+ e2["concept:name"] = "B"
+ e3: Event = Event()
+ e3["concept:name"] = "C"
+ e4: Event = Event()
+ e4["concept:name"] = "D"
+ t: Trace = Trace()
+ t.append(e1)
+ t.append(e2)
+ t.append(e3)
+ t.append(e4)
+ for i in range(10000):
+ L.append(deepcopy(t))
+ print(len(L))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/memory_profilation_alignments.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/memory_profilation_alignments.py
new file mode 100644
index 0000000000000000000000000000000000000000..a070cc17d4df2f7948e45c9fb99f9462da119006
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/memory_profilation_alignments.py
@@ -0,0 +1,51 @@
+from pm4py.objects.log.importer.xes import importer
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.algo.conformance.alignments.petri_net import algorithm as alignments
+import memory_profiler
+import time
+import os
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+class Shared:
+ log: EventLog = importer.apply(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = process_tree_converter.apply(process_tree)
+
+
+def nothing():
+ time.sleep(3)
+
+
+def f():
+ aa: float = time.time()
+ aligned_traces = alignments.apply(Shared.log, Shared.net, Shared.im, Shared.fm,
+ variant=alignments.Variants.VERSION_DIJKSTRA_LESS_MEMORY)
+ bb: float = time.time()
+ print(bb - aa)
+
+
+def g():
+ aa: float = time.time()
+ aligned_traces = alignments.apply(Shared.log, Shared.net, Shared.im, Shared.fm,
+ variant=alignments.Variants.VERSION_DIJKSTRA_NO_HEURISTICS)
+ bb: float = time.time()
+ print(bb - aa)
+
+
+if __name__ == "__main__":
+ memory_usage = memory_profiler.memory_usage(nothing)
+ nothing = max(memory_usage)
+ print(nothing)
+ memory_usage = memory_profiler.memory_usage(f)
+ print(memory_usage)
+ print(max(memory_usage) - nothing)
+ memory_usage = memory_profiler.memory_usage(g)
+ print(memory_usage)
+ print(max(memory_usage) - nothing)
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/memory_profilation_iterparse.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/memory_profilation_iterparse.py
new file mode 100644
index 0000000000000000000000000000000000000000..de7d609b2f3b634a5ccdb5779a0104dc392560de
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/memory_profilation_iterparse.py
@@ -0,0 +1,74 @@
+import os
+import time
+
+import memory_profiler
+
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.log.obj import EventLog
+
+log_path: str = os.path.join("..", "tests", "input_data", "receipt.xes")
+
+
+def nothing():
+ time.sleep(3)
+
+
+def import_memory_efficient():
+ log: EventLog = xes_importer.apply(log_path, variant=xes_importer.Variants.ITERPARSE_MEM_COMPRESSED)
+
+
+def import_classic():
+ log: EventLog = xes_importer.apply(log_path, variant=xes_importer.Variants.ITERPARSE)
+
+
+def import_line_by_line():
+ log: EventLog = xes_importer.apply(log_path, variant=xes_importer.Variants.LINE_BY_LINE)
+
+
+def import_line_by_line_only_conceptname_and_timetimestamp():
+ log = xes_importer.apply(log_path, variant=xes_importer.Variants.LINE_BY_LINE, parameters={
+ xes_importer.Variants.LINE_BY_LINE.value.Parameters.SET_ATTRIBUTES_TO_READ: {"concept:name", "time:timestamp"}})
+
+
+def import_line_by_line_only_conceptname():
+ log = xes_importer.apply(log_path, variant=xes_importer.Variants.LINE_BY_LINE, parameters={
+ xes_importer.Variants.LINE_BY_LINE.value.Parameters.SET_ATTRIBUTES_TO_READ: {"concept:name"}})
+
+
+def execute_script():
+ memory_usage = memory_profiler.memory_usage(nothing)
+ nothing_usage = max(memory_usage)
+ aa: float = time.time()
+ memory_usage_iterparse_efficient = memory_profiler.memory_usage(import_memory_efficient)
+ bb: float = time.time()
+ print(log_path, "iterparse memory efficient time", bb - aa)
+ print(log_path, "iterparse memory efficient memory occupation",
+ max(memory_usage_iterparse_efficient) - nothing_usage)
+ aa = time.time()
+ memory_usage_iterparse_classic = memory_profiler.memory_usage(import_classic)
+ bb = time.time()
+ print(log_path, "iterparse classic time", bb - aa)
+ print(log_path, "iterparse classic memory occupation", max(memory_usage_iterparse_classic) - nothing_usage)
+ aa = time.time()
+ memory_usage_line_by_line = memory_profiler.memory_usage(import_line_by_line)
+ bb = time.time()
+ print(log_path, "line by line time", bb - aa)
+ print(log_path, "line by line memory occupation", max(memory_usage_line_by_line) - nothing_usage)
+ aa = time.time()
+ memory_usage_line_by_line_only_cn_and_tt = memory_profiler.memory_usage(
+ import_line_by_line_only_conceptname_and_timetimestamp)
+ bb = time.time()
+ print(log_path, "line by line only cn and tt time", bb - aa)
+ print(log_path, "line by line only cn and tt memory occupation",
+ max(memory_usage_line_by_line_only_cn_and_tt) - nothing_usage)
+ aa = time.time()
+ memory_usage_line_by_line_only_cn = memory_profiler.memory_usage(
+ import_line_by_line_only_conceptname)
+ bb = time.time()
+ print(log_path, "line by line only cn time", bb - aa)
+ print(log_path, "line by line only cn memory occupation",
+ max(memory_usage_line_by_line_only_cn) - nothing_usage)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/merging_case_relations.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/merging_case_relations.py
new file mode 100644
index 0000000000000000000000000000000000000000..e570ee67b18ba1598b800593345fa699602f4dce
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/merging_case_relations.py
@@ -0,0 +1,25 @@
+import pm4py
+from pm4py.util import constants, pandas_utils
+from pm4py.objects.log.util import dataframe_utils
+from pm4py.algo.merging.case_relations import algorithm as case_relations_merging
+from examples import examples_conf
+import os
+import pandas
+
+
+def execute_script():
+ dataframe1: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "interleavings", "receipt_even.csv"))
+ dataframe2: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "interleavings", "receipt_odd.csv"))
+ dataframe1 = dataframe_utils.convert_timestamp_columns_in_df(dataframe1, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["time:timestamp"])
+ dataframe2 = dataframe_utils.convert_timestamp_columns_in_df(dataframe2, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["time:timestamp"])
+ case_relations: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "interleavings", "case_relations.csv"))
+ merged: pandas.DataFrame = case_relations_merging.apply(dataframe1, dataframe2, case_relations)
+ dfg: dict
+ sa: dict
+ ea: dict
+ dfg, sa, ea = pm4py.discover_dfg(merged)
+ pm4py.view_dfg(dfg, sa, ea, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_insert_case_arrival_finish.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_insert_case_arrival_finish.py
new file mode 100644
index 0000000000000000000000000000000000000000..92b736ae2c0a6668bb933e016d0d213b9070f94c
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_insert_case_arrival_finish.py
@@ -0,0 +1,12 @@
+import pm4py
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+ log = pm4py.insert_case_arrival_finish_rate(log)
+ print(log)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_insert_waiting_service_time.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_insert_waiting_service_time.py
new file mode 100644
index 0000000000000000000000000000000000000000..dedf47f7d3c9d6c447bc314507411c366b67210c
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_insert_waiting_service_time.py
@@ -0,0 +1,12 @@
+import pm4py
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+ log = pm4py.insert_case_service_waiting_time(log)
+ print(log)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_log_to_target_vectory.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_log_to_target_vectory.py
new file mode 100644
index 0000000000000000000000000000000000000000..cd02c63ef4bdf3ae05ed6bc000237a66ceac2e5c
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_log_to_target_vectory.py
@@ -0,0 +1,20 @@
+import pm4py
+from pm4py.algo.transformation.log_to_target import algorithm as log_to_target
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+ classes: list[str]
+ rem_time_target, classes = log_to_target.apply(log, variant=log_to_target.Variants.REMAINING_TIME)
+ print(rem_time_target)
+ next_time_target, classes = log_to_target.apply(log, variant=log_to_target.Variants.NEXT_TIME)
+ print(next_time_target)
+ next_activities: list[str]
+ next_activity_target, next_activities = log_to_target.apply(log, variant=log_to_target.Variants.NEXT_ACTIVITY)
+ print(next_activity_target)
+ print(next_activities)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_outcome_enriched.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_outcome_enriched.py
new file mode 100644
index 0000000000000000000000000000000000000000..e2faba5b7e0f2a2abcd857d0d90ece4269428c43
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ml_outcome_enriched.py
@@ -0,0 +1,12 @@
+import pm4py
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+ log = pm4py.extract_outcome_enriched_dataframe(log)
+ print(log)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/model_to_model_sim.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/model_to_model_sim.py
new file mode 100644
index 0000000000000000000000000000000000000000..1afd87fcad8079e64e37f84a81a823b2d0446a32
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/model_to_model_sim.py
@@ -0,0 +1,45 @@
+import pm4py
+import os
+import traceback
+import pandas
+from pm4py.objects.powl.obj import POWL
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+
+ # can be anything here :))
+ process_tree: ProcessTree = pm4py.discover_process_tree_inductive(log)
+
+ # can be anything here too :)))
+ powl: POWL = pm4py.discover_powl(pm4py.filter_variants_top_k(log, 20))
+
+ # computes the footprints-based behavioral similarity between a process tree
+ # and a POWL model
+ behavioral_similarity: float = pm4py.behavioral_similarity(powl, process_tree)
+ print("behavioral similarity", behavioral_similarity)
+
+ # computes the structural similarity between a POWL and a process tree
+ structural_similarity: float = pm4py.structural_similarity(process_tree, powl)
+ print("structural similarity", structural_similarity)
+
+ # computes the label-sets-similarity between a process tree and a POWL
+ label_sets_similarity: float = pm4py.label_sets_similarity(powl, process_tree)
+ print("label sets similarity", label_sets_similarity)
+
+ try:
+ # computes the embeddings-based similarity between a process tree and a POWL
+ embeddings_similarity: float = pm4py.embeddings_similarity(powl, process_tree)
+ print("embeddings similarity", embeddings_similarity)
+
+ # embeddings are non-deterministic, so even comparing a model with itself,
+ # it would probably give a value below 1
+ embeddings_similarity2: float = pm4py.embeddings_similarity(process_tree, process_tree)
+ print("embeddings similarity", embeddings_similarity2)
+ except:
+ traceback.print_exc()
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/monte_carlo_example.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/monte_carlo_example.py
new file mode 100644
index 0000000000000000000000000000000000000000..a68a51529e886dfd6376bd08fb9114dfdaad1aa8
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/monte_carlo_example.py
@@ -0,0 +1,126 @@
+import pandas as pd
+import pm4py
+from pm4py.algo.simulation.montecarlo.utils import replay
+from pm4py.algo.simulation.montecarlo import algorithm as monte_carlo_simulator
+from pm4py.objects import random_variables
+import pandas
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.random_variables.exponential.random_variable import Exponential
+from pm4py.objects.random_variables.normal.random_variable import Normal
+from pm4py.objects.random_variables.uniform.random_variable import Uniform
+from typing import Any
+
+def execute_script():
+ # =====================================================
+ # Step 1: Load the event log and discover the Petri net
+ # =====================================================
+
+ # Read the event log from an XES file.
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+
+ # Discover a Petri net using the inductive miner. Note that discovering the net on the entire log
+ # might lead to underfitting. In some cases, focusing on a subset of variants can yield a more precise model.
+ net: PetriNet
+ initial_marking: Marking
+ final_marking: Marking
+ net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)
+
+ # =====================================================
+ # Step 2: Create and customize the stochastic map
+ # =====================================================
+
+ # Generate the stochastic map from the log and the discovered Petri net.
+ # The map assigns a duration model (random variable) to each transition.
+ stochastic_map = replay.get_map_from_log_and_net(log, net, initial_marking, final_marking)
+ print("Original stochastic map (derived from log):")
+ print(stochastic_map)
+
+ # To customize activity durations, you can manually override the random variables
+ # for each transition. Here are three examples of random variable distributions:
+
+ for trans in list(stochastic_map.keys()):
+ # --- Normal Distribution ---
+ # Parameters:
+ # mu (mean): expected duration value (here set to 5 time units)
+ # sigma (standard deviation): variability around the mean (set to 3 time units)
+ rv_normal: Normal = random_variables.normal.random_variable.Normal(mu=5, sigma=3)
+ print(f"Normal distribution for transition '{trans}': {rv_normal}")
+
+ # --- Exponential Distribution ---
+ # Parameters:
+ # loc: a shift parameter (minimum duration, here set to 1)
+ # scale: the mean waiting time between events (set to 1)
+ rv_exponential: Exponential = random_variables.exponential.random_variable.Exponential(loc=1, scale=1)
+ print(f"Exponential distribution for transition '{trans}': {rv_exponential}")
+
+ # --- Uniform Distribution ---
+ # Parameters:
+ # loc: lower bound of the duration (here set to 0)
+ # scale: range of the duration (so durations are equally likely between 0 and 1)
+ rv_uniform: Uniform = random_variables.uniform.random_variable.Uniform(loc=0, scale=1)
+ print(f"Uniform distribution for transition '{trans}': {rv_uniform}")
+
+ # For this example, we choose to override with the normal distribution.
+ stochastic_map[trans] = rv_normal
+
+ print("Customized stochastic map (after manual override):")
+ print(stochastic_map)
+
+ # =====================================================
+ # Step 3: Configure simulation parameters and run simulation
+ # =====================================================
+
+ # Set up simulation parameters:
+ sim_parameters = {
+ # Use the customized stochastic map for transition durations.
+ "provided_stochastic_map": stochastic_map,
+ # Number of simulation runs to perform.
+ "num_simulations": 2,
+ # Case arrival ratio in seconds.
+ # (For example, 86400 seconds corresponds to a new case starting every day.)
+ "case_arrival_ratio": 86400
+ }
+
+ # Run the Monte Carlo simulation using the Petri net, the log, and the parameters.
+ simulated_log: EventLog
+ simulation_results: dict[str, Any]
+ simulated_log, simulation_results = monte_carlo_simulator.apply(log, net, initial_marking, final_marking,
+ parameters=sim_parameters)
+
+ # Convert the simulated log into a pandas DataFrame for easier manipulation.
+ simulated_log_df: pandas.DataFrame = pm4py.convert_to_dataframe(simulated_log)
+ print("Simulated timestamps before start time adjustment:")
+ print(simulated_log_df["time:timestamp"])
+
+ # =====================================================
+ # Step 4: Adjust simulated timestamps to add a start time
+ # =====================================================
+
+ # To align the simulation results with a specific real-world start time,
+ # we can apply an offset to all timestamps.
+ # For example, to set the start time to January 1, 2024:
+ desired_start_time: pandas.Timestamp = pd.Timestamp("2024-01-01")
+ unix_epoch: pandas.Timestamp = pd.Timestamp("1970-01-01")
+ # Calculate the offset between the desired start time and the Unix epoch.
+ offset = desired_start_time - unix_epoch
+
+ # Adjust each timestamp in the simulated log by adding the offset.
+ simulated_log_df["time:timestamp"] = simulated_log_df["time:timestamp"] + offset
+ print("Simulated timestamps after start time adjustment:")
+ print(simulated_log_df["time:timestamp"])
+
+ # =====================================================
+ # End of Script
+ # =====================================================
+
+ # The above script:
+ # - Discovers a process model from an event log.
+ # - Creates a stochastic map for transition durations.
+ # - Demonstrates how to manually override durations using various distributions.
+ # - Configures and runs the Monte Carlo simulation.
+ # - Adjusts the simulation's timestamps to align with a desired start time.
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/montecarlo_dfg.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/montecarlo_dfg.py
new file mode 100644
index 0000000000000000000000000000000000000000..5e378ee569ca0a6375ca9379e9157a8d9607e69e
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/montecarlo_dfg.py
@@ -0,0 +1,39 @@
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.discovery.dfg import algorithm as dfg_miner
+from pm4py.objects.conversion.dfg import converter as dfg_conv
+from pm4py.algo.simulation.montecarlo import algorithm as montecarlo_simulation
+from pm4py.algo.conformance.tokenreplay.algorithm import Variants
+import os
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from typing import Any
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ frequency_dfg: dict[tuple[str, str], float] = dfg_miner.apply(log, variant=dfg_miner.Variants.FREQUENCY)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = dfg_conv.apply(frequency_dfg)
+ # perform the Montecarlo simulation with the arrival rate inferred by the log (the simulation lasts 5 secs)
+ parameters = {}
+ parameters[
+ montecarlo_simulation.Variants.PETRI_SEMAPH_FIFO.value.Parameters.TOKEN_REPLAY_VARIANT] = Variants.BACKWARDS
+ parameters[montecarlo_simulation.Variants.PETRI_SEMAPH_FIFO.value.Parameters.PARAM_ENABLE_DIAGNOSTICS] = False
+ parameters[montecarlo_simulation.Variants.PETRI_SEMAPH_FIFO.value.Parameters.PARAM_MAX_THREAD_EXECUTION_TIME] = 5
+ res: dict[str, Any]
+ log, res = montecarlo_simulation.apply(log, net, im, fm, parameters=parameters)
+ print("\n(Montecarlo - Petri net) case arrival ratio inferred from the log")
+ print(res["median_cases_ex_time"])
+ print(res["total_cases_time"])
+ # perform the Montecarlo simulation with the arrival rate specified (the simulation lasts 5 secs)
+ parameters[montecarlo_simulation.Variants.PETRI_SEMAPH_FIFO.value.Parameters.PARAM_CASE_ARRIVAL_RATIO] = 60
+ log, res = montecarlo_simulation.apply(log, net, im, fm, parameters=parameters)
+ print("\n(Montecarlo - Petri net) case arrival ratio specified by the user")
+ print(res["median_cases_ex_time"])
+ print(res["total_cases_time"])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/montecarlo_petri_net.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/montecarlo_petri_net.py
new file mode 100644
index 0000000000000000000000000000000000000000..54517eb0dfdb99903d3337be68aa6e7de1887858
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/montecarlo_petri_net.py
@@ -0,0 +1,37 @@
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.algo.simulation.montecarlo import algorithm as montecarlo_simulation
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+import os
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = process_tree_converter.apply(process_tree)
+ # perform the Montecarlo simulation with the arrival rate inferred by the log (the simulation lasts 5 secs)
+ parameters = {}
+ parameters[montecarlo_simulation.Variants.PETRI_SEMAPH_FIFO.value.Parameters.PARAM_ENABLE_DIAGNOSTICS] = False
+ parameters[montecarlo_simulation.Variants.PETRI_SEMAPH_FIFO.value.Parameters.PARAM_MAX_THREAD_EXECUTION_TIME] = 5
+ res: dict[str, Any]
+ log, res = montecarlo_simulation.apply(log, net, im, fm, parameters=parameters)
+ print("\n(Montecarlo - Petri net) case arrival ratio inferred from the log")
+ print(res["median_cases_ex_time"])
+ print(res["total_cases_time"])
+ # perform the Montecarlo simulation with the arrival rate specified (the simulation lasts 5 secs)
+ parameters[montecarlo_simulation.Variants.PETRI_SEMAPH_FIFO.value.Parameters.PARAM_CASE_ARRIVAL_RATIO] = 60
+ log, res = montecarlo_simulation.apply(log, net, im, fm, parameters=parameters)
+ print("\n(Montecarlo - Petri net) case arrival ratio specified by the user")
+ print(res["median_cases_ex_time"])
+ print(res["total_cases_time"])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/multialignments.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/multialignments.py
new file mode 100644
index 0000000000000000000000000000000000000000..487fe63a4d66acf497a1e597c176d741d306b027
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/multialignments.py
@@ -0,0 +1,27 @@
+import os
+from pm4py.algo.conformance.multialignments.variants.discounted_a_star import apply as multii
+from pm4py.algo.conformance.multialignments.algorithm import Parameters
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.petri_net.importer import importer as petri_importer
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "running-example.xes")
+ pnml_path: str = os.path.join("..", "tests", "input_data", "running-example.pnml")
+ log: EventLog = xes_importer.apply(log_path)
+ net: PetriNet
+ marking: Marking
+ fmarking: Marking
+ net, marking, fmarking = petri_importer.apply(pnml_path)
+
+ THETA: float = 1.1
+ MU: int = 20
+ multiali = multii(log,net,marking,fmarking, parameters={Parameters.EXPONENT:THETA, Parameters.MARKING_LIMIT:MU})
+ print("Multi-alignment:",multiali['multi-alignment'])
+ print("Maximal Levenshtein Edit Distance to Log:", multiali['max_distance_to_log'])
+
+
+if __name__ == '__main__':
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/murata_reduction.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/murata_reduction.py
new file mode 100644
index 0000000000000000000000000000000000000000..8ab5f2dcf89889cae7fa5e33a376441f496bf517
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/murata_reduction.py
@@ -0,0 +1,38 @@
+import pm4py
+from pm4py.objects.petri_net.utils import petri_utils
+from examples import examples_conf
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+
+def execute_script():
+ net: PetriNet = pm4py.PetriNet()
+ im: Marking = pm4py.Marking()
+ fm: Marking = pm4py.Marking()
+ p1: PetriNet.Place = pm4py.PetriNet.Place("p1")
+ p2: PetriNet.Place = pm4py.PetriNet.Place("p2")
+ p3: PetriNet.Place = pm4py.PetriNet.Place("p3")
+
+ A: PetriNet.Transition = pm4py.PetriNet.Transition("A", "A")
+ B: PetriNet.Transition = pm4py.PetriNet.Transition("B", "B")
+ net.places.add(p1)
+ net.places.add(p2)
+ net.places.add(p3)
+ net.transitions.add(A)
+ net.transitions.add(B)
+ petri_utils.add_arc_from_to(A, p1, net)
+ petri_utils.add_arc_from_to(A, p2, net)
+ petri_utils.add_arc_from_to(A, p3, net)
+ petri_utils.add_arc_from_to(p1, B, net)
+ petri_utils.add_arc_from_to(p2, B, net)
+ petri_utils.add_arc_from_to(p3, B, net)
+
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+ net, im, fm = pm4py.reduce_petri_net_implicit_places(net, im, fm)
+
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/neo4j_ocel.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/neo4j_ocel.py
new file mode 100644
index 0000000000000000000000000000000000000000..1ad931e5725c648be4bcdc86edd62b897f8606bf
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/neo4j_ocel.py
@@ -0,0 +1,48 @@
+import pm4py
+from neo4j import GraphDatabase
+from examples import examples_conf
+from pm4py.util import nx_utils
+import importlib.util
+import networkx
+from pm4py.objects.ocel.obj import OCEL
+from typing import Any
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel2("../tests/input_data/ocel/ocel20_example.jsonocel")
+ #ocel = pm4py.read_ocel("../tests/input_data/ocel/ocel_order_simulated.csv")
+
+ # prints the actual contents of the OCEL
+ print(ocel)
+
+ uri: str = "neo4j://localhost:7687"
+ username: str = "neo4j"
+ password: str = "ciaociao"
+
+ driver = GraphDatabase.driver(uri, auth=(username, password))
+
+ with driver.session() as session:
+ # transforms the OCEL to a NetworkX DiGraph
+ nx_graph: networkx.DiGraph = pm4py.convert_ocel_to_networkx(ocel)
+
+ # uploads the NetworkX DiGraph (representing the OCEL) to Neo4J
+ nx_utils.neo4j_upload(nx_graph, session)
+
+ # gets back the same NetworkX DiGraph starting from Neo4J
+ nx_graph2: networkx.DiGraph = nx_utils.neo4j_download(session)
+
+ # convert the obtained NetworkX DiGraph into an OCEL
+ ocel2 = nx_utils.nx_to_ocel(nx_graph2)
+
+ # prints the contents of the 'new' OCEL
+ print(ocel2)
+
+ # shows the object-centric directly-follows graph on the screen
+ if importlib.util.find_spec("graphviz"):
+ ocdfg: dict[str, Any] = pm4py.discover_ocdfg(ocel2)
+ pm4py.view_ocdfg(ocdfg, annotation="frequency", format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_ocdfg(ocdfg, annotation="performance", format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/network_analysis.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/network_analysis.py
new file mode 100644
index 0000000000000000000000000000000000000000..5abdee718bf59ae5ad2f665fc7313ac501bbed56
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/network_analysis.py
@@ -0,0 +1,46 @@
+import os
+import pm4py
+from examples import examples_conf
+import importlib.util
+import pandas
+from typing import Any
+
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+
+ # frequency view of the network analysis
+
+ # OUT column: case identifier
+ # IN column: case identifier (the next event having the same case identifier is matched)
+ # NODE column: the attribute to use to classify the node. In this case, we use the org:group (organizational group)
+ # EDGE column: the attribute (of the source event) to use to classify the edge. In this case, we use the
+ # concept:name (activity)
+
+ frequency_edges: dict[tuple[str, str], dict[str, Any]] = pm4py.discover_network_analysis(log, out_column="case:concept:name", in_column="case:concept:name", node_column_source="org:group", node_column_target="org:group", edge_column="concept:name", performance=False)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_network_analysis(frequency_edges, variant="frequency", format=examples_conf.TARGET_IMG_FORMAT, edge_threshold=10)
+
+ # performance view of the network analysis
+
+ # OUT column: case identifier
+ # IN column: case identifier (the next event having the same case identifier is matched)
+ # NODE column: the attribute to use to classify the node. In this case, we use the org:group (organizational group)
+ # EDGE column: the attribute (of the source event) to use to classify the edge. In this case, we use the
+ # concept:name (activity)
+
+ performance_edges: dict[tuple[str, str], dict[str, Any]] = pm4py.discover_network_analysis(log, out_column="case:concept:name", in_column="case:concept:name", node_column_source="org:group", node_column_target="org:group", edge_column="concept:name", performance=True)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_network_analysis(performance_edges, variant="performance", format=examples_conf.TARGET_IMG_FORMAT, edge_threshold=10)
+
+ resource_group_edges: dict[tuple[str, str], dict[str, Any]] = pm4py.discover_network_analysis(log, out_column="case:concept:name", in_column="case:concept:name", node_column_source="org:resource", node_column_target="org:group", edge_column="org:resource", performance=False)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_network_analysis(resource_group_edges, variant="frequency", format=examples_conf.TARGET_IMG_FORMAT, edge_threshold=10)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/nx_ocel_to_graphviz.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/nx_ocel_to_graphviz.py
new file mode 100644
index 0000000000000000000000000000000000000000..0f35011609b3686164cb1c860d99c36f2580b114
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/nx_ocel_to_graphviz.py
@@ -0,0 +1,23 @@
+import pm4py
+from examples import examples_conf
+import importlib.util
+import networkx
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel2("../tests/input_data/ocel/ocel20_example.jsonocel")
+
+ # convers the OCEL to a NetworkX graph with events, objects, E2O, O2O, and object changes
+ event_graph: networkx.DiGraph = pm4py.convert_ocel_to_networkx(ocel)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.networkx import visualizer as nx_to_gv_vis
+
+ # visualize the NX DiGraph using Graphviz
+ gviz = nx_to_gv_vis.apply(event_graph, parameters={"format": examples_conf.TARGET_IMG_FORMAT})
+ nx_to_gv_vis.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/nx_traditional_to_graphviz.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/nx_traditional_to_graphviz.py
new file mode 100644
index 0000000000000000000000000000000000000000..b1e36db699baf4479929e8eb001666cefe831c25
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/nx_traditional_to_graphviz.py
@@ -0,0 +1,23 @@
+import pm4py
+from examples import examples_conf
+import importlib.util
+import networkx
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+ # gets an 'event graph' where events, cases and their relationships
+ # are represented in a graph (NetworkX DiGraph)
+ event_graph: networkx.DiGraph = pm4py.convert_log_to_networkx(log)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.networkx import visualizer as nx_to_gv_vis
+
+ # visualize the NX DiGraph using Graphviz
+ gviz = nx_to_gv_vis.apply(event_graph, parameters={"format": examples_conf.TARGET_IMG_FORMAT})
+ nx_to_gv_vis.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/obj_centr_conf_check.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/obj_centr_conf_check.py
new file mode 100644
index 0000000000000000000000000000000000000000..a32db01907dd327392b96f8953a352b7c1d312b2
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/obj_centr_conf_check.py
@@ -0,0 +1,36 @@
+import pm4py
+from pm4py.objects.ocel.obj import OCEL
+from typing import Any
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel("../tests/input_data/ocel/ocel_order_simulated.csv")
+
+ # subset that we consider as normative
+ ocel1: OCEL = pm4py.sample_ocel_connected_components(ocel, 1)
+ # subset that we use to extract the 'normative' behavior
+ ocel2: OCEL = pm4py.sample_ocel_connected_components(ocel, 1)
+
+ # object-centric DFG from OCEL2
+ ocdfg2: dict[str, Any] = pm4py.discover_ocdfg(ocel2)
+ # OTG (object-type-graph) from OCEL2
+ otg2: tuple[set[str], dict[tuple[str, str, str], int]] = pm4py.discover_otg(ocel2)
+ # ETOT (ET-OT graph) from OCEL2
+ etot2: tuple[set[str], set[str], set[tuple[str, str]], dict[tuple[str, str], int]] = pm4py.discover_etot(ocel2)
+
+ # conformance checking
+ print("== OCDFG")
+ diagn_ocdfg: dict[str, Any] = pm4py.conformance_ocdfg(ocel1, ocdfg2)
+ print(diagn_ocdfg)
+
+ print("\n\n== OTG")
+ diagn_otg: dict[str, Any] = pm4py.conformance_otg(ocel1, otg2)
+ print(diagn_otg)
+
+ print("\n\n== ETOT")
+ diagn_etot: dict[str, Any] = pm4py.conformance_etot(ocel1, etot2)
+ print(diagn_etot)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/object_centric_petri_net_discovery.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/object_centric_petri_net_discovery.py
new file mode 100644
index 0000000000000000000000000000000000000000..70a0e68da9af62d18bbed9177851c6d511602944
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/object_centric_petri_net_discovery.py
@@ -0,0 +1,19 @@
+import pm4py
+from examples import examples_conf
+import os
+import importlib.util
+from pm4py.objects.ocel.obj import OCEL
+from pm4py.objects.ocpn.obj import OCPetriNet
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel(os.path.join("..", "tests", "input_data", "ocel", "example_log.jsonocel"))
+ model: OCPetriNet = pm4py.discover_oc_petri_net(ocel)
+ print(model.keys())
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_ocpn(model, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocdfg_discovery.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocdfg_discovery.py
new file mode 100644
index 0000000000000000000000000000000000000000..dfa6e437d25fcb6937d12be34b49cff89c854c03
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocdfg_discovery.py
@@ -0,0 +1,21 @@
+import pm4py
+from examples import examples_conf
+import os
+import importlib.util
+from pm4py.objects.ocel.obj import OCEL
+from typing import Any
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel(os.path.join("..", "tests", "input_data", "ocel", "example_log.jsonocel"))
+ ocdfg: dict[str, Any] = pm4py.discover_ocdfg(ocel)
+
+ if importlib.util.find_spec("graphviz"):
+ # views the model with the frequency annotation
+ pm4py.view_ocdfg(ocdfg, format=examples_conf.TARGET_IMG_FORMAT)
+ # views the model with the performance annotation
+ pm4py.view_ocdfg(ocdfg, format=examples_conf.TARGET_IMG_FORMAT, annotation="performance", performance_aggregation="median")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel20_import_export.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel20_import_export.py
new file mode 100644
index 0000000000000000000000000000000000000000..c327493984062c47dc9d2533970d091579369c3d
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel20_import_export.py
@@ -0,0 +1,32 @@
+import pm4py
+import os
+import traceback
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ try:
+ ocel: OCEL = pm4py.read_ocel2("../tests/input_data/ocel/ocel20_example.sqlite")
+ pm4py.write_ocel2(ocel, "ocel20_example_bis.sqlite")
+ pm4py.write_ocel2(ocel, "ocel20_example_bis.xmlocel")
+ ocel = pm4py.read_ocel2("../tests/input_data/ocel/ocel20_example.xmlocel")
+ pm4py.write_ocel2(ocel, "ocel20_example_tris.sqlite")
+ pm4py.write_ocel2(ocel, "ocel20_example_tris.xmlocel")
+ except:
+ traceback.print_exc()
+
+ if os.path.exists("ocel20_example_bis.sqlite"):
+ os.remove("ocel20_example_bis.sqlite")
+
+ if os.path.exists("ocel20_example_bis.xmlocel"):
+ os.remove("ocel20_example_bis.xmlocel")
+
+ if os.path.exists("ocel20_example_tris.sqlite"):
+ os.remove("ocel20_example_tris.sqlite")
+
+ if os.path.exists("ocel20_example_tris.xmlocel"):
+ os.remove("ocel20_example_tris.xmlocel")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_clustering.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_clustering.py
new file mode 100644
index 0000000000000000000000000000000000000000..d4a99c94f69d3b4a7784cd1b9ecda5aa3eb92065
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_clustering.py
@@ -0,0 +1,21 @@
+import pm4py
+from pm4py.algo.transformation.ocel.split_ocel import algorithm as ocel_splitter
+from pm4py.objects.ocel.obj import OCEL
+from typing import Collection
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel("../tests/input_data/ocel/example_log.jsonocel")
+ object_type: str = "order"
+ #ocel = pm4py.read_ocel("../tests/input_data/ocel/recruiting-red.jsonocel")
+ #object_type = "applications"
+ # obtains an OCEL for every application, containing the events of the application and of the connected
+ # objects (offers)
+ lst_ocels = ocel_splitter.apply(ocel, variant=ocel_splitter.Variants.ANCESTORS_DESCENDANTS, parameters={"object_type": object_type})
+ # alternatively, performs a clustering grouping by sub-OCELs following the same patterns (lifecycle activities and connection with offers)
+ ocel_clusters: dict[str, Collection[OCEL]] = pm4py.cluster_equivalent_ocel(ocel, object_type)
+ print(sorted([len(y) for x, y in ocel_clusters.items()]))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_enrichment.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_enrichment.py
new file mode 100644
index 0000000000000000000000000000000000000000..340619a1371c3e724758061b037ac527f33f973d
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_enrichment.py
@@ -0,0 +1,18 @@
+import pm4py
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel("../tests/input_data/ocel/example_log.jsonocel")
+ # creates artificial O2O relationships based on the object interaction, descendants, inheritance, cobirth, codeath graph
+ ocel = pm4py.ocel_o2o_enrichment(ocel)
+ # creates artificial E2O qualifications based on the fact that an event creates/terminates the lifecycle of an object
+ ocel = pm4py.ocel_e2o_lifecycle_enrichment(ocel)
+ # prints the E2O table
+ print(ocel.relations)
+ # prints the O2O table
+ print(ocel.o2o)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_filter_cc.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_filter_cc.py
new file mode 100644
index 0000000000000000000000000000000000000000..12d4af8dd38d86df81064932cfdeb54fe998bdfb
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_filter_cc.py
@@ -0,0 +1,20 @@
+import pm4py
+import sys
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel("../tests/input_data/ocel/example_log.jsonocel")
+ print(ocel)
+ # filters the connected components of the OCEL in which there is at least a delivery,
+ # obtaining a filtered OCEL back.
+ ocel_with_del: OCEL = pm4py.filter_ocel_cc_otype(ocel, "delivery")
+ print(ocel_with_del)
+ # filters the connected components of the OCEL with at least five different objects,
+ # obtaining a filtered OCEL back.
+ ocel_with_three_objs: OCEL = pm4py.filter_ocel_cc_length(ocel, 5, sys.maxsize)
+ print(ocel_with_three_objs)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_merge_duplicates.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_merge_duplicates.py
new file mode 100644
index 0000000000000000000000000000000000000000..ff1dd7cf5d7820f20e020425a5e43a4bb376c657
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_merge_duplicates.py
@@ -0,0 +1,13 @@
+import pm4py
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel("../tests/input_data/ocel/example_log.jsonocel")
+ print(ocel.get_extended_table())
+ ocel = pm4py.ocel_merge_duplicates(ocel)
+ print(ocel.get_extended_table())
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_occm_example.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_occm_example.py
new file mode 100644
index 0000000000000000000000000000000000000000..49ba59205bd6ac1249830454c9f8af8c856b0cdd
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_occm_example.py
@@ -0,0 +1,61 @@
+import pm4py
+from pm4py.algo.transformation.ocel.split_ocel import algorithm as split_ocel
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel("../tests/input_data/ocel/example_log.jsonocel")
+ # gets an OCEL describing the executions of the objects of a given object type
+ lst_ocels = split_ocel.apply(ocel, variant=split_ocel.Variants.ANCESTORS_DESCENDANTS, parameters={"object_type": "order"})
+
+ # CONDITION 1: check if an order is associated with at least a delivery
+ for oc in lst_ocels:
+ oc_filtered: OCEL = pm4py.filter_ocel_event_attribute(oc, "ocel:activity", ["Create Order", "Create Delivery"])
+ oc_filtered = [(x["ocel:activity"], x["ocel:timestamp"].timestamp()) for x in oc_filtered.events.to_dict(orient="records")]
+ idxs_create_order = [i for i in range(len(oc_filtered)) if oc_filtered[i][0] == "Create Order"]
+ order_is_ok: bool = True
+ for i in idxs_create_order:
+ deliveries = [oc_filtered[j] for j in range(i+1,len(oc_filtered)) if oc_filtered[j][0] == "Create Delivery"]
+ #print(deliveries)
+ if len(deliveries) < 1:
+ order_is_ok = False
+ if not order_is_ok:
+ print("condition 1 VIOLATING order ", oc.parameters["@@central_object"])
+
+ # CONDITION 2: check if the temporal distance between an order and the delivery is less than a specified amount of time
+ for oc in lst_ocels:
+ oc_filtered = pm4py.filter_ocel_event_attribute(oc, "ocel:activity", ["Create Order", "Create Delivery"])
+ oc_filtered = [(x["ocel:activity"], x["ocel:timestamp"].timestamp()) for x in oc_filtered.events.to_dict(orient="records")]
+ idxs_create_order = [i for i in range(len(oc_filtered)) if oc_filtered[i][0] == "Create Order"]
+ order_is_ok = True
+ for i in idxs_create_order:
+ time_create_order = oc_filtered[i][1]
+ deliveries = [oc_filtered[j] for j in range(i+1,len(oc_filtered)) if oc_filtered[j][0] == "Create Delivery"]
+ for d in deliveries:
+ time_create_delivery = d[1]
+ # consider anomalous when the event of create delivery happens more than 1000000 seconds than the event of create order
+ if (time_create_delivery - time_create_order) > 1000000:
+ order_is_ok = False
+ break
+ if not order_is_ok:
+ print("condition 2 VIOLATING order ", oc.parameters["@@central_object"])
+
+ # CONDITION 3: check conditions on the time from the previous activity (any) given 'Create Delivery'
+ for oc0 in lst_ocels:
+ oc = [(x["ocel:activity"], x["ocel:timestamp"].timestamp()) for x in oc0.events.to_dict(orient="records")]
+ idxs_create_delivery = [i for i in range(len(oc)) if oc[i][0] == "Create Delivery"]
+ delivery_is_ok: bool = True
+ for i in idxs_create_delivery:
+ if i > 0:
+ time_create_delivery = oc[i][1]
+ time_previous = oc[i-1][1]
+ # consider anomalous when the event of create delivery happens more than 100000 after the timestamp of the previous event
+ if (time_create_delivery - time_previous) > 100000:
+ delivery_is_ok = False
+ break
+ if not delivery_is_ok:
+ print("condition 3 VIOLATING delivery ", oc0.parameters["@@central_object"])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_olap_operations.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_olap_operations.py
new file mode 100644
index 0000000000000000000000000000000000000000..129731a1e5b324a5fecb979bd5a1b5105a6923e5
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_olap_operations.py
@@ -0,0 +1,67 @@
+import pm4py
+
+
+def execute_script():
+ # OCEL OLAP operations introduced in:
+ # Khayatbashi, Miri & Jalali, "Advancing Object-Centric Process
+ # Mining with Multi-Dimensional Data Operations",
+ # CAiSE Forum 2025 (arXiv:2412.00393).
+ # Two granularity axes are demonstrated below:
+ # * object-type granularity: drill_down <-> roll_up
+ # * event-type granularity: unfold <-> fold
+ ocel = pm4py.read_ocel("../tests/input_data/ocel/example_log.jsonocel")
+
+ print("=== Original OCEL ===")
+ print("Object types:", pm4py.ocel_get_object_types(ocel))
+ print(ocel.objects[["ocel:oid", "ocel:type", "oattr1"]])
+
+ # --- Drill-down -----------------------------------------------------
+ # Use case: an analyst notices that the object type "element"
+ # actually covers heterogeneous sub-populations distinguished by the
+ # "oattr1" attribute, and wants to study them separately. Drill-down
+ # rewrites the type of each "element" object to "(element, )".
+ # Objects whose attribute value is undefined (e.g. NaN) keep the
+ # original type.
+ ocel_dd = pm4py.ocel_drill_down(ocel, object_type="element", object_attribute="oattr1")
+ print("\n=== After drill_down on (element, oattr1) ===")
+ print("Object types:", pm4py.ocel_get_object_types(ocel_dd))
+
+ # Concrete impact: the discovered OC-DFG now distinguishes the
+ # sub-populations that were fused together in the original log.
+ ocdfg_before = pm4py.discover_ocdfg(ocel)
+ ocdfg_after = pm4py.discover_ocdfg(ocel_dd)
+ print("OC-DFG object types before:", sorted(ocdfg_before["object_types"]))
+ print("OC-DFG object types after :", sorted(ocdfg_after["object_types"]))
+
+ # --- Roll-up --------------------------------------------------------
+ # Use case: undo a previous drill-down once the sub-population
+ # analysis is complete, or aggregate granular types back into a
+ # coarser parent type for a higher-level view.
+ ocel_ru = pm4py.ocel_roll_up(ocel_dd, object_type="element")
+ print("\n=== After roll_up back to element ===")
+ print("Object types:", pm4py.ocel_get_object_types(ocel_ru))
+ print("drill_down -> roll_up round-trip equal to original?", ocel_ru == ocel)
+
+ # --- Unfold ---------------------------------------------------------
+ # Use case: a single event type (here "Create Order") interacts with
+ # multiple object types, and the analyst wants the discovered model
+ # to distinguish the event's behaviour per related object type.
+ # Unfold rewrites the activity of matching events to
+ # "(Create Order, order)". An optional `qualifiers=[...]` argument
+ # restricts the split to events whose driving E2O relation carries
+ # one of the listed qualifier values.
+ ocel_uf = pm4py.ocel_unfold(ocel, event_type="Create Order", object_type="order")
+ print("\n=== After unfold of (Create Order, order) ===")
+ print("Activities:", sorted(ocel_uf.events["ocel:activity"].unique()))
+
+ # --- Fold -----------------------------------------------------------
+ # Use case: undo an earlier unfold, restoring the original event
+ # type "Create Order" in both events and E2O relations.
+ ocel_fo = pm4py.ocel_fold(ocel_uf, event_type="Create Order", object_type="order")
+ print("\n=== After fold back to Create Order ===")
+ print("Activities:", sorted(ocel_fo.events["ocel:activity"].unique()))
+ print("unfold -> fold round-trip equal to original?", ocel_fo == ocel)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_saw_net_disc.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_saw_net_disc.py
new file mode 100644
index 0000000000000000000000000000000000000000..e6a22c953019bb8a6a7bbf952efd868019556a68
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_saw_net_disc.py
@@ -0,0 +1,22 @@
+import pm4py
+from pm4py.algo.discovery.ocel.saw_nets import algorithm as saw_nets_disc
+from pm4py.objects.petri_net.obj import Marking
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.ocel.obj import OCEL
+from typing import Any
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel("../tests/input_data/ocel/ocel_order_simulated.csv")
+ res: dict[str, Any] = saw_nets_disc.apply(ocel)
+
+ if importlib.util.find_spec("graphviz"):
+ for ot in res["ot_saw_nets"]:
+ pm4py.view_petri_net(res["ot_saw_nets"][ot], Marking(), Marking(), format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_petri_net(res["multi_saw_net"], Marking(), Marking(), decorations=res["decorations_multi_saw_net"],
+ format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_streaming.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_streaming.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6c598d4da1861fa4fb226446bf604afb1f48fe5
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_streaming.py
@@ -0,0 +1,43 @@
+import pm4py
+import os
+from pm4py.streaming.stream import live_event_stream
+from pm4py.streaming.util import event_stream_printer
+from pm4py.streaming.conversion import ocel_flatts_distributor
+from pm4py.objects.ocel.util import ocel_iterator
+from pm4py.objects.ocel.obj import OCEL
+from pm4py.streaming.conversion.ocel_flatts_distributor import OcelFlattsDistributor
+from pm4py.streaming.stream.live_event_stream import LiveEventStream
+from pm4py.streaming.util.event_stream_printer import EventStreamPrinter
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel(os.path.join("..", "tests", "input_data", "ocel", "example_log.jsonocel"))
+ # we wants to use the traditional algorithms for streaming also on object-centric event logs.
+ # for this purpose, first we create two different event streams, one for the "order" object type
+ # and one for the "element" object type.
+ order_stream: LiveEventStream = live_event_stream.LiveEventStream()
+ element_stream: LiveEventStream = live_event_stream.LiveEventStream()
+ # Then, we register an algorithm for every one of them, which is a simple printer of the received events.
+ order_stream_printer: EventStreamPrinter = event_stream_printer.EventStreamPrinter()
+ element_stream_printer: EventStreamPrinter = event_stream_printer.EventStreamPrinter()
+ order_stream.register(order_stream_printer)
+ element_stream.register(element_stream_printer)
+ # Then, we create the distributor object.
+ # This registers different event streams for different object types.
+ flatts_distributor: OcelFlattsDistributor = ocel_flatts_distributor.OcelFlattsDistributor()
+ flatts_distributor.register("order", order_stream)
+ flatts_distributor.register("element", element_stream)
+ order_stream.start()
+ element_stream.start()
+ # in this way, we iterate over the events of an OCEL
+ for ev in ocel_iterator.apply(ocel):
+ # ... and the OCEL event is sent to all the "flattened" event streams.
+ flatts_distributor.append(ev)
+ # since the "flattened" event streams register a printer each, what we get is a print
+ # of all the events that reach these instances.
+ order_stream.stop()
+ element_stream.stop()
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_to_nx.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_to_nx.py
new file mode 100644
index 0000000000000000000000000000000000000000..352ab7093179ac4248fd0dfa3dcb89abc9835410
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_to_nx.py
@@ -0,0 +1,16 @@
+import pm4py
+import networkx as nx
+import os
+import networkx
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel("../tests/input_data/ocel/example_log.jsonocel")
+ nx_digraph: networkx.DiGraph = pm4py.convert_ocel_to_networkx(ocel)
+ nx.write_gexf(nx_digraph, "converted_graph.gexf")
+ os.remove("converted_graph.gexf")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_validation.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_validation.py
new file mode 100644
index 0000000000000000000000000000000000000000..4dc21bc684491ab3174d232dfa7dbed49de7faba
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocel_validation.py
@@ -0,0 +1,17 @@
+from pm4py.objects.ocel.validation import jsonocel, xmlocel
+import os
+import importlib.util
+
+
+def execute_script():
+ if importlib.util.find_spec("jsonschema"):
+ # validate a JSONOCEL file against the corresponding schema
+ validation_result = jsonocel.apply(os.path.join("..", "tests", "input_data", "ocel", "example_log.jsonocel"), os.path.join("..", "tests", "input_data", "ocel", "validation", "schema.json"))
+ print(validation_result)
+ # validate an XMLOCEL file against the corresponding schema
+ validation_result = xmlocel.apply(os.path.join("..", "tests", "input_data", "ocel", "example_log.xmlocel"), os.path.join("..", "tests", "input_data", "ocel", "validation", "schema.xml"))
+ print(validation_result)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocpn_manual_construction.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocpn_manual_construction.py
new file mode 100644
index 0000000000000000000000000000000000000000..1b63101eabc6754379fa4b90507e749372a0b28f
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/ocpn_manual_construction.py
@@ -0,0 +1,61 @@
+import pm4py
+from pm4py.algo.conformance.tokenreplay import algorithm as token_based_replay
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def get_tbr_statistics(log, net, im, fm):
+ tbr_parameters: dict[str, bool] = {"enable_pltr_fitness": True, "show_progress_bar": False}
+
+ replayed_traces, place_fitness_per_trace, transition_fitness_per_trace, notexisting_activities_in_model = token_based_replay.apply(log, net, im, fm, parameters=tbr_parameters)
+ place_diagnostics = {place: {"m": 0, "r": 0, "c": 0, "p": 0} for place in place_fitness_per_trace}
+ trans_count = {trans: 0 for trans in net.transitions}
+ # computes the missing, remaining, consumed, and produced tokens
+ # per place.
+ for place, res in place_fitness_per_trace.items():
+ place_diagnostics[place]["m"] += res["m"]
+ place_diagnostics[place]["r"] += res["r"]
+ place_diagnostics[place]["c"] += res["c"]
+ place_diagnostics[place]["p"] += res["p"]
+ # counts the number of times a transition has been fired during the
+ # replay.
+ for trace in replayed_traces:
+ for trans in trace["activated_transitions"]:
+ trans_count[trans] += 1
+ return (place_diagnostics, trans_count)
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.discover_petri_net_inductive(log)
+
+ ocpn = {}
+ ocpn["petri_nets"] = {}
+ ocpn["double_arcs_on_activity"] = {}
+ ocpn["tbr_results"] = {}
+ ocpn["activities"] = set()
+
+ for ot in {"ciao1", "ciao2"}:
+ for trans in net.transitions:
+ if trans.label is not None:
+ ocpn["activities"].add(trans.label)
+
+ ocpn["petri_nets"][ot] = [net, im, fm]
+
+ ocpn["double_arcs_on_activity"][ot] = {}
+ for x in net.transitions:
+ ocpn["double_arcs_on_activity"][ot][x.label] = True if ot == "ciao2" and x.label is not None else False
+
+ ocpn["tbr_results"][ot] = pm4py.conformance_diagnostics_token_based_replay(log, net, im, fm)
+
+ ocpn["tbr_results"][ot] = get_tbr_statistics(log, net, im, fm)
+
+ pm4py.view_ocpn(ocpn, format="svg")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/orgmining_local_diagn.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/orgmining_local_diagn.py
new file mode 100644
index 0000000000000000000000000000000000000000..9511c0938802d1a4cb4dc1b50340bc0dc6a3e805
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/orgmining_local_diagn.py
@@ -0,0 +1,33 @@
+import pm4py
+import os
+from pm4py.algo.organizational_mining.local_diagnostics import algorithm as local_diagnostics
+import pandas
+from typing import Any
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ ld: dict[str, Any] = local_diagnostics.apply_from_group_attribute(log, parameters={local_diagnostics.Parameters.GROUP_KEY: "org:group"})
+ # GROUP RELATIVE FOCUS (on a given type of work) specifies how much a resource group performed this type of work
+ # compared to the overall workload of the group. It can be used to measure how the workload of a resource group
+ # is distributed over different types of work, i.e., work diversification of the group.
+ print("\ngroup_relative_focus")
+ print(ld["group_relative_focus"])
+ # GROUP RELATIVE STAKE (in a given type of work) specifies how much this type of work was performed by a certain
+ # resource group among all groups. It can be used to measure how the workload devoted to a certain type of work is
+ # distributed over resource groups in an organizational model, i.e., work participation by different groups.
+ print("\ngroup_relative_stake")
+ print(ld["group_relative_stake"])
+ # GROUP COVERAGE with respect to a given type of work specifies the proportion of members of a resource group that
+ # performed this type of work.
+ print("\ngroup_coverage")
+ print(ld["group_coverage"])
+ # GROUP MEMBER CONTRIBUTION of a member of a resource group with respect to the given type of work specifies how
+ # much of this type of work by the group was performed by the member. It can be used to measure how the workload
+ # of the entire group devoted to a certain type of work is distributed over the group members.
+ print("\ngroup_member_contribution")
+ print(ld["group_member_contribution"])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/perf_spectrum_visualization.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/perf_spectrum_visualization.py
new file mode 100644
index 0000000000000000000000000000000000000000..8221d2f9be73b4db6d5c617b9aa8b58a23965025
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/perf_spectrum_visualization.py
@@ -0,0 +1,26 @@
+import pm4py
+import os
+from pm4py.util import constants, pandas_utils
+from pm4py.objects.log.util import dataframe_utils
+from examples import examples_conf
+import importlib.util
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_performance_spectrum(log, ["Confirmation of receipt", "T04 Determine confirmation of receipt",
+ "T10 Determine necessity to stop indication"], format=examples_conf.TARGET_IMG_FORMAT)
+
+ df: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "receipt.csv"))
+ df = dataframe_utils.convert_timestamp_columns_in_df(df, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["time:timestamp"])
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_performance_spectrum(df, ["Confirmation of receipt", "T04 Determine confirmation of receipt",
+ "T10 Determine necessity to stop indication"], format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/performance_dfg_simulation.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/performance_dfg_simulation.py
new file mode 100644
index 0000000000000000000000000000000000000000..24f52f1ba5e6197a47a1ecb622b5ba340b70a4db
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/performance_dfg_simulation.py
@@ -0,0 +1,22 @@
+import os
+
+import pm4py
+from pm4py.algo.simulation.playout.dfg import algorithm as dfg_simulator
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ frequency_dfg: dict
+ sa: dict
+ ea: dict
+ frequency_dfg, sa, ea = pm4py.discover_dfg(log)
+ performance_dfg: dict
+ performance_dfg, sa, ea = pm4py.discover_performance_dfg(log)
+ simulated_log = dfg_simulator.apply(frequency_dfg, sa, ea, variant=dfg_simulator.Variants.PERFORMANCE,
+ parameters={"performance_dfg": performance_dfg})
+ print(simulated_log)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/petri_manual_generation.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/petri_manual_generation.py
new file mode 100644
index 0000000000000000000000000000000000000000..7a000b9ec82556883ddb015aa0e6df0791064b83
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/petri_manual_generation.py
@@ -0,0 +1,58 @@
+import pm4py
+from pm4py.objects.petri_net.obj import PetriNet, Marking
+from pm4py.objects.petri_net.utils import petri_utils
+from examples import examples_conf
+import importlib.util
+
+
+def execute_script():
+ net: PetriNet = PetriNet("test")
+ source: PetriNet.Place = PetriNet.Place("source")
+ sink: PetriNet.Place = PetriNet.Place("sink")
+ p1: PetriNet.Place = PetriNet.Place("p1")
+ p2: PetriNet.Place = PetriNet.Place("p2")
+ p3: PetriNet.Place = PetriNet.Place("p3")
+ p4: PetriNet.Place = PetriNet.Place("p4")
+ t1: PetriNet.Transition = PetriNet.Transition("Confirmation of receipt", "Confirmation of receipt")
+ t2: PetriNet.Transition = PetriNet.Transition("T02 Check confirmation of receipt", "T02 Check confirmation of receipt")
+ t3: PetriNet.Transition = PetriNet.Transition("T04 Determine confirmation of receipt", "T04 Determine confirmation of receipt")
+ t4: PetriNet.Transition = PetriNet.Transition("T05 Print and send confirmation of receipt", "T05 Print and send confirmation of receipt")
+ t5: PetriNet.Transition = PetriNet.Transition("T06 Determine necessity of stop advice", "T06 Determine necessity of stop advice")
+
+ net.places.add(source)
+ net.places.add(sink)
+ net.places.add(p1)
+ net.places.add(p2)
+ net.places.add(p3)
+ net.places.add(p4)
+ net.transitions.add(t1)
+ net.transitions.add(t2)
+ net.transitions.add(t3)
+ net.transitions.add(t4)
+ net.transitions.add(t5)
+
+ petri_utils.add_arc_from_to(source, t1, net)
+ petri_utils.add_arc_from_to(t1, p1, net)
+ petri_utils.add_arc_from_to(p1, t2, net)
+ petri_utils.add_arc_from_to(t2, p2, net)
+ petri_utils.add_arc_from_to(p2, t3, net)
+ petri_utils.add_arc_from_to(t3, p3, net)
+ petri_utils.add_arc_from_to(p3, t4, net)
+ petri_utils.add_arc_from_to(t4, p4, net)
+ petri_utils.add_arc_from_to(p4, t5, net)
+ petri_utils.add_arc_from_to(t5, sink, net)
+
+ im: Marking = Marking()
+ im[source] = 1
+
+ fm: Marking = Marking()
+ fm[sink] = 1
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+ #pm4py.write_pnml(net, im, fm, "receipt_one_variant.pnml")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/pn_to_pt.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/pn_to_pt.py
new file mode 100644
index 0000000000000000000000000000000000000000..a103c8752bf955176a6dabf7e54b3899bd5f7e60
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/pn_to_pt.py
@@ -0,0 +1,64 @@
+import os
+import traceback
+
+import pm4py
+from pm4py.algo.analysis.woflan import algorithm as woflan
+from pm4py.algo.analysis.workflow_net import algorithm as is_wf_net
+from pm4py.objects.conversion.process_tree import converter as pt_converter
+from pm4py.objects.conversion.wf_net import converter as wf_net_converter
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ alpha_petri_net: PetriNet
+ alpha_im: Marking
+ alpha_fm: Marking
+ alpha_petri_net, alpha_im, alpha_fm = pm4py.discover_petri_net_alpha(log)
+ heuristics_petri_net: PetriNet
+ heuristics_im: Marking
+ heuristics_fm: Marking
+ heuristics_petri_net, heuristics_im, heuristics_fm = pm4py.discover_petri_net_heuristics(log)
+ tree: ProcessTree = pm4py.discover_process_tree_inductive(log)
+ print("tree discovered by inductive miner=")
+ print(tree)
+ inductive_petri_net: PetriNet
+ inductive_im: Marking
+ inductive_fm: Marking
+ inductive_petri_net, inductive_im, inductive_fm = pt_converter.apply(tree)
+ print("is_wf_net alpha", is_wf_net.apply(alpha_petri_net))
+ print("is_wf_net heuristics", is_wf_net.apply(heuristics_petri_net))
+ print("is_wf_net inductive", is_wf_net.apply(inductive_petri_net))
+ print("woflan alpha", woflan.apply(alpha_petri_net, alpha_im, alpha_fm,
+ parameters={woflan.Parameters.RETURN_ASAP_WHEN_NOT_SOUND: True,
+ woflan.Parameters.PRINT_DIAGNOSTICS: False}))
+ print("woflan heuristics", woflan.apply(heuristics_petri_net, heuristics_im, heuristics_fm,
+ parameters={woflan.Parameters.RETURN_ASAP_WHEN_NOT_SOUND: True,
+ woflan.Parameters.PRINT_DIAGNOSTICS: False}))
+ print("woflan inductive", woflan.apply(inductive_petri_net, inductive_im, inductive_fm,
+ parameters={woflan.Parameters.RETURN_ASAP_WHEN_NOT_SOUND: True,
+ woflan.Parameters.PRINT_DIAGNOSTICS: False}))
+ try:
+ tree_alpha = wf_net_converter.apply(alpha_petri_net, alpha_im, alpha_fm)
+ print(tree_alpha)
+ except:
+ traceback.print_exc()
+ try:
+ tree_heuristics = wf_net_converter.apply(heuristics_petri_net, heuristics_im, heuristics_fm)
+ print(tree_heuristics)
+ except:
+ traceback.print_exc()
+ try:
+ tree_inductive = wf_net_converter.apply(inductive_petri_net, inductive_im, inductive_fm)
+ print(tree_inductive)
+ pm4py.view_process_tree(tree_inductive, format=examples_conf.TARGET_IMG_FORMAT)
+ except:
+ traceback.print_exc()
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/polars_process_cubes.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/polars_process_cubes.py
new file mode 100644
index 0000000000000000000000000000000000000000..73b29f6a7b619604fdb0330c326d801129aa9441
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/polars_process_cubes.py
@@ -0,0 +1,115 @@
+import pm4py
+import polars as pl
+from pm4py.statistics.process_cube.polars import algorithm as process_cube_builder
+from pm4py.util import pandas_utils
+import traceback
+import pandas
+import polars
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+ dataframe = pl.LazyFrame(dataframe)
+
+ # only compute the outcome metrics needed by the cubes
+ enriched_df: polars.LazyFrame = pandas_utils.insert_case_arrival_finish_rate(
+ dataframe,
+ timestamp_column="time:timestamp",
+ case_id_column="case:concept:name",
+ start_timestamp_column="time:timestamp",
+ )
+ enriched_df = pandas_utils.insert_case_service_waiting_time(
+ enriched_df,
+ timestamp_column="time:timestamp",
+ case_id_column="case:concept:name",
+ start_timestamp_column="time:timestamp",
+ )
+
+ # only extract the attributes that are actually referenced by the cube queries
+ feature_table = pm4py.extract_features_dataframe(
+ enriched_df,
+ include_case_id=True,
+ )
+
+ parameters = {}
+ parameters["aggregation_function"] = "max"
+
+ try:
+ # builds a first process cube
+ # let's put as rows the different activities, as columns the different resources, and a value aggregated
+ # the total time of the case
+ cube_df: polars.DataFrame
+ cube_df, cell_case_dict = process_cube_builder.apply(feature_table, x_col="concept:name", y_col="org:resource", agg_col="@@sojourn_time", parameters=parameters)
+
+ print(cube_df)
+ except:
+ traceback.print_exc()
+
+ try:
+ # let's build another process cube!
+ # as rows, I want the presence (or not) of the activity 'T06 Determine necessity of stop advice'
+ # as columns, I want the channel used to submit the request
+
+ cube_df2: polars.DataFrame
+ cube_df2, cell_case_dict2 = process_cube_builder.apply(feature_table, x_col="concept:name_T06Determinenecessityofstopadvice", y_col="case:channel", agg_col="@@sojourn_time", parameters=parameters)
+
+ print(cube_df2)
+ except:
+ traceback.print_exc()
+
+ try:
+ # let's try to build another process cube
+ # as rows, we divide cases based on their arrival rate (time between start of the current case and the start of the previously started case)
+ # as columns, we divide cases based on their finish rate (time between end of the nextly terminated case and the end of the current case)
+
+ cube_df3: polars.DataFrame
+ cube_df3, cell_case_dict3 = process_cube_builder.apply(feature_table, x_col="@@arrival_rate", y_col="@@finish_rate", agg_col="@@sojourn_time", parameters=parameters)
+
+ print(cube_df3)
+ except:
+ traceback.print_exc()
+
+ try:
+ # let's try to build another process cube
+ # as rows, we divide cases based on their arrival rate (time between start of the current case and the start of the previously started case)
+ # as columns, we divide cases based on their finish rate (time between end of the nextly terminated case and the end of the current case)
+
+ cube_df3, cell_case_dict3 = process_cube_builder.apply(feature_table, x_col="@@arrival_rate", y_col="@@finish_rate", agg_col="@@sojourn_time", parameters={
+ "x_bins": [0, 200000, 500000, 800000, 1000000],
+ "y_bins": [0, 300000, 600000, 900000, 1000000]
+ })
+
+ print(cube_df3)
+ except:
+ traceback.print_exc()
+
+ try:
+ cube_df4: polars.DataFrame
+ cube_df4, cell_case_dict4 = process_cube_builder.apply(feature_table, x_col=("@@arrival_rate", "concept:name"), y_col="@@finish_rate", agg_col="@@sojourn_time")
+
+ print(cube_df4)
+ except:
+ traceback.print_exc()
+
+ try:
+ cube_df5: polars.DataFrame
+ cube_df5, cell_case_dict5 = process_cube_builder.apply(feature_table, x_col=("@@arrival_rate", "@@arrival_rate"), y_col="@@finish_rate", agg_col="@@sojourn_time")
+
+ print(cube_df5)
+ except:
+ traceback.print_exc()
+
+ try:
+ cube_df6: polars.DataFrame
+ cube_df6, cell_case_dict6 = process_cube_builder.apply(feature_table, x_col=("@@arrival_rate", "@@arrival_rate"), y_col=("@@finish_rate", "@@finish_rate"), agg_col="@@sojourn_time", parameters={
+ "x_bins": [[0, 200000, 500000, 800000, 1000000], [0, 250000, 500000, 750000, 1000000]],
+ "y_bins": [[0, 300000, 600000, 900000, 1000000], [0, 350000, 650000, 950000, 1000000]]
+ })
+
+ print(cube_df6)
+ except:
+ traceback.print_exc()
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/powl_discovery.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/powl_discovery.py
new file mode 100644
index 0000000000000000000000000000000000000000..412c654503a840a7a2b2f50a5a8328af83803f4e
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/powl_discovery.py
@@ -0,0 +1,35 @@
+import pm4py
+from examples import examples_conf
+from pm4py.algo.discovery.powl.inductive.variants.powl_discovery_varaints import POWLDiscoveryVariant
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.powl.obj import POWL
+
+
+def execute_script():
+ log: EventLog = pm4py.read_xes("../tests/input_data/helpdesk.xes.gz", return_legacy_log_object=True)
+
+ # discovers the POWL model
+ powl_model: POWL = pm4py.discover_powl(log, variant=POWLDiscoveryVariant.DYNAMIC_CLUSTERING, order_graph_filtering_threshold=0.6)
+
+ # prints the repr of the POWL model
+ print(powl_model)
+
+ # views the POWL model on the screen
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_powl(powl_model, format=examples_conf.TARGET_IMG_FORMAT, variant_str="basic")
+ pm4py.view_powl(powl_model, format=examples_conf.TARGET_IMG_FORMAT, variant_str="net")
+
+ # converts the POWL model to a Petri net (which can be used for conformance checking)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.convert_to_petri_net(powl_model)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/powl_parsing.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/powl_parsing.py
new file mode 100644
index 0000000000000000000000000000000000000000..3d711b016d87a15e71e3b7cce33b7956a51e04b0
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/powl_parsing.py
@@ -0,0 +1,29 @@
+import pm4py
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.powl.obj import POWL
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+
+ powl_model: POWL = pm4py.discover_powl(log)
+ # get the __repr__ of the POWL model
+ powl_string: str = str(powl_model)
+ print(powl_model)
+
+ # parse the same string into a new POWL model
+ powl_model2: POWL = pm4py.parse_powl_model_string(powl_string)
+ # see that the __repr__ of the two models are the same (same length)
+ powl_string2: str = str(powl_model2)
+ print(powl_string2)
+ print(len(powl_string), len(powl_string2))
+
+ if importlib.util.find_spec("graphviz"):
+ # represents the parsed model on the screen
+ pm4py.view_powl(powl_model2, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/prefix_classification.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/prefix_classification.py
new file mode 100644
index 0000000000000000000000000000000000000000..094889e7ec102283cfab08f1da39a37d5a22e443
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/prefix_classification.py
@@ -0,0 +1,318 @@
+#!/usr/bin/env python3
+import argparse
+import random
+from collections import Counter
+
+import numpy as np
+import pm4py
+from pm4py.util import xes_constants
+from sklearn.decomposition import PCA
+from sklearn.ensemble import RandomForestClassifier
+from sklearn.metrics import accuracy_score
+from sklearn.model_selection import train_test_split
+from sklearn.neighbors import KNeighborsClassifier
+
+from prefix_feature_extraction import build_prefix_features_next_activity
+from pm4py.objects.log.obj import EventLog
+from random import Random
+
+
+def select_components_by_cumulative_variance(
+ explained_variance_ratio, threshold=0.93
+):
+ cumulative: float = 0.0
+ for idx, ratio in enumerate(explained_variance_ratio):
+ cumulative += ratio
+ if cumulative >= threshold:
+ return idx + 1
+ return len(explained_variance_ratio)
+
+
+def fit_pca_with_variance_threshold(features, threshold=0.93):
+ if not features:
+ raise ValueError("No features provided for PCA fitting.")
+ max_components = min(len(features), len(features[0]))
+ if max_components <= 1:
+ pca: PCA = PCA(n_components=1)
+ pca.fit(features)
+ return 1, pca
+ pca_full: PCA = PCA(n_components=max_components, random_state=42)
+ pca_full.fit(features)
+ n_components = select_components_by_cumulative_variance(
+ pca_full.explained_variance_ratio_.tolist(), threshold=threshold
+ )
+ pca = PCA(n_components=n_components, random_state=42)
+ pca.fit(features)
+ return n_components, pca
+
+
+def compute_class_geometry_metrics(
+ features, labels, rng, max_queries=1000, k_values=(5, 10)
+):
+ if features is None:
+ return {}
+ X = np.asarray(features, dtype=float)
+ y = np.asarray(labels)
+ n_samples = X.shape[0]
+ if n_samples == 0:
+ return {}
+
+ mean_embedding = np.mean(X, axis=0, keepdims=True)
+ X = X - mean_embedding
+ norms = np.linalg.norm(X, axis=1, keepdims=True)
+ norms[norms == 0] = 1.0
+ Xn = X / norms
+
+ unique_labels = list(dict.fromkeys(labels))
+ centroids = {}
+ for label in unique_labels:
+ idx = np.where(y == label)[0]
+ if idx.size == 0:
+ continue
+ centroid = Xn[idx].mean(axis=0)
+ c_norm = np.linalg.norm(centroid)
+ centroids[label] = centroid if c_norm == 0 else centroid / c_norm
+
+ if not centroids:
+ return {}
+
+ intra_cos = float(
+ np.mean([np.dot(Xn[i], centroids[y[i]]) for i in range(n_samples)])
+ )
+
+ inter_cos = None
+ centroid_margin = None
+ if len(unique_labels) >= 2:
+ centroid_matrix = np.vstack([centroids[label] for label in unique_labels])
+ sims = centroid_matrix @ centroid_matrix.T
+ inter_cos = float(
+ np.mean(sims[np.triu_indices(len(unique_labels), k=1)])
+ )
+
+ centroid_sims = sims.copy()
+ np.fill_diagonal(centroid_sims, -np.inf)
+ max_other = np.max(centroid_sims, axis=1)
+ centroid_margin: float = float(np.mean(1.0 - max_other))
+
+ knn_purities = {k: None for k in k_values}
+ if n_samples > 1:
+ query_count = min(n_samples, max_queries)
+ if n_samples > query_count:
+ query_indices = rng.sample(range(n_samples), query_count)
+ else:
+ query_indices = list(range(n_samples))
+ query_labels = y[query_indices]
+ sims = Xn[query_indices] @ Xn.T
+ for row_idx, idx in enumerate(query_indices):
+ sims[row_idx, idx] = -np.inf
+ for k in k_values:
+ k_eff = min(k, n_samples - 1)
+ topk = np.argpartition(-sims, kth=k_eff - 1, axis=1)[:, :k_eff]
+ neigh_labels = y[topk]
+ purity = np.mean((neigh_labels == query_labels[:, None]).mean(axis=1))
+ knn_purities[k] = float(purity)
+
+ return {
+ "intra_centroid_cos": intra_cos,
+ "inter_centroid_cos": inter_cos,
+ "centroid_margin": centroid_margin,
+ "knn_purity@5": knn_purities.get(5),
+ "knn_purity@10": knn_purities.get(10),
+ }
+
+
+def sample_training_data(features, targets, percentage, rng):
+ if percentage >= 100:
+ return features, targets
+ sample_size = max(1, int(round(len(features) * (percentage / 100.0))))
+ indices = rng.sample(range(len(features)), sample_size)
+ sampled_features = [features[i] for i in indices]
+ sampled_targets = [targets[i] for i in indices]
+ return sampled_features, sampled_targets
+
+
+def train_classifier_random_forest(features, targets):
+ clf = RandomForestClassifier(
+ n_estimators=300, random_state=42, n_jobs=-1, class_weight="balanced"
+ )
+ clf.fit(features, targets)
+ return clf
+
+
+def train_pca_knn_classifier(features, targets):
+ n_components, pca = fit_pca_with_variance_threshold(features, threshold=0.93)
+ reduced = pca.transform(features)
+ knn: KNeighborsClassifier = KNeighborsClassifier(n_neighbors=1)
+ knn.fit(reduced, targets)
+ return {"pca": pca, "model": knn, "n_components": n_components}
+
+
+def evaluate_classifier_random_forest(model, features, targets):
+ predictions = model.predict(features)
+ return accuracy_score(targets, predictions)
+
+
+def evaluate_pca_knn_classifier(model_bundle, features, targets):
+ reduced = model_bundle["pca"].transform(features)
+ predictions = model_bundle["model"].predict(reduced)
+ return accuracy_score(targets, predictions)
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description=(
+ "Encode every prefix of each trace using the activities and paths up to the "
+ "penultimate event, plus time-based features, with the next event as class."
+ )
+ )
+ parser.add_argument(
+ "log_path",
+ nargs="?",
+ default="../tests/input_data/receipt.xes",
+ help="Path to the XES log (default: tests/input_data/receipt.xes)",
+ )
+ parser.add_argument(
+ "--activity-key",
+ default=xes_constants.DEFAULT_NAME_KEY,
+ help=f"Event attribute to use as activity (default: {xes_constants.DEFAULT_NAME_KEY})",
+ )
+ parser.add_argument(
+ "--timestamp-key",
+ default=xes_constants.DEFAULT_TIMESTAMP_KEY,
+ help=f"Event attribute to use as timestamp (default: {xes_constants.DEFAULT_TIMESTAMP_KEY})",
+ )
+ parser.add_argument(
+ "--show-sample",
+ action="store_true",
+ help="Print the first 5 feature rows and targets",
+ )
+ args = parser.parse_args()
+
+ log: EventLog = pm4py.read_xes(args.log_path, return_legacy_log_object=True)
+ (
+ feature,
+ target,
+ activities,
+ activity_to_index,
+ paths,
+ _,
+ ) = build_prefix_features_next_activity(
+ log, args.activity_key, args.timestamp_key
+ )
+ if not feature:
+ raise SystemExit("No prefixes found in the log.")
+
+ candidate_percentages: list[int] = [5, 20, 100]
+
+ class_counts: Counter = Counter(target)
+ min_class: int = min(class_counts.values()) if class_counts else 0
+ stratify = target if min_class >= 2 else None
+ if stratify is None:
+ print(
+ "Warning: some classes have < 2 samples; "
+ "disabling stratified split."
+ )
+ X_train, X_test, y_train, y_test = train_test_split(
+ feature, target, test_size=0.2, random_state=42, stratify=stratify
+ )
+
+ print(f"Log path: {args.log_path}")
+ print(f"Activity key: {args.activity_key}")
+ print(f"Activities: {len(activities)}")
+ print(f"Paths: {len(paths)}")
+ print(f"Samples (prefixes): {len(feature)}")
+ print(f"Feature dimension: {len(activities) + len(paths) + 3}")
+ print(f"Target classes: {len(activity_to_index)}")
+ print(f"Train size: {len(X_train)}")
+ print(f"Test size: {len(X_test)}")
+
+ rng: Random = random.Random(42)
+ for percentage in candidate_percentages:
+ X_sampled, y_sampled = sample_training_data(
+ X_train, y_train, percentage, rng
+ )
+ clf = train_classifier_random_forest(X_sampled, y_sampled)
+ accuracy = evaluate_classifier_random_forest(clf, X_test, y_test)
+ pca_knn = train_pca_knn_classifier(X_sampled, y_sampled)
+ pca_accuracy = evaluate_pca_knn_classifier(pca_knn, X_test, y_test)
+ rf_metrics = compute_class_geometry_metrics(
+ X_test, y_test, random.Random(42)
+ )
+ pca_test = pca_knn["pca"].transform(X_test)
+ pca_metrics = compute_class_geometry_metrics(
+ pca_test, y_test, random.Random(42)
+ )
+ print(f"Training sample %: {percentage}")
+ print(f"Train size (sampled): {len(X_sampled)}")
+ print(f"RF test accuracy: {accuracy:.4f}")
+ print(
+ "RF intra_centroid_cos (mean): "
+ f"{rf_metrics.get('intra_centroid_cos', float('nan')):.4f}"
+ )
+ if rf_metrics.get("inter_centroid_cos") is not None:
+ print(
+ "RF inter_centroid_cos (mean): "
+ f"{rf_metrics['inter_centroid_cos']:.4f}"
+ )
+ print(
+ "RF centroid_margin (mean): "
+ f"{rf_metrics['centroid_margin']:.4f}"
+ )
+ else:
+ print("RF inter_centroid_cos (mean): n/a")
+ print("RF centroid_margin (mean): n/a")
+ if rf_metrics.get("knn_purity@5") is not None:
+ print(
+ "RF knn_purity@5 (mean): "
+ f"{rf_metrics['knn_purity@5']:.4f}"
+ )
+ print(
+ "RF knn_purity@10 (mean): "
+ f"{rf_metrics['knn_purity@10']:.4f}"
+ )
+ else:
+ print("RF knn_purity@5 (mean): n/a")
+ print("RF knn_purity@10 (mean): n/a")
+ print(
+ f"PCA+kNN (k=1) test accuracy: {pca_accuracy:.4f} "
+ f"(components: {pca_knn['n_components']})"
+ )
+ print(
+ "PCA intra_centroid_cos (mean): "
+ f"{pca_metrics.get('intra_centroid_cos', float('nan')):.4f}"
+ )
+ if pca_metrics.get("inter_centroid_cos") is not None:
+ print(
+ "PCA inter_centroid_cos (mean): "
+ f"{pca_metrics['inter_centroid_cos']:.4f}"
+ )
+ print(
+ "PCA centroid_margin (mean): "
+ f"{pca_metrics['centroid_margin']:.4f}"
+ )
+ else:
+ print("PCA inter_centroid_cos (mean): n/a")
+ print("PCA centroid_margin (mean): n/a")
+ if pca_metrics.get("knn_purity@5") is not None:
+ print(
+ "PCA knn_purity@5 (mean): "
+ f"{pca_metrics['knn_purity@5']:.4f}"
+ )
+ print(
+ "PCA knn_purity@10 (mean): "
+ f"{pca_metrics['knn_purity@10']:.4f}"
+ )
+ else:
+ print("PCA knn_purity@5 (mean): n/a")
+ print("PCA knn_purity@10 (mean): n/a")
+
+ if args.show_sample:
+ print("Sample features (first 5 rows):")
+ for row in feature[:5]:
+ print(row)
+ print("Sample targets (first 5):")
+ print(target[:5])
+
+
+if __name__ == "__main__":
+ main()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/prefix_feature_extraction.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/prefix_feature_extraction.py
new file mode 100644
index 0000000000000000000000000000000000000000..9c45d05a07458829da7a7807948414483362bae4
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/prefix_feature_extraction.py
@@ -0,0 +1,118 @@
+#!/usr/bin/env python3
+from pm4py.util import xes_constants
+from typing import Any
+
+
+def _collect_activities_and_paths(log, activity_key):
+ activities = set()
+ paths = set()
+ for trace in log:
+ events = [event for event in trace if activity_key in event]
+ for event in events:
+ activities.add(event[activity_key])
+ for idx in range(1, len(events)):
+ paths.add((events[idx - 1][activity_key], events[idx][activity_key]))
+ activities = sorted(activities)
+ paths = sorted(paths)
+ return activities, paths
+
+
+def _build_prefix_features(log, activity_key, timestamp_key, target_mode):
+ activities, paths = _collect_activities_and_paths(log, activity_key)
+ activity_to_index = {activity: idx for idx, activity in enumerate(activities)}
+ path_to_index = {path: idx for idx, path in enumerate(paths)}
+
+ feature = []
+ target = []
+ case_ids = []
+
+ for trace_index, trace in enumerate(log):
+ events = [event for event in trace if activity_key in event]
+ if len(events) < 2:
+ continue
+ trace_id = trace.attributes.get(
+ xes_constants.DEFAULT_TRACEID_KEY, trace_index
+ )
+ end_time = events[-1].get(timestamp_key) if timestamp_key else None
+ if target_mode == "remaining_time" and end_time is None:
+ continue
+ start_time = events[0].get(timestamp_key) if timestamp_key else None
+
+ seen_activities: set[list[Any]] = {events[0][activity_key]}
+ seen_paths = set()
+
+ for idx in range(1, len(events)):
+ prev_event = events[idx - 1]
+ curr_event = events[idx]
+
+ if idx >= 2:
+ prior_event = events[idx - 2]
+ seen_paths.add(
+ (prior_event[activity_key], prev_event[activity_key])
+ )
+
+ row = [0] * (len(activities) + len(paths))
+ for seen_activity in seen_activities:
+ row[activity_to_index[seen_activity]] = 1
+ for seen_path in seen_paths:
+ row[len(activities) + path_to_index[seen_path]] = 1
+
+ prev_to_penultimate: float = 0.0
+ if idx >= 2 and timestamp_key:
+ prev_ts = prev_event.get(timestamp_key)
+ prior_ts = events[idx - 2].get(timestamp_key)
+ if prev_ts is not None and prior_ts is not None:
+ prev_to_penultimate = (prev_ts - prior_ts).total_seconds()
+
+ start_to_penultimate: float = 0.0
+ if timestamp_key and start_time is not None:
+ penultimate_ts = prev_event.get(timestamp_key)
+ if penultimate_ts is not None:
+ start_to_penultimate = (penultimate_ts - start_time).total_seconds()
+
+ path_time_diff: float = 0.0
+ if timestamp_key:
+ prev_ts = prev_event.get(timestamp_key)
+ curr_ts = curr_event.get(timestamp_key)
+ if prev_ts is not None and curr_ts is not None:
+ path_time_diff = (curr_ts - prev_ts).total_seconds()
+
+ row.extend([prev_to_penultimate, start_to_penultimate, path_time_diff])
+
+ curr_activity = curr_event[activity_key]
+ if target_mode == "next_activity":
+ target.append(activity_to_index[curr_activity])
+ feature.append(row)
+ else:
+ curr_ts = curr_event.get(timestamp_key) if timestamp_key else None
+ if curr_ts is not None:
+ remaining = (end_time - curr_ts).total_seconds()
+ target.append(remaining)
+ feature.append(row)
+ case_ids.append(trace_id)
+
+ seen_activities.add(curr_activity)
+
+ return feature, target, case_ids, activities, activity_to_index, paths, path_to_index
+
+
+def build_prefix_features_next_activity(
+ log,
+ activity_key=xes_constants.DEFAULT_NAME_KEY,
+ timestamp_key=xes_constants.DEFAULT_TIMESTAMP_KEY,
+):
+ feature, target, _, activities, activity_to_index, paths, path_to_index = (
+ _build_prefix_features(log, activity_key, timestamp_key, "next_activity")
+ )
+ return feature, target, activities, activity_to_index, paths, path_to_index
+
+
+def build_prefix_features_remaining_time(
+ log,
+ activity_key=xes_constants.DEFAULT_NAME_KEY,
+ timestamp_key=xes_constants.DEFAULT_TIMESTAMP_KEY,
+):
+ feature, target, case_ids, activities, activity_to_index, paths, path_to_index = (
+ _build_prefix_features(log, activity_key, timestamp_key, "remaining_time")
+ )
+ return feature, target, case_ids, activities, activity_to_index, paths, path_to_index
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/prefix_regression.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/prefix_regression.py
new file mode 100644
index 0000000000000000000000000000000000000000..7ad30fe265ea0995f91f511a7f1bd6b94c0f28e1
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/prefix_regression.py
@@ -0,0 +1,204 @@
+#!/usr/bin/env python3
+import argparse
+import random
+from collections import defaultdict
+from math import sqrt
+
+import pm4py
+from pm4py.util import xes_constants
+from sklearn.decomposition import PCA
+from sklearn.ensemble import RandomForestRegressor
+from sklearn.neighbors import KNeighborsRegressor
+
+from sklearn.metrics import r2_score
+from sklearn.model_selection import train_test_split
+
+from prefix_feature_extraction import build_prefix_features_remaining_time
+from pm4py.objects.log.obj import EventLog
+from random import Random
+
+
+def select_components_by_cumulative_variance(
+ explained_variance_ratio, threshold=0.93
+):
+ cumulative: float = 0.0
+ for idx, ratio in enumerate(explained_variance_ratio):
+ cumulative += ratio
+ if cumulative >= threshold:
+ return idx + 1
+ return len(explained_variance_ratio)
+
+
+def fit_pca_with_variance_threshold(features, threshold=0.93):
+ if not features:
+ raise ValueError("No features provided for PCA fitting.")
+ max_components = min(len(features), len(features[0]))
+ if max_components <= 1:
+ pca: PCA = PCA(n_components=1)
+ pca.fit(features)
+ return 1, pca
+ pca_full: PCA = PCA(n_components=max_components, random_state=42)
+ pca_full.fit(features)
+ n_components = select_components_by_cumulative_variance(
+ pca_full.explained_variance_ratio_.tolist(), threshold=threshold
+ )
+ pca = PCA(n_components=n_components, random_state=42)
+ pca.fit(features)
+ return n_components, pca
+
+
+def sample_training_data(features, targets, percentage, rng):
+ if percentage >= 100:
+ return features, targets
+ sample_size = max(1, int(round(len(features) * (percentage / 100.0))))
+ indices = rng.sample(range(len(features)), sample_size)
+ sampled_features = [features[i] for i in indices]
+ sampled_targets = [targets[i] for i in indices]
+ return sampled_features, sampled_targets
+
+
+def train_regressor(features, targets):
+ reg = RandomForestRegressor(
+ n_estimators=300, random_state=42, n_jobs=-1
+ )
+ reg.fit(features, targets)
+ return reg
+
+
+def train_pca_knn_regressor(features, targets):
+ n_components, pca = fit_pca_with_variance_threshold(features, threshold=0.93)
+ reduced = pca.transform(features)
+ reg: KNeighborsRegressor = KNeighborsRegressor(n_neighbors=1)
+ reg.fit(reduced, targets)
+ return {"pca": pca, "model": reg, "n_components": n_components}
+
+
+def compute_regression_metrics(targets, predictions, case_ids):
+ abs_errors = [abs(y_true - y_hat) for y_true, y_hat in zip(targets, predictions)]
+ sq_errors = [(y_true - y_hat) ** 2 for y_true, y_hat in zip(targets, predictions)]
+
+ per_case_abs: defaultdict = defaultdict(list)
+ per_case_sq: defaultdict = defaultdict(list)
+ for case_id, ae, se in zip(case_ids, abs_errors, sq_errors):
+ per_case_abs[case_id].append(ae)
+ per_case_sq[case_id].append(se)
+
+ case_mae_values = [sum(vals) / len(vals) for vals in per_case_abs.values()]
+ case_rmse_values = [sqrt(sum(vals) / len(vals)) for vals in per_case_sq.values()]
+
+ mae = sum(case_mae_values) / len(case_mae_values)
+ rmse = sum(case_rmse_values) / len(case_rmse_values)
+
+ return {
+ "mae_hours": mae / 3600.0,
+ "rmse_hours": rmse / 3600.0,
+ "r2": r2_score(targets, predictions),
+ }
+
+
+def evaluate_regressor(model, features, targets, case_ids):
+ predictions = model.predict(features)
+ return compute_regression_metrics(targets, predictions, case_ids)
+
+
+def evaluate_pca_knn_regressor(model_bundle, features, targets, case_ids):
+ reduced = model_bundle["pca"].transform(features)
+ predictions = model_bundle["model"].predict(reduced)
+ return compute_regression_metrics(targets, predictions, case_ids)
+
+
+def main():
+ parser = argparse.ArgumentParser(
+ description=(
+ "Encode every prefix of each trace using the activities and paths up to the "
+ "penultimate event, plus time-based features, with remaining time to case end as target."
+ )
+ )
+ parser.add_argument(
+ "log_path",
+ nargs="?",
+ default="../tests/input_data/receipt.xes",
+ help="Path to the XES log (default: tests/input_data/receipt.xes)",
+ )
+ parser.add_argument(
+ "--activity-key",
+ default=xes_constants.DEFAULT_NAME_KEY,
+ help=f"Event attribute to use as activity (default: {xes_constants.DEFAULT_NAME_KEY})",
+ )
+ parser.add_argument(
+ "--timestamp-key",
+ default=xes_constants.DEFAULT_TIMESTAMP_KEY,
+ help=f"Event attribute to use as timestamp (default: {xes_constants.DEFAULT_TIMESTAMP_KEY})",
+ )
+ parser.add_argument(
+ "--show-sample",
+ action="store_true",
+ help="Print the first 5 feature rows and targets",
+ )
+ args = parser.parse_args()
+
+ log: EventLog = pm4py.read_xes(args.log_path, return_legacy_log_object=True)
+ (
+ feature,
+ target,
+ case_ids,
+ activities,
+ activity_to_index,
+ paths,
+ _,
+ ) = build_prefix_features_remaining_time(
+ log, args.activity_key, args.timestamp_key
+ )
+ if not feature:
+ raise SystemExit("No prefixes with timestamps found in the log.")
+
+ candidate_percentages: list[int] = [5, 20, 100]
+
+ X_train, X_test, y_train, y_test, _, case_test = train_test_split(
+ feature, target, case_ids, test_size=0.2, random_state=42
+ )
+
+ print(f"Log path: {args.log_path}")
+ print(f"Activity key: {args.activity_key}")
+ print(f"Timestamp key: {args.timestamp_key}")
+ print(f"Activities: {len(activities)}")
+ print(f"Paths: {len(paths)}")
+ print(f"Samples (prefixes): {len(feature)}")
+ print(f"Feature dimension: {len(activities) + len(paths) + 3}")
+ print(f"Train size: {len(X_train)}")
+ print(f"Test size: {len(X_test)}")
+
+ rng: Random = random.Random(42)
+ for percentage in candidate_percentages:
+ X_sampled, y_sampled = sample_training_data(
+ X_train, y_train, percentage, rng
+ )
+ reg = train_regressor(X_sampled, y_sampled)
+ metrics = evaluate_regressor(reg, X_test, y_test, case_test)
+ pca_knn = train_pca_knn_regressor(X_sampled, y_sampled)
+ pca_metrics = evaluate_pca_knn_regressor(
+ pca_knn, X_test, y_test, case_test
+ )
+ print(f"Training sample %: {percentage}")
+ print(f"Train size (sampled): {len(X_sampled)}")
+ print(f"Per-case MAE (hours): {metrics['mae_hours']:.4f}")
+ print(f"Per-case RMSE (hours): {metrics['rmse_hours']:.4f}")
+ print(f"R2: {metrics['r2']:.4f}")
+ print(
+ "PCA+kNN (k=1) "
+ f"MAE (hours): {pca_metrics['mae_hours']:.4f} "
+ f"RMSE (hours): {pca_metrics['rmse_hours']:.4f} "
+ f"R2: {pca_metrics['r2']:.4f} "
+ f"(components: {pca_knn['n_components']})"
+ )
+
+ if args.show_sample:
+ print("Sample features (first 5 rows):")
+ for row in feature[:5]:
+ print(row)
+ print("Sample targets (first 5):")
+ print(target[:5])
+
+
+if __name__ == "__main__":
+ main()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/pripel_anonymization.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/pripel_anonymization.py
new file mode 100644
index 0000000000000000000000000000000000000000..853af949bb23fbbfe7278ed622aea48b626f9722
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/pripel_anonymization.py
@@ -0,0 +1,29 @@
+import pm4py
+from pm4py.algo.anonymization.trace_variant_query import algorithm as trace_variant_query
+from pm4py.algo.anonymization.pripel import algorithm as pripel
+from pm4py.objects.log.obj import EventLog
+
+
+def execute_script():
+ log = pm4py.read_xes(
+ "../tests/input_data/receipt.xes", return_legacy_log_object=True
+ )
+ log: EventLog = EventLog(log[0:100])
+
+ epsilon: float = 0.5
+ sacofa_result = trace_variant_query.apply(log=log, variant=trace_variant_query.Variants.SACOFA,
+ parameters={"epsilon": epsilon, "k": 30, "p": 4})
+ anonymized_log = pripel.apply(log=log, trace_variant_query=sacofa_result, epsilon=epsilon)
+
+ dfg: dict
+ sa: dict
+ ea: dict
+ dfg, sa, ea = pm4py.discover_dfg(log)
+ pm4py.view_dfg(dfg, sa, ea, format="svg")
+
+ dfg, sa, ea = pm4py.discover_dfg(anonymized_log)
+ pm4py.view_dfg(dfg, sa, ea, format="svg")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/process_cubes.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/process_cubes.py
new file mode 100644
index 0000000000000000000000000000000000000000..3233d2447ae9844cad84d6345e3c821b3ebc8c7d
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/process_cubes.py
@@ -0,0 +1,106 @@
+import pm4py
+from pm4py.statistics.process_cube.pandas import algorithm as process_cube_builder
+import traceback
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+
+ # builds a complete feature table, including the case ID as first column
+ enriched_df: pandas.DataFrame = pm4py.extract_outcome_enriched_dataframe(dataframe)
+ feature_table: pandas.DataFrame = pm4py.extract_features_dataframe(enriched_df, include_case_id=True)
+
+ # prints the columns of the feature table
+ for col in feature_table.columns:
+ #if col.startswith("@@"):
+ print(col)
+
+ try:
+ # builds a first process cube
+ # let's put as rows the different activities, as columns the different resources, and a value aggregated
+ # the total time of the case
+ cube_df: pandas.DataFrame
+ cube_df, cell_case_dict = process_cube_builder.apply(feature_table, x_col="concept:name", y_col="org:resource", agg_col="@@sojourn_time")
+
+ print(cube_df)
+ #print(cell_case_dict)
+
+ # in this case, each cell would aggregate on the cases containing at least one event of the given activity
+ # and at least one event of the given resource (not necessarily the same)
+
+ # using the results in `cell_case_dict`, we can filter the dataframe on a given cell.
+ # for example,
+ filt_df1: pandas.DataFrame = dataframe[dataframe["case:concept:name"].isin(cell_case_dict[('concept:name_T17 Check report Y to stop indication_y', 'org:resource_Resource01_x')])]
+ print(filt_df1)
+ except:
+ traceback.print_exc()
+ #input()
+
+ try:
+ # let's build another process cube!
+ # as rows, I want the presence (or not) of the activity 'T06 Determine necessity of stop advice'
+ # as columns, I want the channel used to submit the request
+
+ cube_df2: pandas.DataFrame
+ cube_df2, cell_case_dict2 = process_cube_builder.apply(feature_table, x_col="concept:name_T06 Determine necessity of stop advice_y", y_col="case:channel", agg_col="@@sojourn_time")
+
+ print(cube_df2)
+ #print(cell_case_dict2)
+
+ # using the results in `cell_case_dict`, we can filter the dataframe on a given cell.
+ # for example, let's filter on the cases reaching the 'Desk' channel and containing zero occurrences
+ # of the activity 'T06 Determine necessity of stop advice'
+
+ cell = [x for x in cell_case_dict2 if x[1] == 'case:channel_Desk_x' and x[0].left < 0 < x[0].right][0]
+ filt_df2: pandas.DataFrame = dataframe[dataframe["case:concept:name"].isin(cell_case_dict2[cell])]
+ #print(filt_df2)
+ except:
+ traceback.print_exc()
+ #input()
+
+ try:
+ # let's try to build another process cube
+ # as rows, we divide cases based on their arrival rate (time between start of the current case and the start of the previously started case)
+ # as columns, we divide cases based on their finish rate (time between end of the nextly terminated case and the end of the current case)
+
+ cube_df3: pandas.DataFrame
+ cube_df3, cell_case_dict3 = process_cube_builder.apply(feature_table, x_col="@@arrival_rate", y_col="@@finish_rate", agg_col="@@sojourn_time")
+
+ print(cube_df3)
+ #print(cell_case_dict3)
+
+ # now, let's focus on the cases which distance from the previously started case and from the nextly terminated
+ # case is lower than one day
+ cell = [x for x in cell_case_dict3 if x[0].left < 86400 < x[0].right and x[1].left < 86400 < x[1].right][0]
+ filt_df3: pandas.DataFrame = dataframe[dataframe["case:concept:name"].isin(cell_case_dict3[cell])]
+ print(filt_df3)
+ except:
+ traceback.print_exc()
+ #input()
+
+ try:
+ # let's try to build another process cube
+ # as rows, we divide cases based on their arrival rate (time between start of the current case and the start of the previously started case)
+ # as columns, we divide cases based on their finish rate (time between end of the nextly terminated case and the end of the current case)
+
+ cube_df3, cell_case_dict3 = process_cube_builder.apply(feature_table, x_col="@@arrival_rate", y_col="@@finish_rate", agg_col="@@sojourn_time", parameters={
+ "x_bins": [0, 200000, 500000, 800000, 1000000],
+ "y_bins": [0, 300000, 600000, 900000, 1000000]
+ })
+
+ print(cube_df3)
+ #print(cell_case_dict3)
+
+ # now, let's focus on the cases which distance from the previously started case and from the nextly terminated
+ # case is lower than one day
+ cell = [x for x in cell_case_dict3 if x[0].left < 86400 < x[0].right and x[1].left < 86400 < x[1].right][0]
+ filt_df3 = dataframe[dataframe["case:concept:name"].isin(cell_case_dict3[cell])]
+ print(filt_df3)
+ except:
+ traceback.print_exc()
+ #input()
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/process_tree_frequency_annotation.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/process_tree_frequency_annotation.py
new file mode 100644
index 0000000000000000000000000000000000000000..290d2e74f08c41b7ed8cec3ac6c8616330c00002
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/process_tree_frequency_annotation.py
@@ -0,0 +1,25 @@
+import pm4py
+import os
+from pm4py.algo.conformance.alignments.process_tree.util import search_graph_pt_frequency_annotation
+from pm4py.visualization.process_tree import visualizer as pt_visualizer
+from examples import examples_conf
+import importlib.util
+import pandas
+from graphviz import Graph
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ tree: ProcessTree = pm4py.discover_process_tree_inductive(log)
+ aligned_traces: list[dict[str, Any]] = pm4py.conformance_diagnostics_alignments(log, tree, return_diagnostics_dataframe=False)
+ tree = search_graph_pt_frequency_annotation.apply(tree, aligned_traces)
+
+ if importlib.util.find_spec("graphviz"):
+ gviz: Graph = pt_visualizer.apply(tree, parameters={"format": examples_conf.TARGET_IMG_FORMAT}, variant=pt_visualizer.Variants.FREQUENCY_ANNOTATION)
+ pt_visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/process_tree_reduction.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/process_tree_reduction.py
new file mode 100644
index 0000000000000000000000000000000000000000..c0a47e782cebce3ba406154bcb482e3a42293940
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/process_tree_reduction.py
@@ -0,0 +1,26 @@
+import pm4py
+import os
+from pm4py.algo.reduction.process_tree import reducer
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ # the tree discovered by inductive miner is huge and can replay the behavior of the log
+ tree: ProcessTree = pm4py.discover_process_tree_inductive(log)
+ # to make a more effective replay, remove the elements that are not being used during the replay of the trace
+ # (that are the skippable ones, with empty intersection with the trace)
+ tree_first_trace = reducer.apply(tree, log[0], variant=reducer.Variants.TREE_TR_BASED)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_process_tree(tree, examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_process_tree(tree_first_trace, examples_conf.TARGET_IMG_FORMAT)
+ # much smaller, isn't it? :)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/queue_check_exponential.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/queue_check_exponential.py
new file mode 100644
index 0000000000000000000000000000000000000000..1fa6257556cc8d992a24526d90d3305721b1b526
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/queue_check_exponential.py
@@ -0,0 +1,47 @@
+import pm4py
+import numpy as np
+import scipy.stats as stats
+from pm4py.objects.log.obj import EventLog
+from typing import Any
+
+
+def check_exponential_distribution(name, your_data):
+ print("\n\n### Testing exponential distribution for: "+name+"\n\n")
+
+ your_data = np.array(your_data)
+
+ lambda_ = 1. / your_data.mean()
+
+ # KS test
+ D, p_value = stats.kstest(your_data, "expon", args=(0, 1. / lambda_))
+ print(f"KS test statistic: {D}")
+ print(f"p-value: {p_value}")
+
+ # Anderson-Darling test
+ result = stats.anderson(your_data, dist='expon')
+ print(f"AD test statistic: {result.statistic}")
+ for i in range(len(result.critical_values)):
+ sl, cv = result.significance_level[i], result.critical_values[i]
+ if result.statistic < cv:
+ print(f"Significance level: {sl} : data looks like an exponential distribution (fail to reject H0)")
+ else:
+ print(f"Significance level: {sl} : data does not look like an exponential distribution (reject H0)")
+
+
+def execute_script():
+ epsilon: float = 0.0001
+ log: EventLog = pm4py.read_xes('../tests/input_data/receipt.xes', return_legacy_log_object=True)
+ time_intervals: list[list[Any]] = pm4py.convert_log_to_time_intervals(log, ('Confirmation of receipt', 'T02 Check confirmation of receipt'))
+ service_times = [min(x[1]-x[0], epsilon) for x in time_intervals]
+ arrival_diffs = []
+ i: int = 0
+ while i < len(time_intervals)-1:
+ arrival_diffs.append(max(time_intervals[i+1][0]-time_intervals[i][0], epsilon))
+ i = i + 1
+
+ check_exponential_distribution("service_times", service_times)
+ check_exponential_distribution("arrival_diffs", arrival_diffs)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/queue_check_max_conc_exec.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/queue_check_max_conc_exec.py
new file mode 100644
index 0000000000000000000000000000000000000000..5dca0687152242fd85c82b808cdb5d8b8bc8180b
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/queue_check_max_conc_exec.py
@@ -0,0 +1,37 @@
+import pm4py
+from pm4py.algo.transformation.log_to_interval_tree.variants import open_paths
+from pm4py.objects.log.obj import EventLog
+from pm4py.util.intervaltree import Interval, IntervalTree
+from typing import Any
+
+
+def execute_script():
+ """
+ Scripts checking the maximum number of concurrently open paths (in distinct cases of the log)
+ between two activities (in this situation, "Confirmation of receipt" and "T02 Check confirmation of receipt").
+ """
+ epsilon: float = 0.0001
+ log: EventLog = pm4py.read_xes('../tests/input_data/receipt.xes', return_legacy_log_object=True)
+ intervals: list[list[Any]] = pm4py.convert_log_to_time_intervals(log, ('Confirmation of receipt', 'T02 Check confirmation of receipt'))
+ interval_tree: IntervalTree = open_paths.interval_to_tree(intervals)
+ max_conc_exec: int = 0
+ argmax_conc_exec = None
+ for inte in intervals:
+ # check how many intervals in the three are open at the start and end point of this interval
+ # this leads to the maximum
+ at_start: list[Interval] = interval_tree[inte[0]-epsilon:inte[0]+epsilon]
+ at_end: list[Interval] = interval_tree[inte[1]-epsilon:inte[1]+epsilon]
+ if len(at_start) > max_conc_exec:
+ max_conc_exec = len(at_start)
+ argmax_conc_exec: tuple[Any, list[Interval]] = (inte[0], at_start)
+ if len(at_end) > max_conc_exec:
+ max_conc_exec = len(at_end)
+ argmax_conc_exec = (inte[1], at_end)
+ # prints the maximum number of concurrent paths,
+ # and the point in which the maximum was measured
+ print(max_conc_exec)
+ print(argmax_conc_exec)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/read_write_ocel.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/read_write_ocel.py
new file mode 100644
index 0000000000000000000000000000000000000000..914cd3c1742ac4390af04d5798449613e116976a
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/read_write_ocel.py
@@ -0,0 +1,52 @@
+import pm4py
+import os
+from pm4py.objects.ocel.obj import OCEL
+
+
+def execute_script():
+ ocel: OCEL = pm4py.read_ocel("../tests/input_data/ocel/example_log.jsonocel")
+ print(ocel)
+ print("attribute names: ", pm4py.ocel_get_attribute_names(ocel))
+ print("object types: ", pm4py.ocel_get_object_types(ocel))
+ print("flattening to order: ")
+ print(pm4py.ocel_flattening(ocel, "order"))
+ pm4py.write_ocel(ocel, "prova.jsonocel")
+ os.remove("prova.jsonocel")
+
+ print("ocel_object_type_activities")
+ print(pm4py.ocel_object_type_activities(ocel))
+
+ print("ocel_objects_ot_count")
+ print(pm4py.ocel_objects_ot_count(ocel))
+
+ print("filter_ocel_event_attribute")
+ ocel1: OCEL = pm4py.filter_ocel_event_attribute(ocel, "ocel:activity", ["Create Order"])
+ print(ocel1.get_extended_table())
+
+ print("filter_ocel_object_attribute")
+ ocel2: OCEL = pm4py.filter_ocel_object_attribute(ocel, "ocel:type", ["order", "delivery"])
+ print(ocel2.get_extended_table())
+
+ print("filter_ocel_object_types_allowed_activities")
+ ocel3: OCEL = pm4py.filter_ocel_object_types_allowed_activities(ocel, {"order": {"Create Order"}, "element": {"Create Order"}})
+ print(ocel3.get_extended_table())
+
+ print("filter_ocel_start_events_per_object_type")
+ ocel4: OCEL = pm4py.filter_ocel_start_events_per_object_type(ocel, "order")
+ print(ocel4.get_extended_table())
+
+ print("filter_ocel_end_events_per_object_type")
+ ocel5: OCEL = pm4py.filter_ocel_end_events_per_object_type(ocel, "order")
+ print(ocel5.get_extended_table())
+
+ print("filter_ocel_object_per_type_count")
+ ocel6: OCEL = pm4py.filter_ocel_object_per_type_count(ocel, {"order": 1, "element": 2})
+ print(ocel6.get_extended_table())
+
+ print("filter_ocel_events_timestamp")
+ ocel7: OCEL = pm4py.filter_ocel_events_timestamp(ocel, "1981-01-01 00:00:00", "1982-01-01 00:00:00")
+ print(ocel7.get_extended_table())
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/resource_profiles_log.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/resource_profiles_log.py
new file mode 100644
index 0000000000000000000000000000000000000000..20a34fb78239a564eed874c5e01dd2636f233a55
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/resource_profiles_log.py
@@ -0,0 +1,40 @@
+import os
+from pm4py.algo.organizational_mining.resource_profiles import algorithm
+import pm4py
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ # Metric RBI 1.1: Number of distinct activities done by a resource in a given time interval [t1, t2)
+ print(algorithm.distinct_activities(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sara"))
+ # Metric RBI 1.3: 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)
+ print(algorithm.activity_frequency(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sara", "decide"))
+ # Metric RBI 2.1: The number of activity instances completed by a given resource during a given time slot.
+ print(algorithm.activity_completions(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sara"))
+ # Metric RBI 2.2: The number of cases completed during a given time slot in which a given resource was involved.
+ print(algorithm.case_completions(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Pete"))
+ # Metric RBI 2.3: 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.
+ print(algorithm.fraction_case_completions(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Pete"))
+ # Metric RBI 2.4: The average number of activities started by a given resource but not completed at a moment in time.
+ print(algorithm.average_workload(log, "2010-12-30 00:00:00", "2011-01-15 00:00:00", "Mike"))
+ # Metric RBI 3.1: 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.
+ print(algorithm.multitasking(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Mike"))
+ # Metric RBI 4.3: The average duration of instances of a given activity completed during a given time slot by
+ # a given resource.
+ print(algorithm.average_duration_activity(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sue", "examine thoroughly"))
+ # Metric RBI 4.4: The average duration of cases completed during a given time slot in which a given resource was involved.
+ print(algorithm.average_case_duration(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sue"))
+ # Metric RBI 5.1: The number of cases completed during a given time slot in which two given resources were involved.
+ print(algorithm.interaction_two_resources(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Mike", "Pete"))
+ # Metric RBI 5.2: 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.
+ print(algorithm.social_position(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sue"))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/resource_profiles_pandas.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/resource_profiles_pandas.py
new file mode 100644
index 0000000000000000000000000000000000000000..f31422f8d4df1f98948c74ad1dd307c045f294b3
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/resource_profiles_pandas.py
@@ -0,0 +1,42 @@
+from pm4py.util import pandas_utils, constants
+from pm4py.objects.log.util import dataframe_utils
+import os
+from pm4py.algo.organizational_mining.resource_profiles import algorithm
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "running-example.csv"))
+ log = dataframe_utils.convert_timestamp_columns_in_df(log, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["time:timestamp"])
+ # Metric RBI 1.1: Number of distinct activities done by a resource in a given time interval [t1, t2)
+ print(algorithm.distinct_activities(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sara"))
+ # Metric RBI 1.3: 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)
+ print(algorithm.activity_frequency(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sara", "decide"))
+ # Metric RBI 2.1: The number of activity instances completed by a given resource during a given time slot.
+ print(algorithm.activity_completions(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sara"))
+ # Metric RBI 2.2: The number of cases completed during a given time slot in which a given resource was involved.
+ print(algorithm.case_completions(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Pete"))
+ # Metric RBI 2.3: 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.
+ print(algorithm.fraction_case_completions(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Pete"))
+ # Metric RBI 2.4: The average number of activities started by a given resource but not completed at a moment in time.
+ print(algorithm.average_workload(log, "2010-12-30 00:00:00", "2011-01-15 00:00:00", "Mike"))
+ # Metric RBI 3.1: 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.
+ print(algorithm.multitasking(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Mike"))
+ # Metric RBI 4.3: The average duration of instances of a given activity completed during a given time slot by
+ # a given resource.
+ print(algorithm.average_duration_activity(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sue", "examine thoroughly"))
+ # Metric RBI 4.4: The average duration of cases completed during a given time slot in which a given resource was involved.
+ print(algorithm.average_case_duration(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sue"))
+ # Metric RBI 5.1: The number of cases completed during a given time slot in which two given resources were involved.
+ print(algorithm.interaction_two_resources(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Mike", "Pete"))
+ # Metric RBI 5.2: 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.
+ print(algorithm.social_position(log, "2010-12-30 00:00:00", "2011-01-25 00:00:00", "Sue"))
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/revised_playout.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/revised_playout.py
new file mode 100644
index 0000000000000000000000000000000000000000..83b0fd198e0a574c8f4f9e01b206103891e37d98
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/revised_playout.py
@@ -0,0 +1,42 @@
+import pm4py
+from pm4py.objects.petri_net.obj import ResetInhibitorNet
+from pm4py.objects.petri_net.utils import petri_utils
+from examples import examples_conf
+import importlib.util
+import uuid
+import os
+import pandas
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "running-example.xes"))
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.discover_petri_net_inductive(log)
+ net, im, fm = pm4py.convert_petri_net_type(net, im, fm, type="reset_inhibitor")
+ # traditional playout
+ new_log: EventLog = pm4py.play_out(net, im, fm, parameters={"add_only_if_fm_is_reached": True})
+ print(len(new_log))
+ print(pm4py.get_event_attribute_values(new_log, "concept:name"))
+ print(pm4py.get_end_activities(new_log))
+ # playout after adding a place with 1 token for every transition
+ for trans in net.transitions:
+ new_place: PetriNet.Place = ResetInhibitorNet.Place(str(uuid.uuid4()))
+ net.places.add(new_place)
+ petri_utils.add_arc_from_to(new_place, trans, net, type=None)
+ im[new_place] = 1
+ # ensure that superset of the final marking (given the huge number of remaining tokens) are also considered valid
+ new_log2: EventLog = pm4py.play_out(net, im, fm, parameters={"add_only_if_fm_is_reached": True, "fm_leq_accepted": True})
+ print(len(new_log2))
+ print(pm4py.get_event_attribute_values(new_log2, "concept:name"))
+ print(pm4py.get_end_activities(new_log2))
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(net, im, fm, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/rework.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/rework.py
new file mode 100644
index 0000000000000000000000000000000000000000..a6baff0dd2a64550a8e545c5a6b30cbf8cad18f1
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/rework.py
@@ -0,0 +1,14 @@
+import pm4py
+import os
+from pm4py.statistics.rework.log import get as rework_get
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ rework: dict[str, int] = rework_get.apply(log)
+ print(rework)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/roles_detection.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/roles_detection.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6401d19949a9a2c79b1531678b91127677297ad
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/roles_detection.py
@@ -0,0 +1,18 @@
+import os
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.organizational_mining.roles import algorithm as roles_algorithm
+from pm4py.objects.log.obj import EventLog
+
+
+def execute_script():
+ # import the log
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "receipt.xes"), variant="nonstandard")
+
+ roles = roles_algorithm.apply(log)
+
+ # print the results (grouped activities) on the screen
+ print([x.activities for x in roles])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/saw_net_ocel_multi.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/saw_net_ocel_multi.py
new file mode 100644
index 0000000000000000000000000000000000000000..a881223856156f1f7c022143a7dc9fc2bf55fad8
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/saw_net_ocel_multi.py
@@ -0,0 +1,148 @@
+from pm4py.objects.petri_net.obj import Marking
+from pm4py.objects.petri_net.utils import petri_utils
+from pm4py.objects.petri_net.saw_net.obj import StochasticArcWeightNet
+from uuid import uuid4
+import importlib.util
+import os
+from pm4py.objects.petri_net.obj import PetriNet
+from pm4py.objects.petri_net.stochastic.obj import StochasticPetriNet
+
+
+def execute_script():
+ neto: StochasticArcWeightNet = StochasticArcWeightNet()
+ imo: Marking = Marking()
+ fmo: Marking = Marking()
+ sourceo: PetriNet.Place = StochasticArcWeightNet.Place("sourceo")
+ targeto: PetriNet.Place = StochasticArcWeightNet.Place("targeto")
+ # imo[sourceo] = 1
+ # fmo[targeto] = 1
+ neto.places.add(sourceo)
+ neto.places.add(targeto)
+ create_order_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Create Order")
+ send_package_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Send Package")
+ pay_order_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Pay Order")
+ item_issue_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Item Issue")
+ item_fixed_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Item Fixed")
+ skip_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), None)
+ neto.transitions.add(create_order_o)
+ neto.transitions.add(send_package_o)
+ neto.transitions.add(pay_order_o)
+ neto.transitions.add(item_issue_o)
+ neto.transitions.add(item_fixed_o)
+ neto.transitions.add(skip_o)
+ p1o: PetriNet.Place = StochasticArcWeightNet.Place("p1o")
+ p2o: PetriNet.Place = StochasticArcWeightNet.Place("p2o")
+ p3o: PetriNet.Place = StochasticArcWeightNet.Place("p3o")
+ p4o: PetriNet.Place = StochasticArcWeightNet.Place("p4o")
+ neto.places.add(p1o)
+ neto.places.add(p2o)
+ neto.places.add(p3o)
+ neto.places.add(p4o)
+ arc1o: PetriNet.Arc = petri_utils.add_arc_from_to(sourceo, create_order_o, neto, type="stochastic_arc")
+ arc2o: PetriNet.Arc = petri_utils.add_arc_from_to(create_order_o, p1o, neto, type="stochastic_arc")
+ arc3o: PetriNet.Arc = petri_utils.add_arc_from_to(p1o, item_issue_o, neto, type="stochastic_arc")
+ arc4o: PetriNet.Arc = petri_utils.add_arc_from_to(p1o, skip_o, neto, type="stochastic_arc")
+ arc5o: PetriNet.Arc = petri_utils.add_arc_from_to(item_issue_o, p2o, neto, type="stochastic_arc")
+ arc6o: PetriNet.Arc = petri_utils.add_arc_from_to(p2o, item_fixed_o, neto, type="stochastic_arc")
+ arc7o: PetriNet.Arc = petri_utils.add_arc_from_to(item_fixed_o, p3o, neto, type="stochastic_arc")
+ arc8o: PetriNet.Arc = petri_utils.add_arc_from_to(p3o, send_package_o, neto, type="stochastic_arc")
+ arc9o: PetriNet.Arc = petri_utils.add_arc_from_to(skip_o, p3o, neto, type="stochastic_arc")
+ arc10o: PetriNet.Arc = petri_utils.add_arc_from_to(send_package_o, p4o, neto, type="stochastic_arc")
+ arc11o: PetriNet.Arc = petri_utils.add_arc_from_to(p4o, pay_order_o, neto, type="stochastic_arc")
+ arc12o: PetriNet.Arc = petri_utils.add_arc_from_to(pay_order_o, targeto, neto, type="stochastic_arc")
+ arc1o.weight = {1: 3}
+ arc2o.weight = {1: 3}
+ arc3o.weight = {1: 1}
+ arc4o.weight = {1: 2}
+ arc5o.weight = {1: 1}
+ arc6o.weight = {1: 1}
+ arc7o.weight = {1: 1}
+ arc8o.weight = {1: 3}
+ arc9o.weight = {1: 2}
+ arc10o.weight = {1: 3}
+ arc11o.weight = {1: 3}
+ arc12o.weight = {1: 3}
+ sourcee: PetriNet.Place = StochasticArcWeightNet.Place("source")
+ targete: PetriNet.Place = StochasticArcWeightNet.Place("targete")
+ neto.places.add(sourcee)
+ neto.places.add(targete)
+ #imo[sourcee] = 3
+ create_order_e: StochasticPetriNet.Transition = create_order_o
+ send_package_e: StochasticPetriNet.Transition = send_package_o
+ item_issue_e: StochasticPetriNet.Transition = item_issue_o
+ item_fixed_e: StochasticPetriNet.Transition = item_fixed_o
+ skip_e: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), None)
+ neto.transitions.add(skip_e)
+ p1e: PetriNet.Place = StochasticArcWeightNet.Place("p1e")
+ p2e: PetriNet.Place = StochasticArcWeightNet.Place("p2e")
+ p3e: PetriNet.Place = StochasticArcWeightNet.Place("p3e")
+ neto.places.add(p1e)
+ neto.places.add(p2e)
+ neto.places.add(p3e)
+ arc1: PetriNet.Arc = petri_utils.add_arc_from_to(sourcee, create_order_e, neto, type="stochastic_arc")
+ arc2: PetriNet.Arc = petri_utils.add_arc_from_to(create_order_e, p1e, neto, type="stochastic_arc")
+ arc3: PetriNet.Arc = petri_utils.add_arc_from_to(p1e, skip_e, neto, type="stochastic_arc")
+ arc4: PetriNet.Arc = petri_utils.add_arc_from_to(p1e, item_issue_e, neto, type="stochastic_arc")
+ arc5: PetriNet.Arc = petri_utils.add_arc_from_to(item_issue_e, p2e, neto, type="stochastic_arc")
+ arc6: PetriNet.Arc = petri_utils.add_arc_from_to(p2e, item_fixed_e, neto, type="stochastic_arc")
+ arc7: PetriNet.Arc = petri_utils.add_arc_from_to(item_fixed_e, p3e, neto, type="stochastic_arc")
+ arc8: PetriNet.Arc = petri_utils.add_arc_from_to(skip_e, p3e, neto, type="stochastic_arc")
+ arc9: PetriNet.Arc = petri_utils.add_arc_from_to(p3e, send_package_e, neto, type="stochastic_arc")
+ arc10: PetriNet.Arc = petri_utils.add_arc_from_to(send_package_e, targete, neto, type="stochastic_arc")
+ arc1.weight = {2: 1, 3: 2}
+ arc2.weight = {2: 1, 3: 2}
+ arc3.weight = {2: 2, 3: 1}
+ arc4.weight = {1: 1}
+ arc5.weight = {1: 1}
+ arc6.weight = {1: 1}
+ arc7.weight = {1: 1}
+ arc8.weight = {2: 2, 3: 1}
+ arc9.weight = {2: 1, 3: 2}
+ arc10.weight = {2: 1, 3: 2}
+
+ decorations = {}
+ decorations[arc1o] = {"color": "blue"}
+ decorations[arc2o] = {"color": "blue"}
+ decorations[arc3o] = {"color": "blue"}
+ decorations[arc4o] = {"color": "blue"}
+ decorations[arc5o] = {"color": "blue"}
+ decorations[arc6o] = {"color": "blue"}
+ decorations[arc7o] = {"color": "blue"}
+ decorations[arc8o] = {"color": "blue"}
+ decorations[arc9o] = {"color": "blue"}
+ decorations[arc10o] = {"color": "blue"}
+ decorations[arc11o] = {"color": "blue"}
+ decorations[arc12o] = {"color": "blue"}
+ decorations[sourceo] = {"color": "blue"}
+ decorations[targeto] = {"color": "blue"}
+ decorations[p1o] = {"color": "blue"}
+ decorations[p2o] = {"color": "blue"}
+ decorations[p3o] = {"color": "blue"}
+ decorations[p4o] = {"color": "blue"}
+ decorations[skip_o] = {"color": "blue"}
+ decorations[arc1] = {"color": "red"}
+ decorations[arc2] = {"color": "red"}
+ decorations[arc3] = {"color": "red"}
+ decorations[arc4] = {"color": "red"}
+ decorations[arc5] = {"color": "red"}
+ decorations[arc6] = {"color": "red"}
+ decorations[arc7] = {"color": "red"}
+ decorations[arc8] = {"color": "red"}
+ decorations[arc9] = {"color": "red"}
+ decorations[arc10] = {"color": "red"}
+ decorations[sourcee] = {"color": "red"}
+ decorations[targete] = {"color": "red"}
+ decorations[p1e] = {"color": "red"}
+ decorations[p2e] = {"color": "red"}
+ decorations[p3e] = {"color": "red"}
+ decorations[skip_e] = {"color": "red"}
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as pn_visualizer
+ gviz = pn_visualizer.apply(neto, imo, fmo, parameters={"decorations": decorations})
+ pn_visualizer.save(gviz, "total.png")
+ os.remove("total.png")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/saw_net_ocel_single.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/saw_net_ocel_single.py
new file mode 100644
index 0000000000000000000000000000000000000000..ebdcec90bdea1541de0b21498e9fdc097561838f
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/saw_net_ocel_single.py
@@ -0,0 +1,126 @@
+from pm4py.objects.petri_net.obj import Marking
+from pm4py.objects.petri_net.utils import petri_utils
+from pm4py.objects.petri_net.saw_net.obj import StochasticArcWeightNet
+from uuid import uuid4
+import os
+import importlib.util
+from pm4py.objects.petri_net.obj import PetriNet
+from pm4py.objects.petri_net.stochastic.obj import StochasticPetriNet
+
+
+def execute_script():
+ neto: StochasticArcWeightNet = StochasticArcWeightNet()
+ imo: Marking = Marking()
+ fmo: Marking = Marking()
+ sourceo: PetriNet.Place = StochasticArcWeightNet.Place("sourceo")
+ targeto: PetriNet.Place = StochasticArcWeightNet.Place("targeto")
+ # imo[sourceo] = 1
+ # fmo[targeto] = 1
+ neto.places.add(sourceo)
+ neto.places.add(targeto)
+ create_order_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Create Order")
+ send_package_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Send Package")
+ pay_order_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Pay Order")
+ item_issue_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Item Issue")
+ item_fixed_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Item Fixed")
+ skip_o: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), None)
+ neto.transitions.add(create_order_o)
+ neto.transitions.add(send_package_o)
+ neto.transitions.add(pay_order_o)
+ neto.transitions.add(item_issue_o)
+ neto.transitions.add(item_fixed_o)
+ neto.transitions.add(skip_o)
+ p1o: PetriNet.Place = StochasticArcWeightNet.Place("p1o")
+ p2o: PetriNet.Place = StochasticArcWeightNet.Place("p2o")
+ p3o: PetriNet.Place = StochasticArcWeightNet.Place("p3o")
+ p4o: PetriNet.Place = StochasticArcWeightNet.Place("p4o")
+ neto.places.add(p1o)
+ neto.places.add(p2o)
+ neto.places.add(p3o)
+ neto.places.add(p4o)
+ arc1o: PetriNet.Arc = petri_utils.add_arc_from_to(sourceo, create_order_o, neto, type="stochastic_arc")
+ arc2o: PetriNet.Arc = petri_utils.add_arc_from_to(create_order_o, p1o, neto, type="stochastic_arc")
+ arc3o: PetriNet.Arc = petri_utils.add_arc_from_to(p1o, item_issue_o, neto, type="stochastic_arc")
+ arc4o: PetriNet.Arc = petri_utils.add_arc_from_to(p1o, skip_o, neto, type="stochastic_arc")
+ arc5o: PetriNet.Arc = petri_utils.add_arc_from_to(item_issue_o, p2o, neto, type="stochastic_arc")
+ arc6o: PetriNet.Arc = petri_utils.add_arc_from_to(p2o, item_fixed_o, neto, type="stochastic_arc")
+ arc7o: PetriNet.Arc = petri_utils.add_arc_from_to(item_fixed_o, p3o, neto, type="stochastic_arc")
+ arc8o: PetriNet.Arc = petri_utils.add_arc_from_to(p3o, send_package_o, neto, type="stochastic_arc")
+ arc9o: PetriNet.Arc = petri_utils.add_arc_from_to(skip_o, p3o, neto, type="stochastic_arc")
+ arc10o: PetriNet.Arc = petri_utils.add_arc_from_to(send_package_o, p4o, neto, type="stochastic_arc")
+ arc11o: PetriNet.Arc = petri_utils.add_arc_from_to(p4o, pay_order_o, neto, type="stochastic_arc")
+ arc12o: PetriNet.Arc = petri_utils.add_arc_from_to(pay_order_o, targeto, neto, type="stochastic_arc")
+ arc1o.weight = {1: 3}
+ arc2o.weight = {1: 3}
+ arc3o.weight = {1: 1}
+ arc4o.weight = {1: 2}
+ arc5o.weight = {1: 1}
+ arc6o.weight = {1: 1}
+ arc7o.weight = {1: 1}
+ arc8o.weight = {1: 3}
+ arc9o.weight = {1: 2}
+ arc10o.weight = {1: 3}
+ arc11o.weight = {1: 3}
+ arc12o.weight = {1: 3}
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as pn_visualizer
+ gviz = pn_visualizer.apply(neto, imo, fmo)
+ pn_visualizer.save(gviz, "folded_order.png")
+ os.remove("folded_order.png")
+
+ nete: StochasticArcWeightNet = StochasticArcWeightNet()
+ ime: Marking = Marking()
+ fme: Marking = Marking()
+ sourcee: PetriNet.Place = StochasticArcWeightNet.Place("source")
+ targete: PetriNet.Place = StochasticArcWeightNet.Place("targete")
+ nete.places.add(sourcee)
+ nete.places.add(targete)
+ # ime[sourcee] = 3
+ # fme[targete] = 3
+ create_order_e: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Create Order")
+ send_package_e: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Send Package")
+ item_issue_e: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Item Issue")
+ item_fixed_e: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), "Item Fixed")
+ skip_e: StochasticPetriNet.Transition = StochasticArcWeightNet.Transition(str(uuid4()), None)
+ nete.transitions.add(create_order_e)
+ nete.transitions.add(send_package_e)
+ nete.transitions.add(item_issue_e)
+ nete.transitions.add(item_fixed_e)
+ nete.transitions.add(skip_e)
+ p1e: PetriNet.Place = StochasticArcWeightNet.Place("p1e")
+ p2e: PetriNet.Place = StochasticArcWeightNet.Place("p2e")
+ p3e: PetriNet.Place = StochasticArcWeightNet.Place("p3e")
+ nete.places.add(p1e)
+ nete.places.add(p2e)
+ nete.places.add(p3e)
+ arc1: PetriNet.Arc = petri_utils.add_arc_from_to(sourcee, create_order_e, nete, type="stochastic_arc")
+ arc2: PetriNet.Arc = petri_utils.add_arc_from_to(create_order_e, p1e, nete, type="stochastic_arc")
+ arc3: PetriNet.Arc = petri_utils.add_arc_from_to(p1e, skip_e, nete, type="stochastic_arc")
+ arc4: PetriNet.Arc = petri_utils.add_arc_from_to(p1e, item_issue_e, nete, type="stochastic_arc")
+ arc5: PetriNet.Arc = petri_utils.add_arc_from_to(item_issue_e, p2e, nete, type="stochastic_arc")
+ arc6: PetriNet.Arc = petri_utils.add_arc_from_to(p2e, item_fixed_e, nete, type="stochastic_arc")
+ arc7: PetriNet.Arc = petri_utils.add_arc_from_to(item_fixed_e, p3e, nete, type="stochastic_arc")
+ arc8: PetriNet.Arc = petri_utils.add_arc_from_to(skip_e, p3e, nete, type="stochastic_arc")
+ arc9: PetriNet.Arc = petri_utils.add_arc_from_to(p3e, send_package_e, nete, type="stochastic_arc")
+ arc10: PetriNet.Arc = petri_utils.add_arc_from_to(send_package_e, targete, nete, type="stochastic_arc")
+ arc1.weight = {2: 1, 3: 2}
+ arc2.weight = {2: 1, 3: 2}
+ arc3.weight = {2: 2, 3: 1}
+ arc4.weight = {1: 1}
+ arc5.weight = {1: 1}
+ arc6.weight = {1: 1}
+ arc7.weight = {1: 1}
+ arc8.weight = {2: 2, 3: 1}
+ arc9.weight = {2: 1, 3: 2}
+ arc10.weight = {2: 1, 3: 2}
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as pn_visualizer
+ gviz = pn_visualizer.apply(nete, ime, fme)
+ pn_visualizer.save(gviz, "folded_item.png")
+ os.remove("folded_item.png")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/segments_retrieval_filtering.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/segments_retrieval_filtering.py
new file mode 100644
index 0000000000000000000000000000000000000000..5a23b983ecbe259a46de3da156567bcf3bfa4b24
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/segments_retrieval_filtering.py
@@ -0,0 +1,23 @@
+import pm4py
+import pandas
+from collections import Counter
+from pm4py.objects.log.obj import EventLog
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+
+ # gets the frequent trace segments
+ traces: Counter = pm4py.get_frequent_trace_segments(log, min_occ=100)
+
+ for t in traces:
+ # filter on the given trace segment, to obtain an event log where all the cases contain the trace segment
+ print(t)
+ filtered_log: EventLog | pandas.DataFrame = pm4py.filter_trace_segments(log, [t])
+ print(filtered_log)
+
+ break
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/simplified_interface.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/simplified_interface.py
new file mode 100644
index 0000000000000000000000000000000000000000..1d11626b64fe5027d275b0da3a5dc759ebc2c3d4
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/simplified_interface.py
@@ -0,0 +1,233 @@
+import os
+
+import pm4py
+from pm4py.util import constants, pandas_utils
+from pm4py.objects.log.util import dataframe_utils
+from examples import examples_conf
+import importlib.util
+import traceback
+import pandas
+from pm4py.objects.heuristics_net.obj import HeuristicsNet
+from pm4py.objects.log.obj import EventLog, EventStream
+from pm4py.objects.org.sna.obj import SNA
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ ENABLE_VISUALIZATION: bool = True
+
+ try:
+ # reads a XES into an event log
+ log1: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+
+ # reads a CSV into a dataframe
+ df: pandas.DataFrame = pandas_utils.read_csv("../tests/input_data/running-example.csv")
+ df = dataframe_utils.convert_timestamp_columns_in_df(df, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["time:timestamp"])
+ df["case:concept:name"] = df["case:concept:name"].astype("string")
+
+ # converts the dataframe to an event log
+ log2: EventLog = pm4py.convert_to_event_log(df)
+
+ # converts the log read from XES into a stream and dataframe respectively
+ stream1: EventStream = pm4py.convert_to_event_stream(log1)
+ df2: pandas.DataFrame = pm4py.convert_to_dataframe(log1)
+
+ # writes the log1 to a XES file
+ pm4py.write_xes(log1, "ru1.xes")
+
+ log1 = pm4py.format_dataframe(log1)
+
+ dfg: dict
+ dfg_sa: dict
+ dfg_ea: dict
+ dfg, dfg_sa, dfg_ea = pm4py.discover_dfg(log1)
+ petri_alpha: PetriNet
+ im_alpha: Marking
+ fm_alpha: Marking
+ petri_alpha, im_alpha, fm_alpha = pm4py.discover_petri_net_alpha(log1)
+ petri_inductive: PetriNet
+ im_inductive: Marking
+ fm_inductive: Marking
+ petri_inductive, im_inductive, fm_inductive = pm4py.discover_petri_net_inductive(log1)
+ petri_heuristics: PetriNet
+ im_heuristics: Marking
+ fm_heuristics: Marking
+ petri_heuristics, im_heuristics, fm_heuristics = pm4py.discover_petri_net_heuristics(log1)
+ tree_inductive: ProcessTree = pm4py.discover_process_tree_inductive(log1)
+ heu_net: HeuristicsNet = pm4py.discover_heuristics_net(log1)
+
+ pm4py.write_dfg(dfg, dfg_sa, dfg_ea, "ru_dfg.dfg")
+ dfg, dfg_sa, dfg_ea = pm4py.read_dfg("ru_dfg.dfg")
+
+ if importlib.util.find_spec("lxml"):
+ pm4py.write_pnml(petri_alpha, im_alpha, fm_alpha, "ru_alpha.pnml")
+ pm4py.write_pnml(petri_inductive, im_inductive, fm_inductive, "ru_inductive.pnml")
+ pm4py.write_pnml(petri_heuristics, im_heuristics, fm_heuristics, "ru_heuristics.pnml")
+ pm4py.write_ptml(tree_inductive, "ru_inductive.ptml")
+
+ petri_alpha, im_alpha, fm_alpha = pm4py.read_pnml("ru_alpha.pnml", auto_guess_final_marking=True)
+ petri_inductive, im_inductive, fm_inductive = pm4py.read_pnml("ru_inductive.pnml", auto_guess_final_marking=True)
+ petri_heuristics, im_heuristics, fm_heuristics = pm4py.read_pnml("ru_heuristics.pnml", auto_guess_final_marking=True)
+ tree_inductive = pm4py.read_ptml("ru_inductive.ptml")
+
+ if ENABLE_VISUALIZATION:
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_petri_net(petri_alpha, im_alpha, fm_alpha, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_petri_net(petri_inductive, im_inductive, fm_inductive, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_petri_net(petri_heuristics, im_heuristics, fm_heuristics, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_process_tree(tree_inductive, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_dfg(dfg, dfg_sa, dfg_ea, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.save_vis_petri_net(petri_alpha, im_alpha, fm_alpha, "ru_alpha.png")
+ pm4py.save_vis_petri_net(petri_inductive, im_inductive, fm_inductive, "ru_inductive.png")
+ pm4py.save_vis_petri_net(petri_heuristics, im_heuristics, fm_heuristics, "ru_heuristics.png")
+ pm4py.save_vis_process_tree(tree_inductive, "ru_inductive_tree.png")
+ pm4py.save_vis_dfg(dfg, dfg_sa, dfg_ea, "ru_dfg.png")
+ pm4py.save_vis_dotted_chart(log1, "dotted_chart.png")
+ pm4py.save_vis_performance_spectrum(log1, ["register request", "decide"], "ps.png")
+
+ if importlib.util.find_spec("pydotplus"):
+ pm4py.view_heuristics_net(heu_net, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.save_vis_heuristics_net(heu_net, "ru_heunet.png")
+ os.remove("ru_heunet.png")
+
+ if importlib.util.find_spec("matplotlib"):
+ pm4py.save_vis_events_per_time_graph(log1, "ev_time.png")
+ pm4py.save_vis_case_duration_graph(log1, "cd.png")
+ os.remove("ev_time.png")
+ os.remove("cd.png")
+
+ os.remove("ru_alpha.png")
+ os.remove("ru_inductive.png")
+ os.remove("ru_inductive_tree.png")
+ os.remove("ru_dfg.png")
+ os.remove("ru_heuristics.png")
+ os.remove("dotted_chart.png")
+ os.remove("ps.png")
+
+ aligned_traces: list[dict[str, Any]] = pm4py.conformance_diagnostics_alignments(log1, petri_inductive, im_inductive, fm_inductive, return_diagnostics_dataframe=False)
+ replayed_traces: list[dict[str, Any]] = pm4py.conformance_diagnostics_token_based_replay(log1, petri_inductive, im_inductive, fm_inductive, return_diagnostics_dataframe=False)
+
+ fitness_tbr: dict[str, float] = pm4py.fitness_token_based_replay(log1, petri_inductive, im_inductive, fm_inductive)
+ print("fitness_tbr", fitness_tbr)
+ fitness_align: dict[str, float] = pm4py.fitness_alignments(log1, petri_inductive, im_inductive, fm_inductive)
+ print("fitness_align", fitness_align)
+ precision_tbr: float = pm4py.precision_token_based_replay(log1, petri_inductive, im_inductive, fm_inductive)
+ print("precision_tbr", precision_tbr)
+ precision_align: float = pm4py.precision_alignments(log1, petri_inductive, im_inductive, fm_inductive)
+ print("precision_align", precision_align)
+
+ print("log start activities = ", pm4py.get_start_activities(log2))
+ print("df start activities = ", pm4py.get_start_activities(df2, case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp"))
+ print("log end activities = ", pm4py.get_end_activities(log2))
+ print("df end activities = ", pm4py.get_end_activities(df2, case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp"))
+ print("log attributes = ", pm4py.get_event_attributes(log2))
+ print("df attributes = ", pm4py.get_event_attributes(df2))
+ print("log org:resource values = ", pm4py.get_event_attribute_values(log2, "org:resource"))
+ print("df org:resource values = ", pm4py.get_event_attribute_values(df2, "org:resource", case_id_key="case:concept:name"))
+
+ print("start_activities len(filt_log) = ", len(pm4py.filter_start_activities(log2, ["register request"])))
+ print("start_activities len(filt_df) = ", len(pm4py.filter_start_activities(df2, ["register request"], case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp")))
+ print("end_activities len(filt_log) = ", len(pm4py.filter_end_activities(log2, ["pay compensation"])))
+ print("end_activities len(filt_df) = ", len(pm4py.filter_end_activities(df2, ["pay compensation"], case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp")))
+ print("attributes org:resource len(filt_log) (cases) cases = ",
+ len(pm4py.filter_event_attribute_values(log2, "org:resource", ["Ellen"], level="case")))
+ print("attributes org:resource len(filt_log) (cases) events = ",
+ len(pm4py.filter_event_attribute_values(log2, "org:resource", ["Ellen"], level="event")))
+ print("attributes org:resource len(filt_df) (events) cases = ",
+ len(pm4py.filter_event_attribute_values(df2, "org:resource", ["Ellen"], level="case", case_id_key="case:concept:name")))
+ print("attributes org:resource len(filt_df) (events) events = ",
+ len(pm4py.filter_event_attribute_values(df2, "org:resource", ["Ellen"], level="event", case_id_key="case:concept:name")))
+ print("attributes org:resource len(filt_df) (events) events notpositive = ",
+ len(pm4py.filter_event_attribute_values(df2, "org:resource", ["Ellen"], level="event", retain=False)))
+
+ print("rework df = ", pm4py.get_rework_cases_per_activity(df2, case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp"))
+ print("rework log = ", pm4py.get_rework_cases_per_activity(log2))
+ print("cases overlap df = ", pm4py.get_case_overlap(df2, case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp"))
+ print("cases overlap log = ", pm4py.get_case_overlap(log2))
+ print("cycle time df = ", pm4py.get_cycle_time(df2, case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp"))
+ print("cycle time log = ", pm4py.get_cycle_time(log2))
+
+ if ENABLE_VISUALIZATION:
+ if importlib.util.find_spec("graphviz") and importlib.util.find_spec("matplotlib"):
+ pm4py.view_events_distribution_graph(df2, case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp", format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_events_distribution_graph(log2, format=examples_conf.TARGET_IMG_FORMAT)
+
+ print("variants log = ", pm4py.get_variants_as_tuples(log2))
+ print("variants df = ", pm4py.get_variants_as_tuples(df2, case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp"))
+ print("variants filter log = ",
+ len(pm4py.filter_variants(log2, [
+ ("register request", "examine thoroughly", "check ticket", "decide", "reject request")])))
+ print("variants filter df = ",
+ len(pm4py.filter_variants(df2, [
+ ("register request", "examine thoroughly", "check ticket", "decide", "reject request")], case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp")))
+
+ print("paths filter log len = ",
+ len(pm4py.filter_directly_follows_relation(log2, [("register request", "examine casually")])))
+ print("paths filter dataframe len = ",
+ len(pm4py.filter_directly_follows_relation(df2, [("register request", "examine casually")], case_id_key="case:concept:name", activity_key="concept:name", timestamp_key="time:timestamp")))
+
+ print("timeframe filter log events len = ",
+ len(pm4py.filter_time_range(log2, "2011-01-01 00:00:00", "2011-02-01 00:00:00", mode="events")))
+ print("timeframe filter log traces_contained len = ",
+ len(pm4py.filter_time_range(log2, "2011-01-01 00:00:00", "2011-02-01 00:00:00", mode="traces_contained", case_id_key="case:concept:name", timestamp_key="time:timestamp")))
+ print("timeframe filter log traces_intersecting len = ",
+ len(pm4py.filter_time_range(log2, "2011-01-01 00:00:00", "2011-02-01 00:00:00", mode="traces_intersecting")))
+ print("timeframe filter df events len = ",
+ len(pm4py.filter_time_range(df2, "2011-01-01 00:00:00", "2011-02-01 00:00:00", mode="events", case_id_key="case:concept:name", timestamp_key="time:timestamp")))
+ print("timeframe filter df traces_contained len = ",
+ len(pm4py.filter_time_range(df2, "2011-01-01 00:00:00", "2011-02-01 00:00:00", mode="traces_contained", case_id_key="case:concept:name", timestamp_key="time:timestamp")))
+ print("timeframe filter df traces_intersecting len = ",
+ len(pm4py.filter_time_range(df2, "2011-01-01 00:00:00", "2011-02-01 00:00:00", mode="traces_intersecting", case_id_key="case:concept:name", timestamp_key="time:timestamp")))
+
+ wt_log: SNA = pm4py.discover_working_together_network(log2)
+ wt_df: SNA = pm4py.discover_working_together_network(df2, case_id_key="case:concept:name", resource_key="org:resource", timestamp_key="time:timestamp")
+ print("log working together", wt_log)
+ print("df working together", wt_df)
+ print("log subcontracting", pm4py.discover_subcontracting_network(log2))
+ print("df subcontracting", pm4py.discover_subcontracting_network(df2, case_id_key="case:concept:name", resource_key="org:resource", timestamp_key="time:timestamp"))
+ print("log working together", pm4py.discover_working_together_network(log2))
+ print("df working together", pm4py.discover_working_together_network(df2, case_id_key="case:concept:name", resource_key="org:resource", timestamp_key="time:timestamp"))
+ print("log similar activities", pm4py.discover_activity_based_resource_similarity(log2))
+ print("df similar activities", pm4py.discover_activity_based_resource_similarity(df2, case_id_key="case:concept:name", resource_key="org:resource", timestamp_key="time:timestamp", activity_key="concept:name"))
+ print("log org roles", pm4py.discover_organizational_roles(log2))
+ print("df org roles", pm4py.discover_organizational_roles(df2, case_id_key="case:concept:name", resource_key="org:resource", timestamp_key="time:timestamp", activity_key="concept:name"))
+
+ if ENABLE_VISUALIZATION:
+ if importlib.util.find_spec("graphviz") and importlib.util.find_spec("pyvis") and importlib.util.find_spec("networkx"):
+ pm4py.view_sna(wt_log)
+ pm4py.save_vis_sna(wt_df, "ru_wt_df.png")
+ os.remove("ru_wt_df.png")
+
+ footprints: list[dict[str, Any]] | dict[str, Any] = pm4py.discover_footprints(log1)
+ alignments: list[dict[str, Any]] = pm4py.conformance_diagnostics_alignments(log1, petri_inductive, im_inductive, fm_inductive, return_diagnostics_dataframe=False)
+
+ if ENABLE_VISUALIZATION:
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_footprints(footprints, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.view_alignments(log1, alignments, format=examples_conf.TARGET_IMG_FORMAT)
+ pm4py.save_vis_footprints(footprints, "footprints.png")
+ pm4py.save_vis_alignments(log1, aligned_traces, "alignments.png")
+ os.remove("footprints.png")
+ os.remove("alignments.png")
+ except:
+ traceback.print_exc()
+
+ # remove the temporary files
+ if os.path.exists("ru1.xes"):
+ os.remove("ru1.xes")
+ if os.path.exists("ru_dfg.dfg"):
+ os.remove("ru_dfg.dfg")
+ if os.path.exists("ru_alpha.pnml"):
+ os.remove("ru_alpha.pnml")
+ if os.path.exists("ru_inductive.pnml"):
+ os.remove("ru_inductive.pnml")
+ if os.path.exists("ru_heuristics.pnml"):
+ os.remove("ru_heuristics.pnml")
+ if os.path.exists("ru_inductive.ptml"):
+ os.remove("ru_inductive.ptml")
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/sna_log.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/sna_log.py
new file mode 100644
index 0000000000000000000000000000000000000000..da5622fc89c61a7bfb7c20094ffd24e16c66a054
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/sna_log.py
@@ -0,0 +1,34 @@
+import os
+
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.algo.organizational_mining.sna import algorithm as sna_algorithm
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.org.sna.obj import SNA
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "running-example.xes"))
+
+ hw_values: SNA = sna_algorithm.apply(log, variant=sna_algorithm.Variants.HANDOVER_LOG)
+ wt_values: SNA = sna_algorithm.apply(log, variant=sna_algorithm.Variants.WORKING_TOGETHER_LOG)
+ sub_values: SNA = sna_algorithm.apply(log, variant=sna_algorithm.Variants.SUBCONTRACTING_LOG)
+ ja_values: SNA = sna_algorithm.apply(log, variant=sna_algorithm.Variants.JOINTACTIVITIES_LOG)
+
+ if importlib.util.find_spec("graphviz") and importlib.util.find_spec("pyvis") and importlib.util.find_spec("networkx"):
+ from pm4py.visualization.sna import visualizer as pn_vis
+ gviz_sub = pn_vis.apply(sub_values, variant=pn_vis.Variants.NETWORKX,
+ parameters={pn_vis.Variants.NETWORKX.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ gviz_hw = pn_vis.apply(hw_values, variant=pn_vis.Variants.PYVIS)
+ gviz_wt = pn_vis.apply(wt_values, variant=pn_vis.Variants.NETWORKX,
+ parameters={pn_vis.Variants.NETWORKX.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ gviz_ja = pn_vis.apply(ja_values, variant=pn_vis.Variants.PYVIS)
+ pn_vis.view(gviz_sub, variant=pn_vis.Variants.NETWORKX)
+ pn_vis.view(gviz_hw, variant=pn_vis.Variants.PYVIS)
+ pn_vis.view(gviz_wt, variant=pn_vis.Variants.NETWORKX)
+ pn_vis.view(gviz_ja, variant=pn_vis.Variants.PYVIS)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/stochastic_petri_playout.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/stochastic_petri_playout.py
new file mode 100644
index 0000000000000000000000000000000000000000..c97dd36db1edc1260048a9423c077c96771189f0
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/stochastic_petri_playout.py
@@ -0,0 +1,60 @@
+import pm4py
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ # example on how stochastic Petri nets are defined, discovered and used in pm4py
+ log: EventLog = pm4py.read_xes("../tests/input_data/running-example.xes", return_legacy_log_object=True)
+
+ # first, we use a traditional process discovery algorithm (the inductive miner) to discover
+ # a sound workflow net from the event log
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.discover_petri_net_inductive(log)
+
+ # then, we can either define manually the distributions on the stochastic Petri net, or discover them from the log
+ # in the following lines, we automatically discover the stochastic map from the log
+ from pm4py.algo.simulation.montecarlo.utils import replay
+ smap0 = replay.get_map_from_log_and_net(log, net, im, fm)
+
+ # each transition of the original Petri net is associated to a stochastic variable, having a priority, a weight
+ # and a stochastic distribution on the firing times.
+ for trans in smap0:
+ print("\n")
+ print(trans)
+ print(dir(smap0[trans]))
+ # priority says: if in a marking a transition with higher priority
+ # is enabled, it should be considered before all the other transitions
+ # with lower priority disregarding the weight
+ print(smap0[trans].get_priority())
+ # weight sets the probability to fire the transition among all the
+ # transitions with the same priority
+ print(smap0[trans].get_weight())
+ # sets the random variable (independently from the weight)
+ print(smap0[trans].random_variable)
+
+ # as an alternative to discover the stochastic map from the log, we can define manually the stochastic map
+ # (for example, we set all the invisible to zero firing times, and the other transitions' execution times
+ # is set to a normal with average 1 and standard deviation 1
+ from pm4py.objects.random_variables.normal.random_variable import Normal
+ from pm4py.objects.random_variables.constant0.random_variable import Constant0
+
+ smap = {}
+ for t in net.transitions:
+ if t.label == "register request" or t.label is None:
+ v = Constant0()
+ else:
+ v = Normal(mu=1, sigma=1)
+ smap[t] = v
+
+ # eventually, we can use the stochastic Petri net with a specialized algorithm,
+ # such as the stochastic playout
+ from pm4py.algo.simulation.playout.petri_net.variants import stochastic_playout
+ ret_log = stochastic_playout.apply(net, im, fm, parameters={"smap": smap0})
+ print(ret_log)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_conformance_footprints.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_conformance_footprints.py
new file mode 100644
index 0000000000000000000000000000000000000000..d2b2088816dd412653f1fc290c25da336be523b5
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_conformance_footprints.py
@@ -0,0 +1,52 @@
+import os
+
+import pm4py
+
+from pm4py.algo.discovery.footprints import algorithm as fp_discovery
+from pm4py.streaming.algo.conformance.footprints import (
+ algorithm as streaming_fp_conf,
+)
+from pm4py.streaming.stream.live_event_stream import LiveEventStream
+import pandas
+from pm4py.objects.log.obj import EventStream
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ # imports a XES event log
+ log: pandas.DataFrame = pm4py.read_xes(
+ os.path.join("..", "tests", "input_data", "receipt.xes")
+ )
+ # converts the log into a list of events (not anymore grouped in cases)
+ event_stream: EventStream = pm4py.convert_to_event_stream(log)
+ # calculates a process tree using the IMf algorithm (50% noise)
+ tree: ProcessTree = pm4py.discover_process_tree_inductive(log, noise_threshold=0.5)
+ # discovers the footprint matrix from the process tree
+ footprints: dict[str, Any] = fp_discovery.apply(tree)
+ # creates a live event stream (an object that distributes the messages to the algorithm)
+ live_stream: LiveEventStream = LiveEventStream()
+ # creates the TBR streaming conformance checking object
+ conf_obj = streaming_fp_conf.apply(footprints)
+ # register the conformance checking object to the live event stream
+ live_stream.register(conf_obj)
+ # start the recording of events from the live event stream
+ live_stream.start()
+ # append each event of the original log to the live event stream
+ # (so it is sent to the conformance checking algorithm)
+ for event in event_stream:
+ live_stream.append(event)
+ # stops the live event stream
+ live_stream.stop()
+ # sends a termination signal to the conformance checking algorithm;
+ # the conditions on the closure of all the cases are checked
+ # (for each case, it is checked whether the end activity of the case
+ # is possible according to the footprints)
+ diagn_df = conf_obj.get()
+ conf_obj.terminate_all()
+ print(diagn_df)
+ print(diagn_df[diagn_df["is_fit"].eq(False)])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_conformance_tbr.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_conformance_tbr.py
new file mode 100644
index 0000000000000000000000000000000000000000..9ef1da12ffb555ea5a07f4a05652da39786dbe0f
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_conformance_tbr.py
@@ -0,0 +1,49 @@
+import os
+
+import pm4py
+
+from pm4py.streaming.algo.conformance.tbr import algorithm as streaming_tbr
+from pm4py.streaming.stream.live_event_stream import LiveEventStream
+import pandas
+from pm4py.objects.log.obj import EventStream
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+
+
+def execute_script():
+ # imports a XES event log
+ log: pandas.DataFrame = pm4py.read_xes(
+ os.path.join("..", "tests", "input_data", "receipt.xes")
+ )
+ # converts the log into a list of events (not anymore grouped in cases)
+ event_stream: EventStream = pm4py.convert_to_event_stream(log)
+ # calculates a process tree using the IMf algorithm (30% noise)
+ net: PetriNet
+ im: Marking
+ fm: Marking
+ net, im, fm = pm4py.discover_petri_net_inductive(log, noise_threshold=0.3)
+ # creates a live event stream (an object that distributes the messages to the algorithm)
+ live_stream: LiveEventStream = LiveEventStream()
+ # creates the TBR streaming conformance checking object
+ conf_obj = streaming_tbr.apply(net, im, fm)
+ # register the conformance checking object to the live event stream
+ live_stream.register(conf_obj)
+ # start the recording of events from the live event stream
+ live_stream.start()
+ # append each event of the original log to the live event stream
+ # (so it is sent to the conformance checking algorithm)
+ for event in event_stream:
+ live_stream.append(event)
+ # time.sleep(5)
+ # stops the live event stream
+ live_stream.stop()
+ # sends a termination signal to the conformance checking algorithm;
+ # the conditions on the closure of all the cases are checked
+ # (for each case, it is checked whether the final marking is reached)
+ diagn_df = conf_obj.get()
+ conf_obj.terminate_all()
+ print(diagn_df)
+ print(diagn_df[diagn_df["is_fit"].eq(False)])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_conformance_temporal_profile.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_conformance_temporal_profile.py
new file mode 100644
index 0000000000000000000000000000000000000000..b7eb7d5abd7c3b8d906b010aee16092ea6fcaf6f
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_conformance_temporal_profile.py
@@ -0,0 +1,24 @@
+import pm4py
+from pm4py.algo.discovery.temporal_profile import algorithm as temporal_profile_disc
+from pm4py.streaming.algo.conformance.temporal import algorithm as streaming_temporal_conformance
+from pm4py.streaming.stream.live_event_stream import LiveEventStream
+import pandas
+from pm4py.objects.log.obj import EventStream
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+ static_stream: EventStream = pm4py.convert_to_event_stream(log)
+ temporal_profile: dict[tuple[str, str], tuple[float, float]] = temporal_profile_disc.apply(log)
+ cc = streaming_temporal_conformance.apply(temporal_profile)
+ live_stream: LiveEventStream = LiveEventStream()
+ live_stream.register(cc)
+ live_stream.start()
+ for index, ev in enumerate(static_stream):
+ live_stream.append(ev)
+ live_stream.stop()
+ print(cc.get())
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_csv_reader_event_stream.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_csv_reader_event_stream.py
new file mode 100644
index 0000000000000000000000000000000000000000..5279979d5fe887632be25c983cacc600a293d9a4
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_csv_reader_event_stream.py
@@ -0,0 +1,21 @@
+import os
+
+from pm4py.streaming.importer.csv import importer as streaming_csv_importer
+from pm4py.streaming.stream.live_event_stream import LiveEventStream
+from pm4py.streaming.util.event_stream_printer import EventStreamPrinter
+
+
+def execute_script():
+ live_event_stream: LiveEventStream = LiveEventStream()
+ event_stream_printer: EventStreamPrinter = EventStreamPrinter()
+ live_event_stream.register(event_stream_printer)
+ live_event_stream.start()
+ importer = streaming_csv_importer.apply(
+ os.path.join("..", "tests", "input_data", "running-example.csv")
+ )
+ importer.to_event_stream(live_event_stream)
+ live_event_stream.stop()
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_declare.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_declare.py
new file mode 100644
index 0000000000000000000000000000000000000000..81862dede271a3adb646dc71f0ae5f20807bb424
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_declare.py
@@ -0,0 +1,28 @@
+import pm4py
+from pm4py.streaming.stream.live_event_stream import LiveEventStream
+from pm4py.streaming.algo.conformance.declare import algorithm as declare_streaming_cc
+import os
+import pandas
+from pm4py.objects.log.obj import EventStream
+from typing import Any
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ declare: dict[str, dict[Any, dict[str, int]]] = pm4py.discover_declare(log, min_support_ratio=0.3, min_confidence_ratio=1.0)
+ event_stream: EventStream = pm4py.convert_to_event_stream(log)
+ conf_obj = declare_streaming_cc.apply(declare)
+ live_stream: LiveEventStream = LiveEventStream()
+ live_stream.register(conf_obj)
+ live_stream.start()
+ for index, event in enumerate(event_stream):
+ live_stream.append(event)
+ live_stream.stop()
+ diagn_df = conf_obj.get()
+ print(diagn_df.keys())
+ print(diagn_df["total_events_processed"])
+ print(diagn_df["total_deviations"])
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_discovery_dfg.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_discovery_dfg.py
new file mode 100644
index 0000000000000000000000000000000000000000..d35b1351705c44e196c5addacbc952088a327437
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_discovery_dfg.py
@@ -0,0 +1,44 @@
+import os
+
+import pm4py
+from pm4py.streaming.algo.discovery.dfg import algorithm as dfg_discovery
+from pm4py.streaming.stream.live_event_stream import LiveEventStream
+from examples import examples_conf
+import importlib.util
+import pandas
+from pm4py.objects.log.obj import EventStream
+
+
+def execute_script():
+ # imports a XES event log
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ # converts the log into a list of events (not anymore grouped in cases)
+ event_stream: EventStream = pm4py.convert_to_event_stream(log)
+ # creates a live event stream (an object that distributes the messages to the algorithm)
+ live_stream: LiveEventStream = LiveEventStream()
+ # creates the streaming DFG discovery object
+ stream_dfg_disc = dfg_discovery.apply()
+ # register the discovery algorithm to the stream
+ live_stream.register(stream_dfg_disc)
+ # start the recording of events from the live event stream
+ live_stream.start()
+ # append each event of the original log to the live event stream
+ # (so it is sent to the conformance checking algorithm)
+ for index, event in enumerate(event_stream):
+ live_stream.append(event)
+ # stops the live event stream
+ live_stream.stop()
+ # gets the DFG along with the start and end activities from the stream
+ dfg, activities, start_activities, end_activities = stream_dfg_disc.get()
+
+ if importlib.util.find_spec("graphviz"):
+ # visualize the DFG
+ from pm4py.visualization.dfg import visualizer as dfg_visualizer
+ gviz = dfg_visualizer.apply(dfg, variant=dfg_visualizer.Variants.FREQUENCY, activities_count=activities,
+ parameters={"format": examples_conf.TARGET_IMG_FORMAT, "start_activities": start_activities,
+ "end_activities": end_activities})
+ dfg_visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_live_to_static_stream.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_live_to_static_stream.py
new file mode 100644
index 0000000000000000000000000000000000000000..dcf69b524137eafdcef638af74d24d5d2a39a16f
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_live_to_static_stream.py
@@ -0,0 +1,30 @@
+from pm4py.streaming.importer.csv.variants import csv_event_stream
+from pm4py.streaming.stream.live_event_stream import LiveEventStream
+from pm4py.streaming.util.live_to_static_stream import LiveToStaticStream
+
+
+def execute_script():
+ # creates a live event stream, forwarding events to its algorithmic listeners
+ live_stream: LiveEventStream = LiveEventStream()
+
+ # in this case, the listener that we register to the live stream
+ # just saves the list of events that are submitted to the live event stream
+ static_stream_converter: LiveToStaticStream = LiveToStaticStream()
+ live_stream.register(static_stream_converter)
+
+ # starts the live event stream
+ live_stream.start()
+ # reads a CSV line-by-line and send its rows to the live event stream
+ csv_reader = csv_event_stream.apply("../tests/input_data/running-example.csv")
+ csv_reader.to_event_stream(live_stream)
+
+ # stops the live event stream
+ live_stream.stop()
+
+ # gets the list of events stored inside the converter
+ static_stream = static_stream_converter.get()
+ print(static_stream)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_xes_reader_event_stream.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_xes_reader_event_stream.py
new file mode 100644
index 0000000000000000000000000000000000000000..027c62fc3810afabaad03b6268561c030642c1b7
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_xes_reader_event_stream.py
@@ -0,0 +1,22 @@
+import os
+
+from pm4py.streaming.importer.xes import importer as streaming_xes_importer
+from pm4py.streaming.stream.live_event_stream import LiveEventStream
+from pm4py.streaming.util.event_stream_printer import EventStreamPrinter
+
+
+def execute_script():
+ live_event_stream: LiveEventStream = LiveEventStream()
+ event_stream_printer: EventStreamPrinter = EventStreamPrinter()
+ live_event_stream.register(event_stream_printer)
+ live_event_stream.start()
+ importer = streaming_xes_importer.apply(
+ os.path.join("..", "tests", "input_data", "running-example.xes"),
+ variant=streaming_xes_importer.Variants.XES_EVENT_STREAM,
+ )
+ importer.to_event_stream(live_event_stream)
+ live_event_stream.stop()
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_xes_reader_trace_stream.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_xes_reader_trace_stream.py
new file mode 100644
index 0000000000000000000000000000000000000000..72c9ec047ac953fbff47205a67f9c7d3f0a94323
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/streaming_xes_reader_trace_stream.py
@@ -0,0 +1,22 @@
+import os
+
+from pm4py.streaming.importer.xes import importer as streaming_xes_importer
+from pm4py.streaming.stream.live_trace_stream import LiveTraceStream
+from pm4py.streaming.util.trace_stream_printer import TraceStreamPrinter
+
+
+def execute_script():
+ live_trace_stream: LiveTraceStream = LiveTraceStream()
+ trace_stream_printer: TraceStreamPrinter = TraceStreamPrinter()
+ live_trace_stream.register(trace_stream_printer)
+ live_trace_stream.start()
+ importer = streaming_xes_importer.apply(
+ os.path.join("..", "tests", "input_data", "running-example.xes"),
+ variant=streaming_xes_importer.Variants.XES_TRACE_STREAM,
+ )
+ importer.to_trace_stream(live_trace_stream)
+ live_trace_stream.stop()
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/temporal_features.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/temporal_features.py
new file mode 100644
index 0000000000000000000000000000000000000000..0982d96bc0a535c36a4633dd7cba95b39e342b7b
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/temporal_features.py
@@ -0,0 +1,13 @@
+import pm4py
+import os
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"))
+ temporal_features: pandas.DataFrame = pm4py.extract_temporal_features_dataframe(log, grouper_freq="W")
+ print(temporal_features)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/temporal_profile_dataframe.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/temporal_profile_dataframe.py
new file mode 100644
index 0000000000000000000000000000000000000000..2ade30dad8753be77a281a2ae59475d169d350de
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/temporal_profile_dataframe.py
@@ -0,0 +1,19 @@
+from pm4py.algo.discovery.temporal_profile import algorithm as temporal_profile_discovery
+from pm4py.algo.conformance.temporal_profile import algorithm as temporal_profile_conformance
+from pm4py.util import constants, pandas_utils
+from pm4py.objects.log.util import dataframe_utils
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pandas_utils.read_csv("../tests/input_data/receipt.csv")
+ dataframe = dataframe_utils.convert_timestamp_columns_in_df(dataframe, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT)
+ tf: dict[tuple[str, str], tuple[float, float]] = temporal_profile_discovery.apply(dataframe)
+ conformance: list[list[tuple[float, float, float, float]]] = temporal_profile_conformance.apply(dataframe, tf, parameters={"zeta": 6.0})
+ for index, dev in enumerate(conformance):
+ if len(dev) > 0:
+ print(index, dev)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/temporal_profile_log.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/temporal_profile_log.py
new file mode 100644
index 0000000000000000000000000000000000000000..5e63a52ce64fdc2f35bec7a0a0f7740710d872bb
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/temporal_profile_log.py
@@ -0,0 +1,17 @@
+import pm4py
+from pm4py.algo.discovery.temporal_profile import algorithm as temporal_profile_discovery
+from pm4py.algo.conformance.temporal_profile import algorithm as temporal_profile_conformance
+import pandas
+
+
+def execute_script():
+ log: pandas.DataFrame = pm4py.read_xes("../tests/input_data/receipt.xes")
+ tf: dict[tuple[str, str], tuple[float, float]] = temporal_profile_discovery.apply(log)
+ conformance: list[list[tuple[float, float, float, float]]] = temporal_profile_conformance.apply(log, tf, parameters={"zeta": 6.0})
+ for index, dev in enumerate(conformance):
+ if len(dev) > 0:
+ print(index, dev)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/test_evaluation.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/test_evaluation.py
new file mode 100644
index 0000000000000000000000000000000000000000..f0f0930268a833aed89d47b408551933b1a49226
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/test_evaluation.py
@@ -0,0 +1,24 @@
+import os
+
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.algo.evaluation import algorithm as general_evaluation
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ log: EventLog = xes_importer.apply(os.path.join("..", "tests", "input_data", "reviewing.xes"))
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ marking: Marking
+ final_marking: Marking
+ net, marking, final_marking = process_tree_converter.apply(process_tree)
+ metrics: dict[str, float] = general_evaluation.apply(log, net, marking, final_marking)
+ print("metrics=", metrics)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timeline_dfg.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timeline_dfg.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6ff995d411fae92c5da80790a8a0f3067731529
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timeline_dfg.py
@@ -0,0 +1,21 @@
+import pm4py
+from pm4py.algo.discovery.dfg.variants import clean_time
+from pm4py.visualization.dfg.variants import timeline as timeline_gviz_generator
+from pm4py.visualization.dfg import visualizer as dfg_visualizer
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pm4py.read_xes("../tests/input_data/running-example.xes")
+
+ dfg, start_act, end_act = pm4py.discover_dfg_typed(dataframe)
+
+ dfg_time = clean_time.apply(dataframe)
+
+ gviz = timeline_gviz_generator.apply(dfg, dfg_time, parameters={"format": "svg", "start_activities": start_act,
+ "end_activities": end_act})
+ dfg_visualizer.view(gviz)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timestamp_case_grouping_filter.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timestamp_case_grouping_filter.py
new file mode 100644
index 0000000000000000000000000000000000000000..d3a699ce85c50f3898ba179017fd2c66d5f09ba8
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timestamp_case_grouping_filter.py
@@ -0,0 +1,15 @@
+import pm4py
+from pm4py.algo.filtering.pandas.timestamp_case_grouping import timestamp_case_grouping_filter
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pm4py.read_xes("../tests/input_data/roadtraffic100traces.xes")
+ print(dataframe)
+ filtered_dataframe: pandas.DataFrame = timestamp_case_grouping_filter.apply(dataframe, parameters={"filter_type": "concat"})
+ print(filtered_dataframe)
+ print(filtered_dataframe["concept:name"].value_counts())
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timestamp_granularity.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timestamp_granularity.py
new file mode 100644
index 0000000000000000000000000000000000000000..be4888660717e305fe352d7e5f1d2ad17e558324
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timestamp_granularity.py
@@ -0,0 +1,40 @@
+import pm4py
+from pm4py.util import constants, pandas_utils
+import time
+import pandas
+
+
+def execute_script():
+ dataframe: pandas.DataFrame = pandas_utils.read_csv("../tests/input_data/receipt.csv")
+ dataframe = pm4py.format_dataframe(dataframe, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT)
+
+ # prints the original timestamp column of the dataframe
+ print(dataframe["time:timestamp"])
+
+ # Here are some common options that you can use as a granularity:
+ #
+ # 'h': Hour
+ # 'min': Minute
+ # 's': Second
+ # 'ms': Millisecond
+ # 'ns': Nanosecond
+
+ st = time.time_ns()
+ # cast on the minute
+ dataframe["time:timestamp"] = dataframe["time:timestamp"].dt.floor(freq='min')
+ ct = time.time_ns()
+
+ print("required time for the timestamp casting: %.2f seconds" % ((ct-st)/10**9))
+
+ # prints the new timestamp column of the dataframe
+ print(dataframe["time:timestamp"])
+
+ # for completeness, we report some alternatives methods in Pandas to do the same (casting on the minute):
+ #
+ # dataframe["time:timestamp"] = dataframe["time:timestamp"].apply(lambda x: x.replace(second=0, microsecond=0))
+ #
+ # dataframe["time:timestamp"] = dataframe["time:timestamp"].dt.round('min')
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timestamp_interleavings.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timestamp_interleavings.py
new file mode 100644
index 0000000000000000000000000000000000000000..110e4bc46ba366093bb0a17535aa44d56ca4bb17
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/timestamp_interleavings.py
@@ -0,0 +1,34 @@
+from pm4py.util import constants, pandas_utils
+from pm4py.algo.discovery.ocel.interleavings import algorithm as interleavings_miner
+from pm4py.objects.log.util import dataframe_utils
+from examples import examples_conf
+import importlib.util
+import os
+import pandas
+
+
+def execute_script():
+ receipt_even: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "interleavings", "receipt_even.csv"))
+ receipt_odd: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "interleavings", "receipt_odd.csv"))
+ receipt_even = dataframe_utils.convert_timestamp_columns_in_df(receipt_even, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["time:timestamp"])
+ receipt_odd = dataframe_utils.convert_timestamp_columns_in_df(receipt_odd, timest_format=constants.DEFAULT_TIMESTAMP_PARSE_FORMAT, timest_columns=["time:timestamp"])
+ case_relations: pandas.DataFrame = pandas_utils.read_csv(os.path.join("..", "tests", "input_data", "interleavings", "case_relations.csv"))
+ interleavings_dataframe = interleavings_miner.apply(receipt_even, receipt_odd, case_relations)
+ print(interleavings_dataframe)
+ # print the frequency and the direction of the interleavings
+ print(interleavings_dataframe[["@@source_activity", "@@target_activity", "@@direction"]].value_counts())
+ # print the performance of the interleavings
+ print(interleavings_dataframe.groupby(["@@source_activity", "@@target_activity", "@@direction"])["@@timestamp_diff"].agg("mean"))
+
+ if importlib.util.find_spec("graphviz") and constants.DEFAULT_ENABLE_VISUALIZATIONS_VIEW:
+ from pm4py.visualization.ocel.interleavings import visualizer as interleavings_visualizer
+ # visualizes the frequency of the interleavings
+ gviz_freq = interleavings_visualizer.apply(receipt_even, receipt_odd, interleavings_dataframe, parameters={"annotation": "frequency", "format": examples_conf.TARGET_IMG_FORMAT})
+ interleavings_visualizer.view(gviz_freq)
+ # visualizes the performance of the interleavings
+ gviz_perf = interleavings_visualizer.apply(receipt_even, receipt_odd, interleavings_dataframe, parameters={"annotation": "performance", "aggregation_measure": "median", "format": examples_conf.TARGET_IMG_FORMAT})
+ interleavings_visualizer.view(gviz_perf)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/token_replay_alpha.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/token_replay_alpha.py
new file mode 100644
index 0000000000000000000000000000000000000000..de8ca66e46510c5c28ba9df71cc7b5895af42050
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/token_replay_alpha.py
@@ -0,0 +1,41 @@
+import os
+
+from pm4py.algo.conformance.tokenreplay import algorithm as token_replay
+from pm4py.algo.discovery.alpha import algorithm as alpha_miner
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from typing import Any
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "running-example.xes")
+ log: EventLog = xes_importer.apply(log_path)
+ net: PetriNet
+ marking: Marking
+ final_marking: Marking
+ net, marking, final_marking = alpha_miner.apply(log)
+ for place in marking:
+ print("initial marking " + place.name)
+ for place in final_marking:
+ print("final marking " + place.name)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as pn_vis
+ gviz = pn_vis.apply(net, marking, final_marking,
+ parameters={pn_vis.Variants.WO_DECORATION.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ pn_vis.view(gviz)
+
+ print("started token replay")
+ aligned_traces: list[dict[str, Any]] = token_replay.apply(log, net, marking, final_marking)
+ fit_traces = [x for x in aligned_traces if x['trace_is_fit']]
+ perc_fitness: float = 0.00
+ if len(aligned_traces) > 0:
+ perc_fitness = len(fit_traces) / len(aligned_traces)
+ print("perc_fitness=", perc_fitness)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/token_replay_imdf.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/token_replay_imdf.py
new file mode 100644
index 0000000000000000000000000000000000000000..5035665d89d3837a9c68c5dc8a73843275490cf7
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/token_replay_imdf.py
@@ -0,0 +1,45 @@
+import os
+
+from pm4py.algo.conformance.tokenreplay import algorithm as token_replay
+from pm4py.algo.discovery.inductive import algorithm as inductive_miner
+from pm4py.objects.log.importer.xes import importer as xes_importer
+from pm4py.objects.conversion.process_tree import converter as process_tree_converter
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.petri_net.obj import Marking, PetriNet
+from pm4py.objects.process_tree.obj import ProcessTree
+from typing import Any
+
+
+def execute_script():
+ log_path: str = os.path.join("..", "tests", "input_data", "running-example.xes")
+ log: EventLog = xes_importer.apply(log_path)
+ print("loaded log")
+ process_tree: ProcessTree = inductive_miner.apply(log)
+ net: PetriNet
+ marking: Marking
+ final_marking: Marking
+ net, marking, final_marking = process_tree_converter.apply(process_tree)
+ for place in marking:
+ print("initial marking " + place.name)
+ for place in final_marking:
+ print("final marking " + place.name)
+
+ if importlib.util.find_spec("graphviz"):
+ from pm4py.visualization.petri_net import visualizer as pn_vis
+ gviz = pn_vis.apply(net, marking, final_marking,
+ parameters={pn_vis.Variants.WO_DECORATION.value.Parameters.FORMAT: examples_conf.TARGET_IMG_FORMAT})
+ pn_vis.view(gviz)
+
+ print("started token replay")
+ aligned_traces: list[dict[str, Any]] = token_replay.apply(log, net, marking, final_marking)
+ fit_traces = [x for x in aligned_traces if x['trace_is_fit']]
+ perc_fitness: float = 0.00
+ if len(aligned_traces) > 0:
+ perc_fitness = len(fit_traces) / len(aligned_traces)
+ print("perc_fitness=", perc_fitness)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/trace_attrib_hierarch_cluster.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/trace_attrib_hierarch_cluster.py
new file mode 100644
index 0000000000000000000000000000000000000000..3b4b3c3dd5e4a79af40e748f333bf5923b92d2cb
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/trace_attrib_hierarch_cluster.py
@@ -0,0 +1,29 @@
+import pm4py
+from pm4py.algo.clustering.trace_attribute_driven import algorithm as clust_algorithm
+from pm4py.objects.log.obj import EventLog
+
+
+def recursive_print_clusters(cluster_tree, rec_depth=0):
+ if rec_depth > 0:
+ # print the values belonging to the current part of the tree
+ # (this allows filtering the event log on a given part of the tree)
+ print("\t"*rec_depth, cluster_tree["name"].split("-"))
+
+ for child in cluster_tree["children"]:
+ recursive_print_clusters(child, rec_depth+1)
+
+ if not cluster_tree["children"]:
+ # there are no children, explicitly tell that
+ print("\t"*(rec_depth+1), "END")
+
+
+def execute_script():
+ log: EventLog = pm4py.read_xes("../tests/input_data/receipt.xes", return_legacy_log_object=True)
+ log = pm4py.sample_cases(log, num_cases=20)
+ # perform hierarchical clustering on the 'responsible' attribute of the log
+ cluster_tree = clust_algorithm.apply(log, "responsible")[0]
+ recursive_print_clusters(cluster_tree)
+
+
+if __name__ == "__main__":
+ execute_script()
diff --git a/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/trace_clustering.py b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/trace_clustering.py
new file mode 100644
index 0000000000000000000000000000000000000000..b99f4c3ecbe7c5f0e151d39fdfab47e2363021f5
--- /dev/null
+++ b/source_data/pinned/pm4py-process/tag-2.7.23.11/examples/trace_clustering.py
@@ -0,0 +1,25 @@
+import pm4py
+import os
+from examples import examples_conf
+import importlib.util
+from pm4py.objects.log.obj import EventLog
+from pm4py.objects.process_tree.obj import ProcessTree
+
+
+def execute_script():
+ dataframe: EventLog = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes"), return_legacy_log_object=True)
+
+ # define a K-Means with 3 clusters
+ from pm4py.util import ml_utils
+ clusterer = ml_utils.KMeans(n_clusters=3, random_state=0, n_init="auto")
+
+ for clust_log in pm4py.cluster_log(dataframe, sklearn_clusterer=clusterer):
+ print(clust_log)
+ process_tree: ProcessTree = pm4py.discover_process_tree_inductive(clust_log)
+
+ if importlib.util.find_spec("graphviz"):
+ pm4py.view_process_tree(process_tree, format=examples_conf.TARGET_IMG_FORMAT)
+
+
+if __name__ == "__main__":
+ execute_script()