firefly-cpp / NiaARM

A minimalistic framework for Numerical Association Rule Mining
MIT License
15 stars 6 forks source link

Fix division by zero error during acc calculation #113

Closed erkankarabulut closed 3 months ago

erkankarabulut commented 3 months ago

This pull request is relevant to the following issue: https://github.com/firefly-cpp/NiaARM/issues/112.

In rule.py, while calculating acc as part of amplitude rule quality criterion, the code throws a division by zero warning if the feature_max == feature_min.

In that case, acc is increased by one, instead of the division.

firefly-cpp commented 3 months ago

Thanks, @erkankarabulut