osama-raddad/encog-java

The bug in trainToError of class EncogUtility

Opened this issue · 0 comments

What steps will reproduce the problem?
1. SVM svm = new SVM(data, false)
2. EncogUtility.trainToError(svm, data, 0.01);

What is the expected output? What do you see instead?
The SVM object should be trained, but an exception is thrown:
Exception in thread "main" java.lang.ClassCastException: org.encog.ml.svm.SVM 
cannot be cast to org.encog.neural.networks.ContainsFlat

The bug is in the line 269 of EncogUtility class.


What version of the product are you using? On what operating system?
Encog3.2.0, Mac OSX 10.9.1

Additional information:
This small bug seems to be from the if-if-else block from line 269.


Original issue reported on code.google.com by standbym...@gmail.com on 30 Dec 2013 at 10:29