firefly-cpp / NiaARM

A minimalistic framework for Numerical Association Rule Mining
MIT License
16 stars 5 forks source link

Fix division by zero error during acc calculation #113

Closed erkankarabulut closed 8 months ago

erkankarabulut commented 8 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 8 months ago

Thanks, @erkankarabulut