Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

LearningEAEnv Class Reference

An EA environment that evaluates individuals by their learning capabilities. More...

#include <learningenv.h>

List of all members.

Public Types

enum  problemtypes

Public Methods

 LearningEAEnv ()
 LearningEAEnv (const PatternSet &trainset, const PatternSet &evaluationset, const PatternSet &reportset, StringMap &params)
void setProblemType (int pt)
virtual void addFeaturesTo (Genome &genome) const
virtual void cycle_report (OStream &log, OStream &out)
virtual double evaluateg (const Individual &genome)
virtual DataOStream & operator>> (DataOStream &out) const
virtual void check () const

Protected Methods

void permutate ()
void splitTrainData ()


Detailed Description

An EA environment that evaluates individuals by their learning capabilities.

The environment's main attribute is the dataset used for training.

This class is currently designed mainly for using a local search in addition to the evolutionary learning of the neural network topology. Whether or not the environment uses local training depends *on the parameters.

Definition at line 45 of file learningenv.h.


Member Enumeration Documentation

enum problemtypes
 

Problem types.

Parameters:
CLASSIFICATION  many classes that are represented by one output each
CLASSIFICATION2  two classes that are represented by a single output
APPROXIMATION  many outputs, error always calculated as MSE.

Definition at line 72 of file learningenv.h.


Constructor & Destructor Documentation

LearningEAEnv  
 

Dummy constructor, shouldn't be used (results in runtime error).

Dummy. For some reason, we have to have a dummy constructor, so this is what we get...

Definition at line 62 of file learningenv.cc.

LearningEAEnv const PatternSet &    trainSet,
const PatternSet &    evalSet,
const PatternSet &    testSet,
StringMap &    params
 

Primary constructor.

Most of the parameters are passed in a string map.

Parameters:
trainset  Used for local training of the ANN weights with a backprop algorithm.
evaluationset  Used for evaluating the individuals to measure their fitness.
reportset  - Used for "final tests" in generation reports. Although we take the training set and evaluation set separately, the sets may be recombined and permutated later if so dictated by the permutate-parameter (see below).
params  Dynamic parameter map.
params  ["evals"] - Minimum number of evaluations per individual per generation [Default=1]
params  ["encoding"] - The name of the encoding method to be used: layered, miller, kitano, nolfi, cangelosi [No default - required]
params  ["noise"] - Amount of artificial noise to be added [Default=0]
params  ["permutate"] - Should we permutate the training and evaluation sets during evolution? [Default=0 (no)]
params  ["evalPart"] - Portion of EA evaluation set as a fraction [Default=0.333]
params  ["maxTrainCycles"] - Number of maximum training cycles. [Default=3000]
params  ["stripLen"] - Interval between validations for early termination. [Default=10]
params  ["terminator"] - Termination method and parameters. See Terminator for defaults. [Default="GL5"]
params  ["termPart"] - Termination set portion of training set as a fraction [Default=0.25]
params  ["logDir"] - Logging directory [Default="log"]
params  ["optParams"] - Should the learning parameters be optimized by evolution? [Default=0 (no)]

Definition at line 95 of file learningenv.cc.

References splitTrainData().


Member Function Documentation

void addFeaturesTo Genome &    genome const [virtual]
 

Implementation for EAEnvironment.

Definition at line 142 of file learningenv.cc.

void check   [virtual]
 

Implementation for Object.

Definition at line 401 of file learningenv.cc.

void cycle_report OStream &    log,
OStream &    out
[virtual]
 

Implementation for EAEnvironment.

Definition at line 282 of file learningenv.cc.

double evaluateg const Individual &    ind [virtual]
 

Implementation for EAEnvironment.

Implementation for EAEnvironment.

Trains the individual with the training set and then evaluates the it with the evaluation set.

If early stopping is enabled, the training set is further divided into an actual training set and termination set. If permutation of training patterns is enabled, the patterns are shuffled before division into actual training set and termination set.

Prints statistics if they are enabled.

Returns:
Measured fitness of the individual.

Definition at line 210 of file learningenv.cc.

References permutate().

DataOStream & operator>> DataOStream &    out const [virtual]
 

Implementation for Object.

Definition at line 386 of file learningenv.cc.

void permutate   [protected]
 

Permutates and redivides the mTrainData into mTrainSet and mEvaluationSet.

Definition at line 170 of file learningenv.cc.

References splitTrainData().

Referenced by evaluateg().

void setProblemType int    pt [inline]
 

Sets problem type to be a classification task or a function approximation task.

Default is CLASSIFICATION unless there is only one output in which case the default is CLASSIFICATION2.

See also:
problemtypes

Definition at line 63 of file learningenv.h.

void splitTrainData   [protected]
 

Resplit the dataset into training set and evaluation set.

The training set is used for training the neural network, and evaluation set for evaluating the fitness after training.

Definition at line 187 of file learningenv.cc.

Referenced by LearningEAEnv(), and permutate().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:21:26 2005 for Annalee by doxygen1.2.18