public class PerformanceAgent
extends java.lang.Object
This class computes several performance measures taken from a fitness computation of an individual
Modifier and Type | Field and Description |
---|---|
static int[][] |
confusionMatrix |
static int[] |
okClass |
static int[] |
totalClass |
static int[] |
utilRules |
Constructor and Description |
---|
PerformanceAgent() |
Modifier and Type | Method and Description |
---|---|
static void |
addPrediction(int predicted,
int real,
int activatedRule)
Function used to inform PerformanceAgent of each example
classified during the training stage
|
static void |
addPredictionTest(int predicted,
int real,
int activatedRule)
Function used to inform PerformanceAgent of each example
classified during the test stage
|
static int[] |
controlBloatRuleDeletion()
This function computes the rules of an individual that will be
deleted by the rule deletion operator, based on their activity
during the previous fitness computation cycle
|
static void |
dumpStats(java.lang.String typeOfTest)
This function dumps the test statistics
|
static double |
getAccuracy() |
static int |
getActivationsOfRule(int rule) |
static double |
getFitness(Classifier ind)
This function returns the fitness formula used
|
static int |
getNumAliveRules() |
static void |
resetPerformance(int _numRules) |
static void |
resetPerformanceTest(int _numRules)
The test stage computes more statistics.
|
public static int[] utilRules
public static int[] okClass
public static int[] totalClass
public static int[][] confusionMatrix
public static int[] controlBloatRuleDeletion()
public static void resetPerformance(int _numRules)
public static void resetPerformanceTest(int _numRules)
public static void addPrediction(int predicted, int real, int activatedRule)
public static void addPredictionTest(int predicted, int real, int activatedRule)
public static double getAccuracy()
public static int getNumAliveRules()
public static int getActivationsOfRule(int rule)
public static double getFitness(Classifier ind)
public static void dumpStats(java.lang.String typeOfTest)
typeOfTest
- type of test used.