@@ -198,12 +198,12 @@ def test_serialize_feature_union(self):
198198 new_model .fit (self .X , self .y )
199199
200200 def test_serialize_complex_flow (self ):
201+ ohe = sklearn .preprocessing .OneHotEncoder (categorical_features = [0 ])
201202 scaler = sklearn .preprocessing .StandardScaler (with_mean = False )
202-
203203 boosting = sklearn .ensemble .AdaBoostClassifier (
204204 base_estimator = sklearn .tree .DecisionTreeClassifier ())
205205 model = sklearn .pipeline .Pipeline (steps = (
206- ('scaler' , scaler ), ('boosting' , boosting )))
206+ ('ohe' , ohe ), ( ' scaler' , scaler ), ('boosting' , boosting )))
207207 parameter_grid = {'n_estimators' : [1 , 5 , 10 , 100 ],
208208 'learning_rate' : scipy .stats .uniform (0.01 , 0.99 ),
209209 'base_estimator__max_depth' : scipy .stats .randint (1 ,
@@ -216,6 +216,7 @@ def test_serialize_complex_flow(self):
216216 fixture_name = 'sklearn.model_selection._search.RandomizedSearchCV(' \
217217 'sklearn.model_selection._split.StratifiedKFold,' \
218218 'sklearn.pipeline.Pipeline(' \
219+ 'sklearn.preprocessing.data.OneHotEncoder,' \
219220 'sklearn.preprocessing.data.StandardScaler,' \
220221 'sklearn.ensemble.weight_boosting.AdaBoostClassifier(' \
221222 'sklearn.tree.tree.DecisionTreeClassifier)))'
0 commit comments