MLP에서 적절한 hidden unit 개수 산정하기
sklearn MLP 알고리즘에서 적절한 hidden unit 개수 산정하기
skearn에서 MLP classifier나 regressor를 사용할때
hiddenunit 개수를 몇 개로 시작해야 해야하는지에 대해서 좋은 대답이 있어서 기록해둔다.
model_mlp = MLPClassifier(solver='lbfgs', alpha=1e-5, hidden_layer_sizes=(hiddenunit, 5), random_state=1)
If the NN is a regressor, then the output layer has a single node.
If the NN is a classifier, then it also has a single node unless softmax is used in which case the output layer has one node per class label in your model.
--
The number of hidden neurons should be between the size of the input layer and the size of the output layer.
The number of hidden neurons should be 2/3 the size of the input layer, plus the size of the output layer.
The number of hidden neurons should be less than twice the size of the input layer.
참고 :
https://stats.stackexchange.com/questions/181/how-to-choose-the-number-of-hidden-layers-and-nodes-in-a-feedforward-neural-netw
https://frhyme.github.io/python-lib/is_mlp_regressor_good/