I have a model pipeline stored in pkl file which was created by the sckit-learn 0.19
. I'm trying to update the missing parameters that need for the new version of sckit-learn 0.22
.
The pipeline looks like the following:
Pipeline(memory=None,
steps=[('stackingestimator-1', StackingEstimator(estimator=DecisionTreeRegressor(criterion='mse', max_depth=2, max_features=None,
max_leaf_nodes=None, min_impurity_decrease=0.0,
min_impurity_split=None, min_samples_leaf=8,
min_samples_split=7, min_weight_fraction_lea...positive=False, precompute='auto', random_state=42,
selection='cyclic', tol=0.1, verbose=0))])
In sckit-learn 0.22
, they have added a new parameter 'ccp_alpha'
in the DecisionTreeRegressor
. So, I need to add this new parameter into every DecisionTreeRegressor
used in the pipeline. I have tried using the set_param_recursive
in tpot
, but it didn't add the missing attribute into the estimator:
set_param_recursive(pipeline_steps=model.steps, parameter='ccp_alpha', value=0.0)
It will return the error:
AttributeError: 'DecisionTreeRegressor' object has no attribute 'ccp_alpha'
Is there a solution to update missing parameters added in the new version?