Skip to content

Commit

Permalink
fix null features weights
Browse files Browse the repository at this point in the history
  • Loading branch information
agrimagsrl committed Jul 10, 2020
1 parent e313975 commit ecd649f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sefr/sefr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ecd649f

Please sign in to comment.