# How many nodes/hidden layers are required to solve a classification problem where the boundary is a sinusoidal function?

A single neuron is capable of forming a decision boundary between linearly seperable data. Is there any intuition as to how many, and in what configuration, would be necessary to correctly approximate a sinusoidal decision boundary?

Thanks

• I search alot about this question before, the only answer I got was "gut feeling"... So I decided to use a genetic algorithm to find the optimal configuration of a neural network. The result will be optimal, but the coding of this solution will not be optimal. – Aus Nov 30 '16 at 13:55
• You can read about ANFIS. – kiner_shah Jan 25 '17 at 4:08
• Please consider to use radial basis neurons, instead of linear ones. They looks more accurate to your challenge. en.m.wikipedia.org/wiki/… – Szymon Dudziak Jan 30 '17 at 16:08

## 1 Answer

It depends on the accuracy you want. If you had 1 neuron, it could discern things across a line, if you have 2, you could solve things across 2 lines, etc. As you increase the number of neurons, you are increasing the number of discernible areas. As you increase the number of lines you can use to break up the input space, the lines can be placed to approximate any curve (sinusoidal) As the number of neurons approaches infinity, the accuracy of categorizing different inputs across this curve increases.

Interestingly enough, if one graphed "Number of Neurons (x) vs Accuracy (y)", it would look sinusoidal.