Cannot perform NeuralSimulatedAnnealing without a training set

emkay's picture

The classes for NeuralSimulatedAnnealing do not allow traing without a data set. I noticed this when I was tring to use Simulated Annealing to train a network for the tictactoe example in the book.
The encog classes expect a training set for the simulated annealing, but I would need to rate the network by testing it against the random player 100 times and then working out the error.

Is there a way I can use the Simulated Annealing classes in Encog, without a training set and providing my own determineError() method?

Thanks

Martin

jeffheaton's picture

I think your right, that should be easier to do. I will look at improving this a bit for 2.2.

However, for now, probably the best way is to create a new training extended from BasicTraining. Then create a new inner class derived from SimulatedAnnealing. Pretty much exactly like the NeuralSimulatedAnnealing class does. You could almost copy the class, and create your own cost calculation function.

Like I said, this should be easier, and something I will look into.

jeffheaton's picture

I had this improved this in the Encog 2.2 codebase(currently mainline). You can download from the build.heatonresearch.com server. It can be directly supported now.


Copyright 2005 - 2012 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright, license and trademark information.