ucs
Class UCSconfig

java.lang.Object
  extended byucs.UCSconfig
All Implemented Interfaces:
java.lang.Cloneable

public class UCSconfig
extends java.lang.Object
implements java.lang.Cloneable

Configuration object for UCS. You must make one of these before you can run UCS.

Author:
Gavin Brown

Field Summary
 double coveringProbability
          Probabililty of covering.
 double crossoverProb
          The probability of choosing crossover instead of mutation to perform on a rule condition.
 FitnessFunction fitfunc
          Object specifying the fitness function.
 int gaThreshold
          The GA threshold.
 double inexperiencePenalty
          The factor by which to discount when experience is too low.
 int inexperienceThreshold
          The experience threshold under which the accuracy is discounted.
 double mutationProb
          The probability of mutating a single point in a rule condition.
 double noise
          Probability of class noise being added to each example in the training data.
 boolean onlinelearning
          Online learning or offline learing.
 int POPMAXSIZE
          Maximum population size to allow.
 SystemPredictor systemPredictor
          Object specifying the system predictor.
 java.lang.String testingFile
          String specifying the file to source testing data from.
 int ThetaDel
          Deletion vote experience threshold.
 double ThetaDelFrac
          Deletion vote fraction.
 int ThetaSub
          Subsumption experience threshold.
 double ThetaSubAccuracyMinimum
           
 java.lang.String trainingFile
          String specifying the file to source training data from.
 int v
          Parameter controlling fitness evaluation for UCS, accv.
 
Constructor Summary
UCSconfig()
           
 
Method Summary
 java.lang.Object clone()
          Clones this UCSConfig object.
 void load(java.lang.String filename)
          Loads a UCSparameters configuration from the specified file.
 void print()
          Prints out configuration of the current UCSparameters instance.
 void setFitnessFunction(FitnessFunction ff)
          Sets the fitness function to the supplied object.
 void setProblem(java.lang.String train)
          Sets the training datafile name to the supplied argument.
 void setProblem(java.lang.String train, java.lang.String test)
          Sets the datafile names to the supplied arguments.
 void setSystemPredictor(SystemPredictor sp)
          Sets the system predictor to the supplied object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coveringProbability

public double coveringProbability
Probabililty of covering. Default is coveringProbability = 0.33333333.


crossoverProb

public double crossoverProb
The probability of choosing crossover instead of mutation to perform on a rule condition. Default is crossoverProb = 0.8.


fitfunc

public FitnessFunction fitfunc
Object specifying the fitness function. By default this is a FitnessFunction object.


gaThreshold

public int gaThreshold
The GA threshold. Default is gaThreshold = 25.


inexperiencePenalty

public double inexperiencePenalty
The factor by which to discount when experience is too low. Default is inexperiencePenalty = 0.01.


inexperienceThreshold

public int inexperienceThreshold
The experience threshold under which the accuracy is discounted. Default is inexperienceThreshold = 10.


mutationProb

public double mutationProb
The probability of mutating a single point in a rule condition. Default is mutationProb = 0.05.


noise

public double noise
Probability of class noise being added to each example in the training data. (only applies when doing offline learning). Default is noise = 0.0.


onlinelearning

public boolean onlinelearning
Online learning or offline learing. If this flag is set true, testing will occur by periodically evaluating the system over the last 50 examples it has seen. Default is onlinelearning = TRUE.


POPMAXSIZE

public int POPMAXSIZE
Maximum population size to allow. This is in terms of microclassifiers as this implementation of UCS does not currently support macroclassifiers. Default is POPMAXSIZE = 400.


systemPredictor

public SystemPredictor systemPredictor
Object specifying the system predictor. By default this is a SystemPredictor object.


testingFile

public java.lang.String testingFile
String specifying the file to source testing data from.


ThetaDel

public int ThetaDel
Deletion vote experience threshold. Default is ThetaDel = 20.


ThetaDelFrac

public double ThetaDelFrac
Deletion vote fraction. Default is ThetaDelFrac = 0.10.


ThetaSub

public int ThetaSub
Subsumption experience threshold. Default is ThetaSub = 20.


ThetaSubAccuracyMinimum

public double ThetaSubAccuracyMinimum

trainingFile

public java.lang.String trainingFile
String specifying the file to source training data from.


v

public int v
Parameter controlling fitness evaluation for UCS, accv. Default is v = 20

Constructor Detail

UCSconfig

public UCSconfig()
Method Detail

clone

public java.lang.Object clone()
Clones this UCSConfig object. Can be useful to duplicate experiments, etc.


load

public void load(java.lang.String filename)
Loads a UCSparameters configuration from the specified file.

Parameters:
filename - The file from which to load the configuration.

print

public void print()
Prints out configuration of the current UCSparameters instance.


setFitnessFunction

public void setFitnessFunction(FitnessFunction ff)
Sets the fitness function to the supplied object.

Parameters:
ff - A fitness function object, either type FitnessFunction or an extension of it.

setProblem

public void setProblem(java.lang.String train)
Sets the training datafile name to the supplied argument. Note that since no testing datafile is specified, the system makes some assumptions for you. If onlinelearning=TRUE, then testing error will be reported over the last 50 examples seen. If onlinelearning=FALSE, then testing error will be obtained by a 50/50 random split of the training data.

Parameters:
train - The filename from which to load data.

setProblem

public void setProblem(java.lang.String train,
                       java.lang.String test)
Sets the datafile names to the supplied arguments.

Parameters:
train - The filename from which to load training data.
test - The filename from which to load testing data. If onlinelearning=TRUE, the testing datafile is ignored.

setSystemPredictor

public void setSystemPredictor(SystemPredictor sp)
Sets the system predictor to the supplied object.

Parameters:
sp - A system predictor object, either type SystemPredictor or an extension of it.