| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectemolib.util.eval.ConfusionMatrixCalculator
public class ConfusionMatrixCalculator
The ConfusionMatrixCalculator class calculates the confusion matrix associated to two input datasets.
The two input datasets are entered as two command line parameters that name the two files that contain the datasets. The first one corresponds to the original categorised dataset while the second one corresponds to the prediction dataset. One third parameter is provided indicating the different labels (categories) that are to be found in the datasets. These categories have to be hyphen-separated. It is preferred to be done like this because in case that in the datasets one of the expected categories didn't appear, this would be rather confusing for the expert interpreting the results. Note that at least two categories must be provided.
The ConfusionMatrixCalculator class contains a main method to execute the class directly with the appropriate command line parameters. In case a quick reference of its usage is needed, the class responds to the typical help queries ("-h" or "--help") by showing the program's synopsis.
| Constructor Summary | |
|---|---|
| ConfusionMatrixCalculator()Void constructor. | |
| Method Summary | |
|---|---|
|  void | evaluate(java.lang.String categoryOriginalFile,
         java.lang.String categoryPredictionFile)Method to evaluate the datasets and construct the confusion matrix. | 
|  void | initialize(java.lang.String inputCategories)Method to initialize the confusion matrix. | 
| static void | main(java.lang.String[] args)The main method of the ConfusionMatrixCalculator application. | 
|  void | printConfusionMatrix()Method to print the resulting confusion matrix. | 
|  void | printSynopsis()Prints the synopsis. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ConfusionMatrixCalculator()
| Method Detail | 
|---|
public void initialize(java.lang.String inputCategories)
inputCategories - The categories.
public void evaluate(java.lang.String categoryOriginalFile,
                     java.lang.String categoryPredictionFile)
categoryOriginalFile - A category from the first file.categoryPredictionFile - A category from the second file.public void printConfusionMatrix()
public void printSynopsis()
public static void main(java.lang.String[] args)
                 throws java.lang.Exception
args - The input arguments. The first one corresponds to the original categorized
 file, the second one corresponds to the prediction file and the third one corresponds
 to the categories the system is allowed to deal with.
java.lang.Exception| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||