File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class Fitter(Learner, metaclass=FitterMeta):
3030 learners.
3131
3232 """
33- __fits__ = None
33+ __fits__ = {}
3434 __returns__ = Model
3535
3636 # Constants to indicate what kind of problem we're dealing with
@@ -106,10 +106,9 @@ def supports_weights(self):
106106 """The fitter supports weights if both the classification and
107107 regression learners support weights."""
108108 return (
109- hasattr (self .get_learner (self .CLASSIFICATION ), 'supports_weights' )
110- and self .get_learner (self .CLASSIFICATION ).supports_weights ) and (
111- hasattr (self .get_learner (self .REGRESSION ), 'supports_weights' )
112- and self .get_learner (self .REGRESSION ).supports_weights )
109+ getattr (self .get_learner (self .CLASSIFICATION ), 'supports_weights' , False ) and
110+ getattr (self .get_learner (self .REGRESSION ), 'supports_weights' , False )
111+ )
113112
114113 @property
115114 def params (self ):
You can’t perform that action at this time.
0 commit comments