ECJ-INTEREST-L Archives

July 2005

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Steve Butcher (Steve-O)" <[log in to unmask]>
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Wed, 20 Jul 2005 10:26:26 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (93 lines)
Dear list,

I actually had a similar question and thought that it was as little
more straight forward than this. Generally, for statistical
significance, you want to run an experiment/solve a problem many
times, each time with a different random number seed, and have some
detailed statistics on each run while having an aggregation of
experimental data such as number of evaluations and whether or not
the ideal individual was found.

When Robert writes about a script, I assume he is talking about a
shell script that will choose different *.params files?

It would be nice if ECJ provided this facility naturally (okay, a lot
of things would be nice).

Are we talking about the same thing?

Is there a hook to re-seed the random number generator?

Cheers,
Steve

On Jul 19, 2005, at 2:41 PM, Sean Luke wrote:

> On Jul 19, 2005, at 12:10 PM, Robert Hovden wrote:
>
>
>> I would like to setup a script that will let me run ECJ many times
>> with
>> different settings, and collect data from each run into ONE file. I
>> would like
>> to know how I can setup a statistics file that will simply add to a
>> file (such
>> as out.stat). By default, ECJ will create a new out.stat file every
>> time it is
>> ran. I would like it to instead add to the out.stat file every time
>> ECJ is ran.
>>
>
> The Output facility can do this but it's somewhat cryptic. The
> crucial
> thing is that you need to provide a FileWriter (which will get wrapped
> into a BufferedWriter, then into a PrintWriter by the Log), and you
> also need to provide a so-called LogRestarter, whose job it is to
> restart the log after checkpoint and recovery or when the user demands
> it.
>
> My default mode has always been to generate statistics logs, then
> append them with a script (I'm a MacOS X/Unix guy, not a Windows guy).
> Here's a rough idea of how you'd modify the SimpleStatistics' setup
> method to make an appendable log.
>
> final File statisticsFile =
> state.parameters.getFile(base.push(P_STATISTICS_FILE),null);
>
> LogRestarter restarter = new LogRestarter()
> {
> // this is called whenever your log is
> restarted after
> // recovery from checkpoint. You may or may
> not want to
> // append in this situation -- I presume
> here you want
> // to append.
> public Log restart(Log l) throws IOException
> {
> if (l.writer!=null) l.writer.close();
> l.writer = new PrintWriter(
> new BufferedWriter(new
> FileWriter(statisticsFile,true));
> }
>
> // this is supposedly called whenever your
> log is requested
> // to clear itself and start over -- so you
> just close the
> // file and reoopen non-appended. In truth,
> ECJ never calls this
> public Log reopen(Log l) throws IOException
> {
> if (l.writer!=null) l.writer.close();
> l.writer = new PrintWriter(
> new BufferedWriter(new
> FileWriter(statisticsFile));
> }
> };
>
> statisticslog = state.output.addLog(
> new FileWriter(statisticsFile,true),restarter,
> Output.V_NO_GENERAL-1,false,false);
>

ATOM RSS1 RSS2