mark.nlp.classifiers
Class Util

java.lang.Object
  |
  +--mark.nlp.classifiers.Util

public class Util
extends java.lang.Object

A collection of utility routines for instance vectors.


Constructor Summary
Util()
           
 
Method Summary
static double correctPercentage(Table confusions)
          Given a confusion matrix, generates a percentage correct score.
static double incorrectPercentage(Table confusions)
          Given a confusion matrix, generates a percentage incorrect score.
static int numCorrect(Table confusions)
          Given a confusion matrix, returns the number of correct predictions.
static int numIncorrect(Table confusions)
          Given a confusion matrix, returns the number of incorrect predictions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

numCorrect

public static int numCorrect(Table confusions)
Given a confusion matrix, returns the number of correct predictions.

Parameters:
confusions - the confusion matrix.
Returns:
the number of correct predictions.

numIncorrect

public static int numIncorrect(Table confusions)
Given a confusion matrix, returns the number of incorrect predictions.

Parameters:
confusions - the confusion matrix.
Returns:
the number of incorrect predictions.

correctPercentage

public static double correctPercentage(Table confusions)
Given a confusion matrix, generates a percentage correct score.

Parameters:
confusions - the confusion matrix.
Returns:
the percentage correct.

incorrectPercentage

public static double incorrectPercentage(Table confusions)
Given a confusion matrix, generates a percentage incorrect score.

Parameters:
confusions - the confusion matrix.
Returns:
the percentage correct.