<div align="center">
<h1 align="center">
tinyNARM
</h1>
</div>
<div align="center">
<p align="center">
<a href="https://pypi.python.org/pypi/tinynarm">
<img alt="PyPI Version" src="https://img.shields.io/pypi/v/tinynarm.svg">
</a>
<a href="#">
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/tinynarm.svg">
</a>
<a href="#">
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/tinynarm.svg">
</a>
<a href="https://pepy.tech/project/tinynarm">
<img alt="Downloads" src="https://pepy.tech/badge/tinynarm">
</a>
</p>
</div>
<div align="center">
<p align="center">
<a href="#-detailed-insights">๐ Detailed insights</a> โข
<a href="#-installation">๐ฆ Installation</a> โข
<a href="#-usage">๐ Usage</a> โข
<a href="#-license">๐ License</a> โข
<a href="#-cite-us">๐ Cite us</a> โข
<a href="#-references">๐ References</a>
</p>
</div>
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
To install `tinyNARM` with pip, use:
```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")
```
## ๐ 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!
## ๐ 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.
## ๐ 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.
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/18/9b/e6eadaac371e88b048bd9116c286ec099dc4a12621f02c2708b613508cb7/tinynarm-0.3.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <h1 align=\"center\">\n tinyNARM\n </h1>\n</div>\n\n<div align=\"center\">\n <p align=\"center\">\n <a href=\"https://pypi.python.org/pypi/tinynarm\">\n <img alt=\"PyPI Version\" src=\"https://img.shields.io/pypi/v/tinynarm.svg\">\n </a>\n <a href=\"#\">\n <img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/tinynarm.svg\">\n </a>\n <a href=\"#\">\n <img alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/tinynarm.svg\">\n </a>\n <a href=\"https://pepy.tech/project/tinynarm\">\n <img alt=\"Downloads\" src=\"https://pepy.tech/badge/tinynarm\">\n </a>\n </p>\n</div>\n\n<div align=\"center\">\n <p align=\"center\">\n <a href=\"#-detailed-insights\">\ud83d\udd0d Detailed insights</a> \u2022\n <a href=\"#-installation\">\ud83d\udce6 Installation</a> \u2022\n <a href=\"#-usage\">\ud83d\ude80 Usage</a> \u2022\n <a href=\"#-license\">\ud83d\udd11 License</a> \u2022\n <a href=\"#-cite-us\">\ud83d\udcc4 Cite us</a> \u2022\n <a href=\"#-references\">\ud83d\udcdd References</a>\n </p>\n</div>\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## \ud83d\udd0d 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## \ud83d\udce6 Installation\n\n### pip\n\nTo install `tinyNARM` with pip, use:\n\n```sh\npip install tinynarm\n```\n\n## \ud83d\ude80 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## \ud83d\udd11 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\n## \ud83d\udcc4 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## \ud83d\udcdd 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.",
"bugtrack_url": null,
"license": null,
"summary": "Simplify numerical association rule mining",
"version": "0.3.0",
"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": "22c69a5f84cbc8b09fba3ea94ca3ee5455b869330615396d16cc4254f3849be5",
"md5": "1cac0ac71a72d7ae05f5f30c79125601",
"sha256": "25b6037ee5d882ac800b00aa949ab1d560ff5d4dfa2470bdcb399ec0e7a37239"
},
"downloads": -1,
"filename": "tinynarm-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1cac0ac71a72d7ae05f5f30c79125601",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 7744,
"upload_time": "2024-08-23T18:18:55",
"upload_time_iso_8601": "2024-08-23T18:18:55.924422Z",
"url": "https://files.pythonhosted.org/packages/22/c6/9a5f84cbc8b09fba3ea94ca3ee5455b869330615396d16cc4254f3849be5/tinynarm-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "189be6eadaac371e88b048bd9116c286ec099dc4a12621f02c2708b613508cb7",
"md5": "afe470dab12be35621b22f9883e6483e",
"sha256": "ae3075733d77b838fbb0045e93fc3638c1b42b9f0860c7db8dff1ccef640607b"
},
"downloads": -1,
"filename": "tinynarm-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "afe470dab12be35621b22f9883e6483e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 6443,
"upload_time": "2024-08-23T18:18:57",
"upload_time_iso_8601": "2024-08-23T18:18:57.100050Z",
"url": "https://files.pythonhosted.org/packages/18/9b/e6eadaac371e88b048bd9116c286ec099dc4a12621f02c2708b613508cb7/tinynarm-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-23 18:18:57",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "firefly-cpp",
"gitlab_project": "tinynarm",
"lcname": "tinynarm"
}