public class Parameters
extends java.lang.Object
In this class there are all the classifier parameters of UCS.
Constructor and Description |
---|
Parameters()
Constructs a Parameters Object.
|
Parameters(int tStamp,
double size,
double gen)
It creates an instance of Parameters.
|
Parameters(Parameters p,
int tStamp)
It creates a new parameter object copying the parameters from a parent
|
Parameters(Parameters p1,
Parameters p2,
int tStamp)
It creates a new parameter object making a crossover between the
parents parametres.
|
Modifier and Type | Method and Description |
---|---|
boolean |
couldSubsume()
Indicates if the classifier can subsume.
|
double |
deletionVote(double avFitness)
Returns the probability of a classifier to be deleted.
|
double |
getAccuracy()
Returns the accuracy of the classifier.
|
double |
getCSize()
Returns the estimated correct set size.
|
int |
getExperience()
Returns the experience of the classifier.
|
double |
getGenerality()
Gets the generality of the classifier.
|
double |
getMacroClFitness()
Returns the fitness of the current macro-classifier.
|
double |
getMicroClFitness()
Returns the fitness of the current micro-classifier.
|
int |
getNumerosity()
Returns the numerosity of the classifier.
|
int |
getTime()
Returns the time of the classifier.
|
void |
increaseNumerosity(int num)
Increases the numerosity of the classifier.
|
void |
print()
Prints the classifier statistics to the standard output.
|
void |
print(java.io.PrintWriter fout)
Prints the classifier to the specified file.
|
void |
setExperience(int expCl)
Sets the experience of the classifier.
|
void |
setGenerality(double general)
Sets the generality of the classifier.
|
void |
setNumerosity(int num)
Sets the numerosity of the classifier
|
void |
setTime(int sTime)
Sets the time stamp for this classifier.
|
void |
updateFitness(double kSum,
double k)
Updates the fitness of a classifier
|
void |
updateParameters(double microClInC,
double classOfRule,
double classOfExample)
Updates the parameters of a classifier (reinforcement component)
|
public Parameters()
public Parameters(int tStamp, double size, double gen)
It creates an instance of Parameters. It is used in covering
tStamp
- is the current time of the system.size
- is the action set sizegen
- is the generality of the classifier.public Parameters(Parameters p1, Parameters p2, int tStamp)
It creates a new parameter object making a crossover between the parents parametres.
p1
- is the object that contain the parameters for the first parent.p2
- is the object that contain the parameters for the second parent.tStamp
- is the current time stamp.public Parameters(Parameters p, int tStamp)
It creates a new parameter object copying the parameters from a parent
p
- is the origin of the copytStamp
- is the current time stamppublic void updateParameters(double microClInC, double classOfRule, double classOfExample)
Updates the parameters of a classifier (reinforcement component)
microClInC
- is the size of the correct set activated in this iterationclassOfRule
- is the class predicted by the ruleclassOfExample
- is the class of the input examplepublic void updateFitness(double kSum, double k)
Updates the fitness of a classifier
kSum
- is the sum of all accuracies.k
- is the accuracy of the classifier.public double getAccuracy()
Returns the accuracy of the classifier.
public double getCSize()
Returns the estimated correct set size.
public int getExperience()
Returns the experience of the classifier.
public int getNumerosity()
Returns the numerosity of the classifier.
public double getMacroClFitness()
Returns the fitness of the current macro-classifier.
public double getMicroClFitness()
public int getTime()
Returns the time of the classifier.
public double getGenerality()
Gets the generality of the classifier.
public void setTime(int sTime)
Sets the time stamp for this classifier.
sTime
- is the time stamppublic void setExperience(int expCl)
Sets the experience of the classifier.
expCl
- is the experience of the classifier.public void setNumerosity(int num)
Sets the numerosity of the classifier
num
- is the numerosity of the classifier.public void setGenerality(double general)
general
- is the generality that has to be set to the classifier.public void increaseNumerosity(int num)
num
- amount to increasepublic double deletionVote(double avFitness)
avFitness
- is the average fitness of the set.public boolean couldSubsume()
Indicates if the classifier can subsume. The classifier has to be sufficiently accurate and sufficiently experienced to subsume another classifier.
public void print(java.io.PrintWriter fout)
Prints the classifier to the specified file.
fout
- is the file output where the parameters have to be printed.public void print()