ruleminer


Nameruleminer JSON
Version 0.2.19 PyPI version JSON
download
home_pageNone
SummaryPython package to mine association rules in datasets
upload_time2024-12-19 11:20:26
maintainerNone
docs_urlNone
authorWillem Jan Willemse
requires_python<3.13,>=3.9
licenseMIT/X
keywords association rules pandas
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ruleminer

[![Documentation](https://readthedocs.org/projects/ruleminer/badge)](https://ruleminer.readthedocs.io/en/latest/)
[![image](https://img.shields.io/pypi/v/ruleminer.svg)](https://pypi.python.org/pypi/ruleminer)
[![image](https://img.shields.io/pypi/pyversions/ruleminer.svg)](https://pypi.python.org/pypi/ruleminer)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/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](https://github.com/wjwillemse/ruleminer/tree/main/docs/paper.pdf).
-   Free software: MIT/X license
-   Documentation: <https://ruleminer.readthedocs.io/en/latest>.

## 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

* Willem Jan Willemse <https://github.com/wjwillemse>


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ruleminer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": "association rules, pandas",
    "author": "Willem Jan Willemse",
    "author_email": "w.j.willemse@freedom.nl",
    "download_url": "https://files.pythonhosted.org/packages/e6/79/a8a0a10a6162accb3990a23036c80bcf12c84126b0a63d8422c17bb10bd6/ruleminer-0.2.19.tar.gz",
    "platform": null,
    "description": "# ruleminer\n\n[![Documentation](https://readthedocs.org/projects/ruleminer/badge)](https://ruleminer.readthedocs.io/en/latest/)\n[![image](https://img.shields.io/pypi/v/ruleminer.svg)](https://pypi.python.org/pypi/ruleminer)\n[![image](https://img.shields.io/pypi/pyversions/ruleminer.svg)](https://pypi.python.org/pypi/ruleminer)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\nPython package to discover association rules in Pandas DataFrames. \n\nThis package implements the code of the paper [Discovering and ranking validation rules in supervisory data](https://github.com/wjwillemse/ruleminer/tree/main/docs/paper.pdf).\n-   Free software: MIT/X license\n-   Documentation: <https://ruleminer.readthedocs.io/en/latest>.\n\n## Features\n\nHere is what the package does:\n\n* Generate human-readable validation rules using rule templates containing regular expressions and a Pandas DataFrame dataset\n\n  - available functions: min, max, abs, quantile, sum, substr, split, count, sumif and countif\n  - including parameters for metric filters and rule precisions (including XBRL tolerances)\n\n* Evaluate rules and calculate association rules metrics\n\n  - available metrics: abs support, abs exceptions, confidence, support, added value, casual confidence, casual support, conviction, lift and rule power factor\n\nHere are some examples of rule templates with regexes with which you can generate validation rules:\n\n  - *if ({\"Type\"} == \".*\") then ({\".*\"} > 0)*\n\n  - *if ({\".*\"} > 0) then (({\".*\"} == 0) & ({\".*\"} > 0))*\n\n  - *(({\".*\"} + {\".*\"} + {\".*\"}) == {\".*\"})*\n\n  - *({\"Own funds\"} <= quantile({\"Own funds\"}, 0.95))*\n\n  - *(substr({\"Type\"}, 0, 1) in [\"a\", \"b\"])*\n\nThe first template generates (with the dataset described in the Usage section) rules like\n\n  - *if ({\"Type\"} == \"non-life_insurer\") then ({\"TP-nonlife\"} > 0)*\n  - *if ({\"Type\"} == \"life_insurer\") then ({\"TP-life\"} > 0)*\n\nThese generated validation rules can then be used to validate new datasets.\n\n## Contributors\n\n* Willem Jan Willemse <https://github.com/wjwillemse>\n\n",
    "bugtrack_url": null,
    "license": "MIT/X",
    "summary": "Python package to mine association rules in datasets",
    "version": "0.2.19",
    "project_urls": null,
    "split_keywords": [
        "association rules",
        " pandas"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1728c30b495f80722caf5b8341dd91823c8f9124abd1499cffa65697ced14900",
                "md5": "4b3ec36b515e4bfca456227bc5ae4861",
                "sha256": "5bd6f97dac9c1d4788b12992ccc4feb43014411d21e7c94da1664971ddaef975"
            },
            "downloads": -1,
            "filename": "ruleminer-0.2.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b3ec36b515e4bfca456227bc5ae4861",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 33404,
            "upload_time": "2024-12-19T11:20:20",
            "upload_time_iso_8601": "2024-12-19T11:20:20.355928Z",
            "url": "https://files.pythonhosted.org/packages/17/28/c30b495f80722caf5b8341dd91823c8f9124abd1499cffa65697ced14900/ruleminer-0.2.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e679a8a0a10a6162accb3990a23036c80bcf12c84126b0a63d8422c17bb10bd6",
                "md5": "2316ce8e227a8427515429cfc4c39920",
                "sha256": "aed68481dc57d2c7f6d5e2e0e9508eecf0206257ad0327e5e233d879de3a31dc"
            },
            "downloads": -1,
            "filename": "ruleminer-0.2.19.tar.gz",
            "has_sig": false,
            "md5_digest": "2316ce8e227a8427515429cfc4c39920",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 31076,
            "upload_time": "2024-12-19T11:20:26",
            "upload_time_iso_8601": "2024-12-19T11:20:26.459034Z",
            "url": "https://files.pythonhosted.org/packages/e6/79/a8a0a10a6162accb3990a23036c80bcf12c84126b0a63d8422c17bb10bd6/ruleminer-0.2.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-19 11:20:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ruleminer"
}
        
Elapsed time: 1.79171s