Print

Print


If any of the ECJ users have tried the GEP (Gene Expression Programming) extension (provided on the ECJ site),
you'll notice that GEP programs can read the training set from a file (comma, space or tab
separated). It also reads the terminal symbols from the 1st line of the training set of data.
Then you can specify a file with the testing set and it will run the test set of data 
with the best solution and report the results (fitness, some statistics and if a 
classification problem the confusion matrix). In addition you don't need to write any code,
you can just specify the files with the data and the fitness function you want to use
(from a large selection of fitness functions) in the params file. This is documented
in the html files included with the GEP extension and there are quite a few examples
that show various types of problems and uses of the params.

Bob Orchard
National Research Council Canada      Conseil national de recherches Canada
Institute for Information Technology  Institut de technologie de l'information
1200 Montreal Road, Building M-50     M50, 1200 chemin Montréal
Ottawa, ON, Canada K1A 0R6            Ottawa (Ontario) Canada K1A 0R6
(613) 993-8557 
(613) 952-0215 Fax / télécopieur
[log in to unmask] 
Government of Canada | Gouvernement du Canada

 

> -----Original Message-----
> From: ECJ Evolutionary Computation Toolkit 
> [mailto:[log in to unmask]] On Behalf Of David Robert White
> Sent: Wednesday, May 14, 2008 3:42 AM
> To: [log in to unmask]
> Subject: Re: Testing my trained programs
> 
> During a run, I write out the result of the makeCTree method 
> provided by ECJ (along with a preamble / postamble) to create 
> a valid source file.  
> For tree nodes that require it, I override the makeCTree 
> method in the relevant node class.  This works nicely for Java and C. 
> 
> Numbering these output source files sequentially then enables 
> automated evaluation using a shell/Python script and/or a 
> standalone class for testing.
> 
> Cheers
> 
> David
> 
> Shane wrote:
> > The way I do it is in the Evaluate method I use a modified "ECJ to 
> > Java" to generate java code from the individual and write 
> it out to a 
> > java file.  Then I compile the java file to a class file 
> and copy it 
> > into the appropriate folder and call a function in a library that 
> > executes the code and calculates the fitness.  The fitness value is 
> > returned back to the Evaluate method.
> >
> >
> 
> --
> David R White
> 
> Research Student
> Department of Computer Science
> University of York
> York YO10 5DD
> United Kingdom
>