public class FuzzyGPClassifier extends GeneticIndividualForClassification
FuzzyGPClassifier is designed to allow a Fuzzy Classifier evolve by means of
an Genetic Programming (GP). This class is a specification of
class GeneticIndividualForClassification
.
c, Co, X
CUSTOM_CESAR, fitnessType, g, STANDARD
Constructor and Description |
---|
FuzzyGPClassifier(FuzzyGPClassifier p)
The copy constructor for this class.
|
FuzzyGPClassifier(FuzzyPartition[] a,
FuzzyPartition b,
int MAXH,
int tf,
Randomize r)
A constructor of the class specifying the input and class variables
partitions, the maximum height of the tree, the fitness type and the
Randomize object to use.
|
Modifier and Type | Method and Description |
---|---|
GeneticIndividual |
clone()
This method clones the current object.
|
void |
crossover(GeneticIndividual p2,
GeneticIndividual p3,
GeneticIndividual p4,
int crossoverID)
This method performs the crossover genetic operation between the current
object and the first parameter.
|
void |
debug()
This method performs the debug operation, which allow to analyze the behaviour
of the learning process.
|
void |
localOptimization(int MAXITER,
int loOptID)
This method performs the local optimization: as this method does not have any
local optimization defined an exception is thrown.
|
void |
mutation(double alpha,
int mutationID)
This method performs the mutation genetic operation of the current FuzzyGPClassifier.
|
java.lang.String |
output()
This method performs the debug operation, which allow to analyze the behaviour
of the learning process.
|
void |
parametersFromGenotype()
This method sets the current classifier of according to it's genotype.
|
void |
Random()
This method initialize the current object randomly.
|
void |
set(FuzzyGPClassifier p)
This method copies the given FuzzyGPClassifier in the current object.
|
fitness, getCo, setExamples
public FuzzyGPClassifier(FuzzyPartition[] a, FuzzyPartition b, int MAXH, int tf, Randomize r)
A constructor of the class specifying the input and class variables partitions, the maximum height of the tree, the fitness type and the Randomize object to use.
a
- the input variables FuzzyPartition
arrayb
- the class variable FuzzyPartition
MAXH
- the maximum height of the treetf
- the type of Fitness function to evaluate the individualr
- the Randomize object to be used in the genetic evolutionpublic FuzzyGPClassifier(FuzzyGPClassifier p)
The copy constructor for this class.
p
- the FuzzyGPClassifier
to be copiedpublic void set(FuzzyGPClassifier p)
This method copies the given FuzzyGPClassifier in the current object.
p
- the FuzzyGPClassifier
object to be assigned to the current onepublic GeneticIndividual clone()
This method clones the current object.
clone
in class GeneticIndividual
GeneticIndividual
object which is a copy of the current objectpublic void parametersFromGenotype()
This method sets the current classifier of according to it's genotype.
parametersFromGenotype
in class GeneticIndividual
public void Random()
This method initialize the current object randomly.
Random
in class GeneticIndividual
public void mutation(double alpha, int mutationID) throws invalidMutation
This method performs the mutation genetic operation of the current FuzzyGPClassifier. This methods updates its classifier according its genotype.
mutation
in class GeneticIndividual
alpha
- this parameter is fixed according to GenotypeFuzzyGP
mutationID
- the type of mutation operation as stated in GenotypeFuzzyGP
.invalidMutation
- if non supported mutationIDpublic void crossover(GeneticIndividual p2, GeneticIndividual p3, GeneticIndividual p4, int crossoverID) throws invalidCrossover
This method performs the crossover genetic operation between the current object and the first parameter. The crossed individuals are left in the second and thrid parameters. Both individuals have their classifier updated according to their genotypes.
crossover
in class GeneticIndividual
p2
- the GeneticIndividual
to cross withp3
- the first crossed GeneticIndividual
p4
- the second crossed GeneticIndividual
crossoverID
- this value should be fixed according to GenotypeFuzzyGP
invalidCrossover
- in case of invalid crossoverIDpublic void debug()
This method performs the debug operation, which allow to analyze the behaviour of the learning process.
debug
in class GeneticIndividualForClassification
public java.lang.String output()
This method performs the debug operation, which allow to analyze the behaviour of the learning process.
public void localOptimization(int MAXITER, int loOptID) throws invalidOptim
This method performs the local optimization: as this method does not have any local optimization defined an exception is thrown.
localOptimization
in class GeneticIndividual
MAXITER
- an integer with the maximum number of iterations in the
local optimization looploOptID
- the chosen local optimization methodinvalidOptim