org.debellor.base.evaluator.score
Class Accuracy

java.lang.Object
  extended by org.debellor.base.evaluator.score.Score
      extended by org.debellor.base.evaluator.score.Accuracy

public class Accuracy
extends Score

Calculates accuracy of a decision system (typically a classifier), i.e. the fraction of samples for which predicted decision was exactly the same as the target one.

Author:
Marcin Wojnarski

Constructor Summary
Accuracy()
           
 
Method Summary
 void add(DataObject target, DataObject prediction)
          Update the score with another pair of (target,prediction) decisions.
 java.lang.String report()
          Calculates the value(s) of the quality measure and returns in a form of a textual report.
 void reset()
          Resets the score to its initial state.
 double result()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accuracy

public Accuracy()
Method Detail

reset

public void reset()
Description copied from class: Score
Resets the score to its initial state.

Specified by:
reset in class Score

add

public void add(DataObject target,
                DataObject prediction)
Description copied from class: Score
Update the score with another pair of (target,prediction) decisions.

Specified by:
add in class Score
Parameters:
target - Ground truth decision of a sample.
prediction - Decision predicted by a decision algorithm.

report

public java.lang.String report()
Description copied from class: Score
Calculates the value(s) of the quality measure and returns in a form of a textual report.

Specified by:
report in class Score

result

public double result()
Specified by:
result in class Score