Skip to main content

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.

Documentation and reference.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enc4ppm-0.1.8.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enc4ppm-0.1.8-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

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

Hashes for enc4ppm-0.1.8.tar.gz
Algorithm Hash digest
SHA256 cf787ce0506de8d39bdc32b0c648c61dee7b155881999fc342d79f1810b04959
MD5 84aaf2442f0ef25d28219cd3e23ae5cb
BLAKE2b-256 e82f081046328191b6476f756a538989a4cffd726f929614a41d55c9dda1d993

See more details on using hashes here.

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

Hashes for enc4ppm-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2e1a8d8ad198d2b8b8081bab93577dbe52d8e2a8aa81a55d9efb833ea7efd627
MD5 162e928744b3e1917f1413fe3dc23a2c
BLAKE2b-256 7813b836b6e4f7d761765ea62b7bb156026ad937e567634b74255dd3bfad6137

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page