tinynarm


Nametinynarm JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://gitlab.com/firefly-cpp/tinynarm
SummarySimplify numerical association rule mining
upload_time2024-04-12 15:32:09
maintainerNone
docs_urlNone
authorIztok Fister Jr.
requires_python<4.0,>=3.9
licenseNone
keywords association rule mining data science numerical association rule mining tinyml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tinyNARM

---

[![PyPI Version](https://img.shields.io/pypi/v/tinynarm.svg)](https://pypi.python.org/pypi/tinynarm)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tinynarm.svg)
![PyPI - Downloads](https://img.shields.io/pypi/dm/tinynarm.svg)
[![Downloads](https://pepy.tech/badge/tinynarm)](https://pepy.tech/project/tinynarm)

## About

tinyNARM is an experimental effort in approaching/tailoring the classical Numerical Association Rule Mining (NARM) to limited hardware devices, e.g., ESP32 microcontrollers so that devices do not need to depend on remote servers for making decisions. Motivation mainly lies in smart agriculture, where Internet connectivity is unavailable in rural areas.

The current repository hosts a tinyNARM algorithm prototype initially developed in Python for fast prototyping.

## Detailed insights
The current version includes (but is not limited to) the following functions:

- loading datasets in CSV format,
- discretizing numerical features to discrete classes,
- association rule mining using the tinynarm approach,
- easy comparison with the NiaARM approach.

## Installation

### pip

Install tinyNARM with pip:

```sh
pip install tinynarm
```

## Usage

### Basic run

```python
from tinynarm import TinyNarm
from tinynarm.utils import Utils

tnarm = TinyNarm("new_dataset.csv")
tnarm.create_rules()

postprocess = Utils(tnarm.rules)
postprocess.add_fitness()
postprocess.sort_rules()
postprocess.rules_to_csv("rules.csv")
postprocess.generate_statistics()
postprocess.generate_stats_report(20)
```

### Discretization

```python
from tinynarm.discretization import Discretization

dataset = Discretization("datasets/sportydatagen.csv", 5)
data = dataset.generate_dataset()
dataset.dataset_to_csv(data, "new_dataset.csv")
```

## References

[1] I. Fister Jr., A. Iglesias, A. Gálvez, J. Del Ser, E. Osaba, I Fister. [Differential evolution for association rule mining using categorical and numerical attributes](http://www.iztok-jr-fister.eu/static/publications/231.pdf) In: Intelligent data engineering and automated learning - IDEAL 2018, pp. 79-88, 2018.

[2] I. Fister Jr., V. Podgorelec, I. Fister. [Improved Nature-Inspired Algorithms for Numeric Association Rule Mining](https://link.springer.com/chapter/10.1007/978-3-030-68154-8_19). In: Vasant P., Zelinka I., Weber GW. (eds) Intelligent Computing and Optimization. ICO 2020. Advances in Intelligent Systems and Computing, vol 1324. Springer, Cham.

[3] I. Fister Jr., I. Fister [A brief overview of swarm intelligence-based algorithms for numerical association rule mining](https://arxiv.org/abs/2010.15524). arXiv preprint arXiv:2010.15524 (2020).

[4] Stupan, Ž., Fister, I. Jr. (2022). [NiaARM: A minimalistic framework for Numerical Association Rule Mining](https://joss.theoj.org/papers/10.21105/joss.04448.pdf). Journal of Open Source Software, 7(77), 4448.

## Cite us

Fister Jr, I., Fister, I., Galvez, A., & Iglesias, A. (2023, August). [TinyNARM: Simplifying Numerical Association Rule Mining for Running on Microcontrollers](https://www.iztok.xyz/static/publications/313.pdf). In International Conference on Soft Computing Models in Industrial and Environmental Applications (pp. 122-131). Cham: Springer Nature Switzerland.

## License

This package is distributed under the MIT License. This license can be found online at <http://www.opensource.org/licenses/MIT>.

## Disclaimer

This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/firefly-cpp/tinynarm",
    "name": "tinynarm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "association rule mining, data science, numerical association rule mining, tinyML",
    "author": "Iztok Fister Jr.",
    "author_email": "iztok@iztok-jr-fister.eu",
    "download_url": "https://files.pythonhosted.org/packages/2b/6d/56b8f6727af3f2d56799c472dbb45551cd983d1cc8c826804260a4426cb5/tinynarm-0.2.1.tar.gz",
    "platform": null,
    "description": "# tinyNARM\n\n---\n\n[![PyPI Version](https://img.shields.io/pypi/v/tinynarm.svg)](https://pypi.python.org/pypi/tinynarm)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tinynarm.svg)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/tinynarm.svg)\n[![Downloads](https://pepy.tech/badge/tinynarm)](https://pepy.tech/project/tinynarm)\n\n## About\n\ntinyNARM is an experimental effort in approaching/tailoring the classical Numerical Association Rule Mining (NARM) to limited hardware devices, e.g., ESP32 microcontrollers so that devices do not need to depend on remote servers for making decisions. Motivation mainly lies in smart agriculture, where Internet connectivity is unavailable in rural areas.\n\nThe current repository hosts a tinyNARM algorithm prototype initially developed in Python for fast prototyping.\n\n## Detailed insights\nThe current version includes (but is not limited to) the following functions:\n\n- loading datasets in CSV format,\n- discretizing numerical features to discrete classes,\n- association rule mining using the tinynarm approach,\n- easy comparison with the NiaARM approach.\n\n## Installation\n\n### pip\n\nInstall tinyNARM with pip:\n\n```sh\npip install tinynarm\n```\n\n## Usage\n\n### Basic run\n\n```python\nfrom tinynarm import TinyNarm\nfrom tinynarm.utils import Utils\n\ntnarm = TinyNarm(\"new_dataset.csv\")\ntnarm.create_rules()\n\npostprocess = Utils(tnarm.rules)\npostprocess.add_fitness()\npostprocess.sort_rules()\npostprocess.rules_to_csv(\"rules.csv\")\npostprocess.generate_statistics()\npostprocess.generate_stats_report(20)\n```\n\n### Discretization\n\n```python\nfrom tinynarm.discretization import Discretization\n\ndataset = Discretization(\"datasets/sportydatagen.csv\", 5)\ndata = dataset.generate_dataset()\ndataset.dataset_to_csv(data, \"new_dataset.csv\")\n```\n\n## References\n\n[1] I. Fister Jr., A. Iglesias, A. G\u00e1lvez, J. Del Ser, E. Osaba, I Fister. [Differential evolution for association rule mining using categorical and numerical attributes](http://www.iztok-jr-fister.eu/static/publications/231.pdf) In: Intelligent data engineering and automated learning - IDEAL 2018, pp. 79-88, 2018.\n\n[2] I. Fister Jr., V. Podgorelec, I. Fister. [Improved Nature-Inspired Algorithms for Numeric Association Rule Mining](https://link.springer.com/chapter/10.1007/978-3-030-68154-8_19). In: Vasant P., Zelinka I., Weber GW. (eds) Intelligent Computing and Optimization. ICO 2020. Advances in Intelligent Systems and Computing, vol 1324. Springer, Cham.\n\n[3] I. Fister Jr., I. Fister [A brief overview of swarm intelligence-based algorithms for numerical association rule mining](https://arxiv.org/abs/2010.15524). arXiv preprint arXiv:2010.15524 (2020).\n\n[4] Stupan, \u017d., Fister, I. Jr. (2022). [NiaARM: A minimalistic framework for Numerical Association Rule Mining](https://joss.theoj.org/papers/10.21105/joss.04448.pdf). Journal of Open Source Software, 7(77), 4448.\n\n## Cite us\n\nFister Jr, I., Fister, I., Galvez, A., & Iglesias, A. (2023, August). [TinyNARM: Simplifying Numerical Association Rule Mining for Running on Microcontrollers](https://www.iztok.xyz/static/publications/313.pdf). In International Conference on Soft Computing Models in Industrial and Environmental Applications (pp. 122-131). Cham: Springer Nature Switzerland.\n\n## License\n\nThis package is distributed under the MIT License. This license can be found online at <http://www.opensource.org/licenses/MIT>.\n\n## Disclaimer\n\nThis framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Simplify numerical association rule mining",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://gitlab.com/firefly-cpp/tinynarm",
        "Repository": "https://gitlab.com/firefly-cpp/tinynarm"
    },
    "split_keywords": [
        "association rule mining",
        " data science",
        " numerical association rule mining",
        " tinyml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "83d22ccdd88dc189af7c89bf0a37109b46da1e80d1a7a7b8011dba7a35b2f988",
                "md5": "688837946941ceddcc5673e2634e574c",
                "sha256": "39fbb09134f9764742b787078951e4d3a8dc646dae046f72fb5d34e619636948"
            },
            "downloads": -1,
            "filename": "tinynarm-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "688837946941ceddcc5673e2634e574c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 7529,
            "upload_time": "2024-04-12T15:32:07",
            "upload_time_iso_8601": "2024-04-12T15:32:07.993658Z",
            "url": "https://files.pythonhosted.org/packages/83/d2/2ccdd88dc189af7c89bf0a37109b46da1e80d1a7a7b8011dba7a35b2f988/tinynarm-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b6d56b8f6727af3f2d56799c472dbb45551cd983d1cc8c826804260a4426cb5",
                "md5": "8353b0bdfbb01c0c81c959c84fcd1424",
                "sha256": "d21e2d4ca2cffa9dda61fe73bba2eb082f9930e516f7f4fe9d60a1493456b4d0"
            },
            "downloads": -1,
            "filename": "tinynarm-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8353b0bdfbb01c0c81c959c84fcd1424",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 6066,
            "upload_time": "2024-04-12T15:32:09",
            "upload_time_iso_8601": "2024-04-12T15:32:09.119470Z",
            "url": "https://files.pythonhosted.org/packages/2b/6d/56b8f6727af3f2d56799c472dbb45551cd983d1cc8c826804260a4426cb5/tinynarm-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-12 15:32:09",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "firefly-cpp",
    "gitlab_project": "tinynarm",
    "lcname": "tinynarm"
}
        
Elapsed time: 0.22468s