tinyNARM
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:
pip install tinynarm
🚀 Usage
Basic run
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
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. 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 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. 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. arXiv preprint arXiv:2010.15524 (2020).
[4] Stupan, Ž., Fister, I. Jr. (2022). NiaARM: A minimalistic framework for Numerical Association Rule Mining. Journal of Open Source Software, 7(77), 4448.
Metadata
Release files for tinynarm 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tinynarm-0.3.2.tar.gz | 6.4 kB | Without provenance | Details for tinynarm-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tinynarm-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for tinynarm-0.3.2-py3-none-any.whl |
Total release size: 14.2 kB
Release files / tinynarm-0.3.2.tar.gz
| Download URL | tinynarm-0.3.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9828242c53b206395296e7fde89195a2bec32051ff8be76c224d14d7e5690478
|
|
BLAKE2b-256 checksum How to use checksums |
72820a28f4e7d943b4b8950058ea5edc793dc5d97b41b526541adebe3dc22682
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.13.1 Linux/6.12.8-200.fc41.x86_64
|
Release files / tinynarm-0.3.2-py3-none-any.whl
| Download URL | tinynarm-0.3.2-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b3eb72fe5b9a9b7df7126c16ddf79a8c7ec1c7e23b57028561b345de65e5f18
|
|
BLAKE2b-256 checksum How to use checksums |
0d5f5ca1500fb3814347465e4268f94571accc8479ea737e97284cba711d732d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.13.1 Linux/6.12.8-200.fc41.x86_64
|
Security for tinynarm 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.