Encoding For Predictive Process Monitoring (enc4ppm)
enc4ppm is a Python package than provides common process mining encodings.
Installation
Using pip:
pip install enc4ppm
Example
The following example performs frequency encoding with latest payload for next activity prediction task:
import pandas as pd
from enc4ppm.frequency_encoder import FrequencyEncoder
from enc4ppm.constants import LabelingType
# Load log
log = pd.read_csv('bpic2012.csv')
# Create encoder
encoder = FrequencyEncoder(
labeling_type=LabelingType.NEXT_ACTIVITY,
include_latest_payload=True,
attributes=['AMOUNT_REQ'],
)
# Encode log
encoded_log = encoder.encode(log)
Features
- Frequency, simple-index and complex-index encodings
- Next activity, remaining time and outcome labelings
- Save encoder to disk for later use
- Freeze encoder on training set, then use it on unseen data (automatic handling of unknown values)
- Standardize numerical features
- Convert categorical features to one-hot encoding, or keep them as strings
- Add time features (time since case start and time since last event) to the encoding
Development
Documentation
Documentation is provided by mkdocs. To build and push the documentation website to GitHub, run the following command: mkdocs gh-deploy.
License
MIT License
Metadata
Release files for enc4ppm 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| enc4ppm-0.1.9.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| enc4ppm-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.7 kB
Release files / enc4ppm-0.1.9.tar.gz
| Download URL | enc4ppm-0.1.9.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7eb45ab330f322434e8efeba797f165507b17874f66f31570ba51f703818748b
|
|
BLAKE2b-256 checksum How to use checksums |
2a2c3c226ccef0bc833f9f36c1f322f828072baadbba702effa7c184ae59121f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / enc4ppm-0.1.9-py3-none-any.whl
| Download URL | enc4ppm-0.1.9-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2457bcc145a74cc828c1ec43969cb825c5610f6f857c90c530a19048e6401fcb
|
|
BLAKE2b-256 checksum How to use checksums |
297f70cc5385f350875585ccd88788af82152c19f938415e7fb5bfcce434aaae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|