Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Machine Learning by (19k points)

I am currently building an nn for a dataset with 387 features and 3000 samples. The outputs are 3 classes. I configured the network structure as following:

input->200->{300->100}->50->output

Did I choose the correct number of nodes and layers? How to determine the number of nodes of each layer (input, hidden and output)? Is there any rule?

1 Answer

0 votes
by (33.1k points)

To determine the number of layers, just keep adding more layers until the test error does not improve anymore

You can add layers until your model starts to overfit your training set. Then you should add dropout or another regularization method.

To determine the nodes for your case:

  • The input layer should contain 387 nodes for each of the features.

  • Output layer should contain 3 nodes for each class.

  • Hidden layers should decrease the number with neurons within each layer works 

To have more details on Neural Network, study Neural Network Tutorial. Also, Machine Learning Algorithm would be an amazing 

Hope this answer helps you!

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...