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.

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

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.9.tar.gz (17.6 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.9-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file enc4ppm-0.1.9.tar.gz.

File metadata

  • Download URL: enc4ppm-0.1.9.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for enc4ppm-0.1.9.tar.gz
Algorithm Hash digest
SHA256 7eb45ab330f322434e8efeba797f165507b17874f66f31570ba51f703818748b
MD5 4da944bf0fcbb80f77fc52a3aaa89423
BLAKE2b-256 2a2c3c226ccef0bc833f9f36c1f322f828072baadbba702effa7c184ae59121f

See more details on using hashes here.

File details

Details for the file enc4ppm-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: enc4ppm-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for enc4ppm-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2457bcc145a74cc828c1ec43969cb825c5610f6f857c90c530a19048e6401fcb
MD5 3b11333a53e013bce7819548815f6d3f
BLAKE2b-256 297f70cc5385f350875585ccd88788af82152c19f938415e7fb5bfcce434aaae

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