Encode logs for predictive process monitoring
Project description
Encoding For Predictive Process Monitoring (enc4ppm)
enc4ppm is a Python package than provides common process mining encodings.
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
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)
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file enc4ppm-0.1.8.tar.gz.
File metadata
- Download URL: enc4ppm-0.1.8.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf787ce0506de8d39bdc32b0c648c61dee7b155881999fc342d79f1810b04959
|
|
| MD5 |
84aaf2442f0ef25d28219cd3e23ae5cb
|
|
| BLAKE2b-256 |
e82f081046328191b6476f756a538989a4cffd726f929614a41d55c9dda1d993
|
File details
Details for the file enc4ppm-0.1.8-py3-none-any.whl.
File metadata
- Download URL: enc4ppm-0.1.8-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e1a8d8ad198d2b8b8081bab93577dbe52d8e2a8aa81a55d9efb833ea7efd627
|
|
| MD5 |
162e928744b3e1917f1413fe3dc23a2c
|
|
| BLAKE2b-256 |
7813b836b6e4f7d761765ea62b7bb156026ad937e567634b74255dd3bfad6137
|