public class Config
extends java.lang.Object
This class contains all the configuration parameters for the XCS.
Modifier and Type | Field and Description |
---|---|
static double |
alpha
Parameter of acurcy function (the fall of rate in the fitness
evaluation).
|
static double[][] |
attBounds |
static java.util.Vector |
attNames |
static double |
beta
Learning rate for prediction, prediction error, fitness, and action set
estimation updates
|
static char[] |
charVector
It contains all the characters that can take a problem with character representation.
|
static java.util.Vector |
classConv |
static java.lang.String |
className |
static int |
clLength
Represents the lenght of the classifier.
|
static int |
debugLevel
It indicates the level of debug (the quantity of message that will appear in the estandard output
|
static double |
delta
Value of the fraction used in the second deletion method.
|
static boolean |
doASSubsumption
It indicates if the subsumption in the action set is required.
|
static boolean |
doGASubsumption
It indicates if the GA subsumption is required.
|
static char |
dontCareSymbol
Represents the don't care symbol for problem that use a
character representation or a mixed representation.
|
static boolean |
doReduction
Indicates if reduction has to be made
|
static boolean |
doSpecify
It indicates if the specify operator has to be applied.
|
static boolean |
doStatistics
It indicates if the user wants to get some statistics in a file.
|
static boolean |
doTest
This parameter indicates if test has to be made between
the train execution.
|
static boolean |
doTrain
It indicates if a train has to be made
|
static java.util.Vector[] |
enumConv |
static double |
epsilon_0
Parameter of the accuracy function (Is the error threshold under which
the accuracy of the classifier is set to 1.
|
static double |
epsilon_reduct
Parameter of the Dixon Reduction.
|
static int |
exploresBetweenExploits
Indicates the number of explore experiments that have to be
made before doing an exploit experiment
|
static java.lang.String |
fDrawFileName |
static java.lang.String |
fIncFileName |
static double |
fitReduction
The factor by which the fitness is reduced when a new classifier is
generated in the AG.
|
static java.lang.String |
fOTestFileName |
static java.lang.String |
fOTrainFileName |
static java.lang.String |
fPopFileName |
static java.lang.String |
fPopNormFileName |
static java.lang.String |
fTestFileName |
static java.lang.String |
fTimeFileName |
static java.lang.String |
fTrainFileName |
static double |
gamma
Discount factor (used in multiple step problems)
|
static boolean |
getOptimalPopulation
It's set to true if the optimal population has to be read from a file.
|
static double |
initialFitness
It is the inital fitness for the new classifiers.
|
static double |
initialPError
It represents the initial system error for the new classifiers.
|
static double |
initialPrediction
Is the initial prediction for the new classifiers.
|
static int |
initReductionIteration
It indicates the iteration where the reduction specified has
to be applied for the first time.
|
static java.lang.String |
inputsLine |
static double |
l_0
Represents the interval of random numbers that will be
generated to be added in the specify operator.
|
static double |
m_0
It indicates the range of the uniform distribution to use in the mutation of a real allele.
|
static double[] |
maxBDAttributeValue |
static double[] |
minBDAttributeValue
The following parameters are to save the BD examples maximum and minimum values.
|
static double |
Nspecify
Is the experience average of classifiers in the action set to
apply the specify operator.
|
static double |
nu
Exponent in the power function for the fitness evaluation
|
static int |
numberOfActions
Represents the number of actions that a classifier can take.
|
static int |
numberOfCharacters
Represents the number of different characters that can take a character representation.
|
static int |
numberOfExplores
Represents the number of experiments that have to be made.
|
static int |
numberOfReductExamples
Is the number of reduct iterations that have to be made in a
reduction.
|
static int |
numberOfTestExamples
Indicates the number of iterations that has to be made in a
test execution.
|
static java.lang.String |
optimalPopulationFile
It's the file name that contains the optimal population.
|
static java.lang.String |
outputsLine |
static double |
pDontCare
Is the probability of using # in one attribute when covering.
|
static boolean |
permitWithinCrossover
It indicates if the within crossover is permitted in case
of using a real representation.
|
static double |
pM
Probability of mutate an allele in the offspring.
|
static int |
popSize
Represents the maximum number of microclassifiers in the population.
|
static java.lang.String |
populationFile
If not null, it represents the name of the file where the
population has been writen
|
static double |
predictionErrorReduction
The factor by which the prediction error is reduced when a new
classifier is generated in the AG.
|
static double |
Preduct
It's the reduction applied to the max reward to decide if a
classifier is accurate enough to participate in the reduction.
|
static double |
Pspecify
Is the probability of don't care allele to be changed for the
environmental value.
|
static double |
pX
Probability of applying crossover in the GA.
|
static double |
r_0
Represents the interval of random numbers that will be
generated to be added in the real mutation.
|
static int |
realDrawnPrecision
It represents the precision wanted by the user to draw an interval.
|
static java.lang.String |
reductedRulesFile
It's the name where the reductes rules have to be written.
|
static int |
reductWindow
It indicates the interval where the execution window will
be applied.
|
static java.lang.String |
relationName
Variables to store extra information about attributes
|
static double |
seed
It's the seed of the run
|
static boolean |
sequentialTest
This parameter indicates if the test execution must be a
sequential execution (if the enviornment is a file environment),
or it mustn't.
|
static java.lang.String |
statisticFileOutName
It is the name of the file where the statistics will be written in.
|
static int |
statisticWindowSize
It the size of the window for the incremental statistics.
|
static boolean |
ternaryRep
Represents the type of the representation.
|
static java.lang.String |
testFile
It the BD of test examples
|
static int |
testWindow
Indicates the number of train executions that has to be made
to do a test execution.
|
static double |
theta_del
Is the deletion threshold.
|
static double |
theta_GA
It represents the time from last GA aplication for aplicate again the GA
in the action set.
|
static int |
theta_mna
Number of classifiers that has to be covered when creating the
prediction array.
|
static double |
theta_reduct
Is the reduction threshold.
|
static double |
theta_sub
Is the subsumption threshold.
|
static double |
tournamentSize
It represents the percentage of population that has to be selected
to make tournament.
|
static java.lang.String |
trainFile
It the BD of train examples
|
static java.lang.String[] |
typeOfAttributes
Represents the type of each attribute of a classifier.
|
static java.lang.String |
typeOfCrossover
Represents the type of crossover.
|
static java.lang.String |
typeOfMutation
Represents the type of mutation.
|
static java.lang.String |
typeOfProblem
It represents the type of problem to be executed.
|
static java.lang.String |
typeOfReduction
Indicates the type of reduction to be made.
|
static java.lang.String |
typeOfSelection
Represents the type of selection.
|
static java.lang.String |
XCSRun
It represents the number of explores iterations that have to be
made to do a exploit
|
Constructor and Description |
---|
Config()
It's de defalut constructor of the class.
|
Modifier and Type | Method and Description |
---|---|
static void |
printContents()
It does print all the parameters value to check their correct initialization
|
static double |
rand()
Returns a number between [0, 1), so, 0 inclusive and 1 exclusive.
|
static void |
setSeed(long seed) |
static void |
write(java.lang.String s) |
public static java.lang.String typeOfProblem
It represents the type of problem to be executed. It can be: FP, MP, PAR, POS, DEC
public static boolean doTrain
It indicates if a train has to be made
public static int numberOfExplores
Represents the number of experiments that have to be made.
public static int exploresBetweenExploits
Indicates the number of explore experiments that have to be made before doing an exploit experiment
public static double seed
It's the seed of the run
public static java.lang.String XCSRun
It represents the number of explores iterations that have to be made to do a exploit
public static java.lang.String trainFile
It the BD of train examples
public static java.lang.String testFile
It the BD of test examples
public static java.lang.String populationFile
If not null, it represents the name of the file where the population has been writen
public static int popSize
Represents the maximum number of microclassifiers in the population.
public static double alpha
Parameter of acurcy function (the fall of rate in the fitness evaluation).
public static double beta
Learning rate for prediction, prediction error, fitness, and action set estimation updates
public static double gamma
Discount factor (used in multiple step problems)
public static double delta
Value of the fraction used in the second deletion method.
public static double nu
Exponent in the power function for the fitness evaluation
public static int theta_mna
Number of classifiers that has to be covered when creating the prediction array.
public static double theta_del
Is the deletion threshold. If the experience of a classifier is greather than this parameter, its fitness may be considered in its probability of deletion.
public static double theta_sub
Is the subsumption threshold. If the experience of a classifier is less than that parameter, the classifier is not expert enough to be a subusmer.
public static double epsilon_0
Parameter of the accuracy function (Is the error threshold under which the accuracy of the classifier is set to 1.
public static boolean doASSubsumption
It indicates if the subsumption in the action set is required.
public static double predictionErrorReduction
The factor by which the prediction error is reduced when a new classifier is generated in the AG.
public static double fitReduction
The factor by which the fitness is reduced when a new classifier is generated in the AG.
public static double initialPrediction
Is the initial prediction for the new classifiers.
public static double initialFitness
It is the inital fitness for the new classifiers.
public static double initialPError
It represents the initial system error for the new classifiers.
public static double pX
Probability of applying crossover in the GA.
public static double pM
Probability of mutate an allele in the offspring.
public static double theta_GA
It represents the time from last GA aplication for aplicate again the GA in the action set.
public static boolean doGASubsumption
It indicates if the GA subsumption is required.
public static double tournamentSize
It represents the percentage of population that has to be selected to make tournament. Its value is in the (0..1] range. selection.
public static java.lang.String typeOfMutation
Represents the type of mutation. It can take two values: 1 --> niched mutation, or 2 --> free mutation.
public static java.lang.String typeOfSelection
Represents the type of selection. It can take two values: 1 --> roulette wheel selection, or 2 --> tournament selection.
public static java.lang.String typeOfCrossover
Represents the type of crossover. It can take two values: 1 --> two point crossover, or 2 --> uniform crossover.
public static boolean permitWithinCrossover
It indicates if the within crossover is permitted in case of using a real representation.
public static double m_0
It indicates the range of the uniform distribution to use in the mutation of a real allele.
public static double pDontCare
Is the probability of using # in one attribute when covering.
public static char dontCareSymbol
Represents the don't care symbol for problem that use a character representation or a mixed representation.
public static boolean ternaryRep
Represents the type of the representation. If it's true the problems uses a ternary representation, and if it's false the problem uses a mixed or a real representation.
public static java.lang.String[] typeOfAttributes
Represents the type of each attribute of a classifier. It is used by the mixed representation, because it has to know the type of each attribute. It can take the "real" or "character" values.
public static int clLength
Represents the lenght of the classifier.
public static int numberOfCharacters
Represents the number of different characters that can take a character representation.
public static char[] charVector
It contains all the characters that can take a problem with character representation.
public static int numberOfActions
Represents the number of actions that a classifier can take.
public static double r_0
Represents the interval of random numbers that will be generated to be added in the real mutation.
public static boolean doSpecify
It indicates if the specify operator has to be applied.
public static double Nspecify
Is the experience average of classifiers in the action set to apply the specify operator.
public static double Pspecify
Is the probability of don't care allele to be changed for the environmental value.
public static double l_0
Represents the interval of random numbers that will be generated to be added in the specify operator.
public static boolean doStatistics
It indicates if the user wants to get some statistics in a file.
public static int statisticWindowSize
It the size of the window for the incremental statistics. It means that, every statisticWindowSize, a statistic of the population will be set down in the incremental statistic file.
public static java.lang.String statisticFileOutName
It is the name of the file where the statistics will be written in.
public static boolean getOptimalPopulation
It's set to true if the optimal population has to be read from a file.
public static java.lang.String optimalPopulationFile
It's the file name that contains the optimal population.
public static int realDrawnPrecision
It represents the precision wanted by the user to draw an interval. So, the interval will be split in "realDrawnPrecision" pieces to be drawn in a file.
public static boolean doTest
This parameter indicates if test has to be made between the train execution.
public static int testWindow
Indicates the number of train executions that has to be made to do a test execution.
public static boolean sequentialTest
public static int numberOfTestExamples
Indicates the number of iterations that has to be made in a test execution.
public static boolean doReduction
Indicates if reduction has to be made
public static java.lang.String typeOfReduction
Indicates the type of reduction to be made. It can take the following values: SD (Strong Dixon), WD (Weak Dixon), nW (Wilson with numerosity) and eW (Wilson with experience)
public static int initReductionIteration
It indicates the iteration where the reduction specified has to be applied for the first time.
public static int reductWindow
It indicates the interval where the execution window will be applied.
public static int numberOfReductExamples
Is the number of reduct iterations that have to be made in a reduction. In case of using a file environment, the number of iterations will be set at the number of problems of the environment.
public static java.lang.String reductedRulesFile
It's the name where the reductes rules have to be written.
public static double Preduct
It's the reduction applied to the max reward to decide if a classifier is accurate enough to participate in the reduction.
public static double theta_reduct
Is the reduction threshold. If the experience of a classifier is less than that parameter, the classifier is not expert enough to be a in the reduction set.
public static double epsilon_reduct
Parameter of the Dixon Reduction. It is the error threshold necessary by a classifier to be accurated enough to be in the reduction set.
public static int debugLevel
public static double[][] attBounds
public static java.util.Vector[] enumConv
public static java.util.Vector classConv
public static java.lang.String relationName
public static java.util.Vector attNames
public static java.lang.String className
public static java.lang.String inputsLine
public static java.lang.String outputsLine
public static double[] minBDAttributeValue
public static double[] maxBDAttributeValue
public static java.lang.String fOTrainFileName
public static java.lang.String fOTestFileName
public static java.lang.String fPopFileName
public static java.lang.String fPopNormFileName
public static java.lang.String fTrainFileName
public static java.lang.String fTestFileName
public static java.lang.String fIncFileName
public static java.lang.String fDrawFileName
public static java.lang.String fTimeFileName
public static void setSeed(long seed)
public static double rand()
public static void printContents()
public static void write(java.lang.String s)