|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PredictionArray
This class generates a prediction array of the provided set. The prediction array is generated according to Wilson's Classifier Fitness Based on Accuracy (Evolutionary Computation Journal, 1995). Moreover, this class provides all methods to handle selection in the prediction array, essentially, to select the best action, a present random action or an action by roulette wheel selection.
Field Summary | |
private double[] |
nr
The sum of the fitnesses of classifiers that represent each entry in the prediction array. |
private double[] |
pa
The prediction array. |
Constructor Summary | |
PredictionArray(XClassifierSet set,
int size)
Constructs the prediction array according to the current set and the possible number of actions. |
Method Summary | |
int |
bestActionWinner()
Selects the action in the prediction array with the best value. |
double |
getBestValue()
Returns the highest value in the prediction array. |
double |
getValue(int i)
Returns the value of the specified entry in the prediction array. |
int |
randomActionWinner()
Selects an action randomly. |
int |
rouletteActionWinner()
Selects an action in the prediction array by roulette wheel selection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private double[] pa
private double[] nr
Constructor Detail |
public PredictionArray(XClassifierSet set, int size)
set
- The classifier set out of which a prediction array is formed (normally the match set).size
- The number of entries in the prediction array (should be set to the number of possible actions in the problem)Method Detail |
public double getBestValue()
public double getValue(int i)
public int randomActionWinner()
public int bestActionWinner()
public int rouletteActionWinner()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |