PHD Discussions Logo

Ask, Learn and Accelerate in your PhD Research

Question Icon Post Your Answer

Question Icon

1 year ago in Machine Learning By Adi

How do I determine the number of neurons in a hidden layer for an ANN classification problem?

How should I approach sizing the hidden layer of an ANN to solve a classification problem effectively?

All Answers (1 Answers In All)

By Roma Answered 8 months ago

There is no exact formula. Start with a heuristic: a number between the input and output layer sizes. Use architectures like [input, (input+output)/2, output] or [input, 2/3*input + output, output]. The best method is empirical: use a validation set to tune this hyperparameter via grid or random search, monitoring for overfitting as complexity increases.

Your Answer