Author: tommaso
Date: Tue May 29 07:39:47 2012
New Revision: 1343585
URL: http://svn.apache.org/viewvc?rev=1343585&view=rev
Log:
completed the truth table in the test
Modified:
labs/yay/trunk/core/src/test/java/org/apache/yay/NeuralNetworkFactoryTest.java
Modified:
labs/yay/trunk/core/src/test/java/org/apache/yay/NeuralNetworkFactoryTest.java
URL:
http://svn.apache.org/viewvc/labs/yay/trunk/core/src/test/java/org/apache/yay/NeuralNetworkFactoryTest.java?rev=1343585&r1=1343584&r2=1343585&view=diff
==============================================================================
---
labs/yay/trunk/core/src/test/java/org/apache/yay/NeuralNetworkFactoryTest.java
(original)
+++
labs/yay/trunk/core/src/test/java/org/apache/yay/NeuralNetworkFactoryTest.java
Tue May 29 07:39:47 2012
@@ -40,6 +40,8 @@ public class NeuralNetworkFactoryTest {
andWeightsMatrixSet.add(singleAndLayerWeights);
NeuralNetwork<Double,Double> andNN = NeuralNetworkFactory.create(new
LinkedList<TrainingExample<Double, Double>>(), andWeightsMatrixSet, new
VoidLearningStrategy(), new FeedForwardStrategy(new SigmoidFunction()));
assertEquals(0l, Math.round(andNN.predict(createSample(1d, 0d))));
+ assertEquals(0l, Math.round(andNN.predict(createSample(0d, 1d))));
+ assertEquals(0l, Math.round(andNN.predict(createSample(0d, 0d))));
assertEquals(1l, Math.round(andNN.predict(createSample(1d, 1d))));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]