Join GitHub today
set_params fn for pipeline to maintain order of parameters #10439
When I want to use the set param method to set a bunch of parameters, I can not control the order in which these are set. As a result, sometimes the program crashes, as setting hyperparameters requires a specific order.
e.g., SGD classifier requires the eta0 hyperparameter to be set to a value higher than 0 (which is the default) if a learning rate schedule other than optimal is chosen.
Steps/Code to Reproduce
This code crashes in 50% of the cases (depending on the order in which the hyperparameters are 'set')
Apparently this problem only occurs when the classifier is used in a pipeline, when using vanilla sgd there is no problem.