Using different training data in each generation

27 views
Skip to first unread message

Ian Clarke

unread,
May 30, 2011, 7:54:10 PM5/30/11
to epo...@googlegroups.com
In an effort to avoid over-fitting, I'd like to use a different subset of my training data for each generation, but the same subset within each generation.

Its not quite clear to me how to achieve that, is there some callback a Model can receive between each training run - or is there a preferable way to achieve this?

Thanks!

Ian.

Tom Castle

unread,
May 31, 2011, 8:47:19 PM5/31/11
to EpochX
The best way to achieve this is using the Life event handling system.
You can register your model as a listener for generation events, and
then upon the start of each generation you can trigger whatever
changes you require to the training data that are used in the fitness
function. It is often easiest to do this with an anonymous inner
class:

Life.get().addGenerationListener(new GenerationAdapter() {
public void onGenerationStart() {
changeTrainingData();
}
});

Where the changeTrainingData() method will be called at the start of
every generation.

I hope this helps!

Tom

Ian Clarke

unread,
Jun 1, 2011, 6:17:03 AM6/1/11
to epo...@googlegroups.com
Thanks Tom, I guessed it might be something like that.

Ian.
--
Ian Clarke
CEO, SenseArray
Email: i...@sensearray.com
Ph: +1 512 422 3588
Reply all
Reply to author
Forward
0 new messages