diff --git a/sefr/sefr.py b/sefr/sefr.py index 6044113..ec97295 100644 --- a/sefr/sefr.py +++ b/sefr/sefr.py @@ -41,7 +41,7 @@ def fit(self, train_predictors, train_target): # weights are calculated based on Eq. 3 and Eq. 4 - self.weights = (avg_pos - avg_neg) / (avg_pos + avg_neg) # Eq. 5 + self.weights = (avg_pos - avg_neg) / (avg_pos + avg_neg + 0.0000001) # Eq. 5 # For each record, a score is calculated. If the record is positive/negative, the score will be added to posscore/negscore diff --git a/setup.py b/setup.py index aaa6c8d..ce09fe7 100644 --- a/setup.py +++ b/setup.py @@ -3,13 +3,13 @@ setup( name = 'sefr', packages = ['sefr'], - version = '1.0.1', + version = '1.0.2', license='MIT', description = 'A Fast Linear-Time Classifier for Ultra-Low Power Devices', author = 'Simone Salerno', author_email = 'eloquentarduino@gmail.com', url = 'https://github.com/eloquentarduino/sefr', - download_url = 'https://github.com/eloquentarduino/sefr/archive/v_101.tar.gz', + download_url = 'https://github.com/eloquentarduino/sefr/archive/v_102.tar.gz', keywords = [ 'ML', 'microcontrollers',