edu.uiuc.ge.illigal.gale.agents
Interface AgentPerformance

All Known Implementing Classes:
BatchPerformance

public interface AgentPerformance

Defines a generic handle to Agent's Performance. It presents the minimal set of needed data.

Since:
0.9alpha
Version:
0.9alpha
Author:
Xavier Llorà <xllora@illigal.ge.uiuc.edu>

Method Summary
 java.lang.Object clone()
          Clones the current IncrementalLearning Performance object.
 boolean equals(java.lang.Object obj)
          Compares if the performances are equal
 float getAccuracy()
          Provides the overall classification performance information.
 int[][] getConfusionMatrix()
          Returns the confusion matrix.
 int getDontKnow()
          Returns the total number of unclassified instances
 float getScaledAccuracy()
          Provides the overall classification performance information.
 int getTotal()
          Returns the total number of classified instances
 void reset()
          Resets all the performance information contained.
 java.lang.String toString()
          Converts the information into a string
 void update(int iCls, int iReal)
          Updates the performance information.
 

Method Detail

getConfusionMatrix

public int[][] getConfusionMatrix()
Returns the confusion matrix.

Returns:
The confusion matrix

getDontKnow

public int getDontKnow()
Returns the total number of unclassified instances

Returns:
The number of unclassified instances processes

getTotal

public int getTotal()
Returns the total number of classified instances

Returns:
The number of instances processes

getAccuracy

public float getAccuracy()
Provides the overall classification performance information. Computes the classification performance since the last reset of Agent.

Returns:
The classification performance

getScaledAccuracy

public float getScaledAccuracy()
Provides the overall classification performance information. Computes the classification performance since the last reset of Agent.

Returns:
The classification performance

update

public void update(int iCls,
                   int iReal)
Updates the performance information. It needs the predicted class and the real class for the prediction.

Parameters:
iCls - The predicted class
iReal - The real class

reset

public void reset()
Resets all the performance information contained.


equals

public boolean equals(java.lang.Object obj)
Compares if the performances are equal

Overrides:
equals in class java.lang.Object
Parameters:
obj - the performance to be compared with
Returns:
true if the performance are equal

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones the current IncrementalLearning Performance object.

Overrides:
clone in class java.lang.Object
Returns:
The cloned object
Throws:
java.lang.CloneNotSupportedException - The object could not be cloned

toString

public java.lang.String toString()
Converts the information into a string

Overrides:
toString in class java.lang.Object
Returns:
The stringfied information