Skip to content

Commit

Permalink
Fix SS3 hyperparameter initialization bug
Browse files Browse the repository at this point in the history
When a new instance of the SS3 classifier was created, hyperparameter
with a value of 0 were initialized using the default. This was due to a
bad condition checking. New the check is explicit ("is None") which
solved the problem.
  • Loading branch information
sergioburdisso committed May 26, 2020
1 parent 31251f8 commit e2e72f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyss3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ def __init__(
"""
self.__name__ = (name or self.__name__).lower()

self.__s__ = s or self.__s__
self.__l__ = l or self.__l__
self.__p__ = p or self.__p__
self.__a__ = a or self.__a__
self.__s__ = self.__s__ if s is None else s
self.__l__ = self.__l__ if l is None else l
self.__p__ = self.__p__ if p is None else p
self.__a__ = self.__a__ if a is None else a

try:
float(self.__s__ + self.__l__ + self.__p__ + self.__a__)
Expand Down

0 comments on commit e2e72f9

Please sign in to comment.