Let's work on a very simple yet illustrative example. Suppose you want a single neuron neural network to learn how to fit a simple linear function such as the following:
This is quite easy even for those who have little math background, so guess what? It is a nice start for our simplest neural network to prove its learning ability!
We;re going to structure the dataset for the neural network to learn using the following code, which you can find in the main method of the file NeuralNetDeltaRuleTest
:
Double[][] _neuralDataSet = { {1.2 , fncTest(1.2)} , {0.3 , fncTest(0.3)} , {-0.5 , fncTest(-0.5)} , {-2.3 , fncTest(-2.3)} , {1.7 , fncTest(1.7)} , {-0.1 , fncTest(-0.1)} , {-2.7 , fncTest(-2.7)} }; int[] inputColumns = {0}; int[] outputColumns = {1}; NeuralDataSet neuralDataSet = newNeuralDataSet(_neuralDataSet,inputColumns,outputColumns);
The funcTest
function is defined as the function...