I am using Encog library to solve a pattern recognition problem by following the basic example provied by Mr. Jeff Heaton. I have the pattern
1 3 5 4 3 5 4 3 1
which is my ideal pattern with output 1 (which would mean it is 100% the same) Now I want to input another pattern and see how similar it is to the ideal pattern.
This code is used for creating the network
BasicNetwork network = new BasicNetwork();
network.AddLayer(new BasicLayer(new ActivationSigmoid(), true, NumberOfInputNeurons));
network.AddLayer(new BasicLayer(new ActivationSigmoid(), true, 20));
network.AddLayer(new BasicLayer(new ActivationSigmoid(), true, 15));
network.AddLayer(new BasicLayer(new ActivationSigmoid(), true, 1));
network.Structure.FinalizeStructure();
network.Reset();
INeuralDataSet trainingSet = new BasicNeuralDataSet(XOR_INPUT, XOR_IDEAL);
Then, I train the network
do
{
train.Iteration();
Console.WriteLine("Epoch #" + epoch + " Error:" + train.Error);
epoch++;
} while ((epoch <= 20000) && (train.Error > 0.001));
And finally, I print the results:
foreach (INeuralDataPair pair in trainingSet)
{
INeuralData output = network.Compute(pair.Input);
Console.WriteLine(pair.Input[0] + "-" + pair.Input[1] + "-" + pair.Input[2] + ....
+ ": actual = " + output[0] + " ideal=" + pair.Ideal[0]) ;
}
Back to my question again:
How do I enter another pattern and see if it looks like mine?
Any ideas that may lead me to a solution are welcomed. Thanks