File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1970,8 +1970,6 @@ def config2params(self, config: dict) -> dict:
19701970 params ["max_leaf_nodes" ] = params .get ("max_leaf_nodes" , params .pop ("max_leaves" ))
19711971 if not self ._task .is_classification () and "criterion" in params :
19721972 params .pop ("criterion" )
1973- if "random_state" not in params :
1974- params ["random_state" ] = 12032022
19751973 return params
19761974
19771975 def __init__ (
@@ -1981,6 +1979,9 @@ def __init__(
19811979 ):
19821980 super ().__init__ (task , ** params )
19831981 self .params ["verbose" ] = 0
1982+ random_seed = self .params .pop ("random_seed" , params .get ("random_seed" , 12032022 ))
1983+ if "random_state" not in self .params :
1984+ self .params ["random_state" ] = random_seed
19841985
19851986 if self ._task .is_classification ():
19861987 self .estimator_class = RandomForestClassifier
You can’t perform that action at this time.
0 commit comments