Sklearn hyperparams
This merge request adds a few things to the sklearn classifiers:
- Adds some verbosity when setting up the models. In particular, it will write out the model parameters and if grid or randomized hyperparameter tuning is set up, it will also write out the parameter space it will look at and the total number of searches it will need to do.
- Add some reproducibility by setting
random_seed
in the classifier. This sets anp.random.seed
so that runningRandomizedSearchCV
for example, will end up sampling the same space. Default seed is 37, because I picked some random number out of a hat. - modified
config2param_grid
andconfig2param_dist
inconfigparser.py
to also optionally take in lists. This allows lists of parameters to be taken in by the hyperparameter searches seamlessly which was one drawback of the current implementation. So now for example, you can sample different optimizers as part of the search for the neural network implementation by passing inclassifier__optimizer = ['sgd', 'adam']
which doesn't fit the setup before that only handles numerical values. - Fixed a typo in a class name:
IncrementalMultiLayerPercepton
->IncrementalMultiLayerPerceptron
Tested all these options by hand with a small training job.