Scikit-optimize: Issue in hyper-parameters optimization of MLPClassifier with BayesSearchCV

Created on 26 Jun 2018  路  4Comments  路  Source: scikit-optimize/scikit-optimize

In (sklearn.neural_network.)MLPClassifier, one of the hyperparameter is hidden_layer_sizes. It is used to define simultaneously the number of hidden layers and the number of nodes in each hidden layer.

From the documentation:

hidden_layer_sizes : tuple, length = n_layers - 2, default (100,)

The ith element represents the number of neurons in the ith hidden layer.

I was not able to effectively insert this hyperparameter in the list so that BayesSearchCV is able to work with it. Do you think is there a way or any workaround to make it work?

Most helpful comment

@MassimilianoGrassiDataScience take a look at #653 ; There a similar issue is discussed for MLPRegressor. Let us know if this helps.

All 4 comments

Have you tried explicitly making a Categorical dimension that contains different combinations of this parameter?

@MassimilianoGrassiDataScience take a look at #653 ; There a similar issue is discussed for MLPRegressor. Let us know if this helps.

It definitely helps! Thanks!

Great! :smile:

Was this page helpful?
0 / 5 - 0 ratings