Skip to main content

Python package to mine association rules in datasets

Project description

ruleminer

Documentation image image License: MIT Ruff

Python package to discover association rules in Pandas DataFrames.

This package implements the code of the paper Discovering and ranking validation rules in supervisory data.

Features

Here is what the package does:

  • Generate human-readable validation rules using rule templates containing regular expressions and a Pandas DataFrame dataset

    • available functions: min, max, abs, quantile, sum, substr, split, count, sumif and countif
    • including parameters for metric filters and rule precisions (including XBRL tolerances)
  • Evaluate rules and calculate association rules metrics

    • available metrics: abs support, abs exceptions, confidence, support, added value, casual confidence, casual support, conviction, lift and rule power factor

Here are some examples of rule templates with regexes with which you can generate validation rules:

  • if ({"Type"} == ".") then ({"."} > 0)

  • if ({"."} > 0) then (({"."} == 0) & ({"."} > 0))*

  • (({"."} + {"."} + {"."}) == {"."})

  • ({"Own funds"} <= quantile({"Own funds"}, 0.95))

  • (substr({"Type"}, 0, 1) in ["a", "b"])

The first template generates (with the dataset described in the Usage section) rules like

  • if ({"Type"} == "non-life_insurer") then ({"TP-nonlife"} > 0)
  • if ({"Type"} == "life_insurer") then ({"TP-life"} > 0)

These generated validation rules can then be used to validate new datasets.

Contributors

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

ruleminer-0.2.7.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

ruleminer-0.2.7-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file ruleminer-0.2.7.tar.gz.

File metadata

  • Download URL: ruleminer-0.2.7.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for ruleminer-0.2.7.tar.gz
Algorithm Hash digest
SHA256 12d101a9794b6214f4febce25c618396a507a936c8c5be312a36689d1edc33c4
MD5 6fa40eace2e6e7d7443a72a41c3f3521
BLAKE2b-256 107e4ae5ecd9a5a21e0a78050468961adcef1c0fdd48ada6bdbdcf3f8f57c963

See more details on using hashes here.

File details

Details for the file ruleminer-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: ruleminer-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for ruleminer-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 15352cf111aa84035b043759bc8d8cbd91ce53362326f6dbaa6c4ccdf8bf4f4f
MD5 965f3893e6cad39f5883ee3e401fac78
BLAKE2b-256 9a121c245963d5864338e1f6efcdb454d5d70c1449223a807852976c808e67f5

See more details on using hashes here.

Supported by

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