Neural Nets 2
The previous page ended by mentioning that neural net classifiers can fail for two independent reasons:
- The neural network itself is ill-formulated, so no matter how much information is provided it cannot learn to solve the classification problem.
- The input data is insufficient in quantity or format to solve the classification problem.
That said, we found that a single neuron with input from a single feature was sufficient to solve the previous classification problem. Let's try another one. Without changing anything yet, press the play button on the Tensorflow playground below and let it run for about 5 seconds, and then press pause...
Tensorflow
Finished?
How'd it do on this new classification task? Is one neuron with input from a single feature (the dim1 data: AGE) still performing well to crate a background color gradient that matches the color of the dots? I'm assuming it didn't do so well this time around. Try again. Resent Tensorflow, and more neurons, and an additional layer also several neurons. Rerun.
How'd it do? It still can't solve the classification problem right? It seems like we'll need to add an additional feature as input. Let's take a look at our options. Again, here is the full set of possible network inputs...
X_{1} | AGE | |
X_{2} | SCORE | |
X_{1}^{2} | AGE^{2} | |
X_{2}^{2} | SCORE^{2} | |
X_{1}X_{2} | AGE × SCORE | |
sin(X_{1}) | sin(AGE) | |
sin(X_{2}) | sin(SCORE) |
Start by running X_{1} and X_{2} together, just to see what happens. Then feel free to test out whatever combinations you think might work.
Input Combinations
DISCUSSION TBD
Neuron Activation Function
The output function from each neuron in our neural net was chosen to be the tanh function.
The tanh function is an extremely common choice for an output function in artificial neural network machine learning frameworks because it yields a nice sigmoid shape, and no matter the magnitude of its inputs, the output from the tanh function is bounded between { 0 : 1}. These are very desirable properties for neural net nodes. Here you see the tanh function evaluated across various x-dim inputs...
Tanh produces a sigmoid output over the range {-2 : 2}, and automatically evaluates to exact values when its argument is the natural logarithm. Speaking of the natural log, that is another very common choice of output function for the same reasons as tanh.
This is something to keep this in mind, if you're wondering what sorts of numbers are travelling along the axons of these neurons, and ultimately those colored gradients underneath the dots.
TO BE CONTINUED...