how to set the number of hidden neurons in the neural network toolbox

1 view (last 30 days)
I am trying to use the feedforward neural network to cluster a set of data. The network architecture design requires to set the “ number of hidden neurons”, which has a default value of 10. Is there any rule or set this number based on the size of input data? For example, the studied data set has 200 entries, and each entry has 1000 elements. In other words, the data set has 1000 features. The output has two elements.

Accepted Answer

Greg Heath
Greg Heath on 21 Nov 2011
This appears to be a classification problem; NOT a clustering problem.
1. 200 data points define a 199 dimensional space. Using a dimension of 1000 is not reasonable. You can reduce the dimensions using PCA. However, since your problem is classification instead of regression, LDA or PLS may be better for reducing dimensionality.
2. For an I-H-O node topology (I <= 199, O = 2), the number of unknown weights is Nw = (I+1)*H+(H+1)*O = 2 + 202*H for I = 199 and the number of training equations is Neq = Ntrn*O = 200*2 = 400.
3. For accurate and stable weight estimates that will generalize well to nontraining data;
Neq >> Nw or H << (Neq-O)/(I+O+1) = 398/200 ~ 2
Therefore, it looks like you need to substantially reduce your input dimensions below 199 and/or substantially increase the number of training examples above 200.
Hope this helps.
Greg

More Answers (0)

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!