Closed B0Gec closed 2 years ago
Thank you for your issue! I have implemented this in #183 and will close this when it gets merged.
Nice! That was a quick response and nice work with #183.
The above described situation happens also in more general, whenever hpsklearn
's value None
coincides with some optional value of corresponding scikit
function.
E.g. in components._trees_hp_space
you have random_state=None
but this is also possible value or same argument in sklearn.ensemble.RandomForestRegressor
.
Second example is in your new rewrite_for_sklearn1.0.0 branch in function components.ensemble.forest._forest_hp_space
the argument max_leaf_nodes=None
, since it coincides with the default parameter of Random Forest function in scikit
.
So there may be more possible improvements of this kind.
Fixing the random_state
parameter makes much sense in most applications.
I will take a look at the ensemble optimizers and implement your solution in the next few days. Thanks again for raising concern on this.
Now that it's merged I'll go ahead and close this. Thank you for raising an issue and feel free to let us know if you find any bugs or other issues.
I would like to specify search space of random forest without depth limit (as
max_depth=None
insklearn.ensemble.RandomForestRegressor
) viacomponents.random_forest_regression
function but when specifyingrandom_forest_regression(max_depth=None)
this setting is overridden with search spacehp.pchoice(name, [ (0.7, None), (0.1, 2), (0.1, 3), (0.1, 4), ])
since the lines (incomponents
):So I propose PR with lines (inside
_trees_hp_space
):TL;DR:
Currently
components.random_forest_regression(max_depth=None)
:Expected: