Skip to main content

Simplify numerical association rule mining

Project description

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.

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

tinynarm-0.3.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

tinynarm-0.3.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file tinynarm-0.3.1.tar.gz.

File metadata

  • Download URL: tinynarm-0.3.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.4 Linux/6.10.6-200.fc40.x86_64

File hashes

Hashes for tinynarm-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ccd89eaa76cf85ac3d2f941c66b97bad676187cc5a2502ac6453607ff604f478
MD5 ead1c4403edeff8baf3d984dd39e02dd
BLAKE2b-256 e4580b0f7c17270bc89c3e434bd6d7cda7d20d6c0fc0b168e0171fe548595761

See more details on using hashes here.

File details

Details for the file tinynarm-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: tinynarm-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.4 Linux/6.10.6-200.fc40.x86_64

File hashes

Hashes for tinynarm-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3b33a96c59b4a3d17f2fc5cc751b1a8769572cf52082384c5038497c7a0600e
MD5 588f0ddab36be9ffe7ab30f55c44bc0e
BLAKE2b-256 49815fdbc1cbdeb1069b9d66362e630141690567e59f58110eab74fb94e5654f

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