@@ -26,7 +26,8 @@ def sklearn_DummyRegressor(*args, **kwargs):
2626def dummy_classifier (name : str ,
2727 strategy : typing .Union [str , Apply ] = None ,
2828 random_state = None ,
29- constant : typing .Union [int , str , npt .ArrayLike ] = None ):
29+ constant : typing .Union [int , str , npt .ArrayLike ] = None ,
30+ ** kwargs ):
3031 """
3132 Return a pyll graph with hyperparameters that will construct
3233 a sklearn.dummy.DummyClassifier model.
@@ -45,7 +46,8 @@ def _name(msg):
4546 strategy = hp .choice (_name ("strategy" ), ["stratified" , "most_frequent" , "prior" , "uniform" ])
4647 if strategy is None else strategy ,
4748 random_state = hp .randint (_name ("random_state" ), 5 ) if random_state is None else random_state ,
48- constant = constant
49+ constant = constant ,
50+ ** kwargs
4951 )
5052 return scope .sklearn_DummyClassifier (** hp_space )
5153
@@ -60,7 +62,8 @@ def _name(msg):
6062def dummy_regressor (name : str ,
6163 strategy : typing .Union [str , Apply ] = None ,
6264 constant : typing .Union [int , str , npt .ArrayLike ] = None ,
63- quantile : float = None ):
65+ quantile : float = None ,
66+ ** kwargs ):
6467 """
6568 Return a pyll graph with hyperparameters that will construct
6669 a sklearn.dummy.DummyRegressor model.
@@ -78,6 +81,7 @@ def _name(msg):
7881 hp_space = dict (
7982 strategy = hp .choice (_name ("strategy" ), ["mean" , "median" ]) if strategy is None else strategy ,
8083 constant = constant ,
81- quantile = quantile
84+ quantile = quantile ,
85+ ** kwargs
8286 )
8387 return scope .sklearn_DummyRegressor (** hp_space )
0 commit comments