Hello there, I played mlrose today, however when I used default tutorial_examples.ipynb, there were some bugs poped out. In example 6, I got following tracking info:
`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~/.pyenv/versions/3.7.1/envs/py3-mlrose/lib/python3.7/site-packages/IPython/core/formatters.py in call(self, obj)
700 type_pprinters=self.type_printers,
701 deferred_pprinters=self.deferred_printers)
--> 702 printer.pretty(obj)
703 printer.flush()
704 return stream.getvalue()
~/.pyenv/versions/3.7.1/envs/py3-mlrose/lib/python3.7/site-packages/IPython/lib/pretty.py in pretty(self, obj)
400 if cls is not object
401 and callable(cls.dict.get('repr')):
--> 402 return _repr_pprint(obj, self, cycle)
403
404 return _default_pprint(obj, self, cycle)
~/.pyenv/versions/3.7.1/envs/py3-mlrose/lib/python3.7/site-packages/IPython/lib/pretty.py in repr_pprint(obj, p, cycle)
695 """A pprint that just redirects to the normal repr function."""
696 # Find newlines and replace them with p.break()
--> 697 output = repr(obj)
698 for idx,output_line in enumerate(output.splitlines()):
699 if idx:
~/.pyenv/versions/3.7.1/envs/py3-mlrose/lib/python3.7/site-packages/sklearn/base.py in repr(self)
228 def repr(self):
229 class_name = self.class.name
--> 230 return '%s(%s)' % (class_name, _pprint(self.get_params(deep=False),
231 offset=len(class_name),),)
232
TypeError: get_params() got an unexpected keyword argument 'deep'`
After some digging, i think the bug comes from the following parts:
- neural.py line 609:
get_params(self)
. In skilearn BaseEstimator the original signature of the funciton should be get_params(self, deep=False)
which are incompatible.
- neural.py line 621:
'learning_rate': self.lr
. I think it should be 'learning_rate': self.learning_rate
. There is no lr used in the class.
- neural.py line 648: self.lr = in_params['learning_rate']. It should be
self.learing_rate = in_params['learning_rate']
.
Since I'm new to the ML things. I'm not sure with my findings. If i was wrong, please close this issue.