Projet

Général

Profil

Actions

Score

Synopsis

score computes the validation values from a decision file: AUC and the points of the curve; recall, precision and Fscore for each class and their average.

Input format

Each lines has three fields, separated by a tab char:
  1. The string description of the object, whose first field is the true class
  2. the decision value for the first class (1), preceeded with a ':'
  3. the decision value for Class 2, preceeded with a ':'
    etc.

Example

$ cat score-test.txt
1 5 7 8 12 15 18 22 24 27 30 32 34 36           :11.561 :46.2681
2 5 7 11 13 16 18 22 23 27 30 32 35 38          :0      :850.127
...
$ score score-test.txt
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root>
<roc>
<point x="0" y="0"/>
<point x="0.166667" y="0.533333"/>
<point x="0.166667" y="0.6"/>
<point x="0.166667" y="0.666667"/>
<point x="0.25" y="0.666667"/>
<point x="0.25" y="0.733333"/>
<point x="0.333333" y="0.733333"/>
<point x="0.416667" y="0.733333"/>
<point x="0.416667" y="0.8"/>
<point x="0.416667" y="0.866667"/>
<point x="0.416667" y="0.933333"/>
<point x="0.5" y="0.933333"/>
<point x="0.583333" y="0.933333"/>
<point x="1" y="1"/>
<auc>78.0556</auc>
</roc>
<score>70.3704</score>
<class index="1">
<precision>73.3333</precision>
<recall>73.3333</recall>
<fscore>73.3333</fscore>
<decision class="1">11</decision>
<decision class="1">4</decision>
</class>
<class index="2">
<precision>66.6667</precision>
<recall>66.6667</recall>
<fscore>66.6667</fscore>
<decision class="2">4</decision>
<decision class="2">8</decision>
</class>
<average>
<precision>70</precision>
<recall>70</recall>
<fscore>70</fscore>
</average>
</root>

C++ code

The code is avalaible below (score.tgz). Just extract and make, the binary is in the dist/Release/GNU-Linux-x86 folder.

Explanations

A short introduction to the evaluation of the supervised classification is given below, in french. The interested reader can also refer to ROC Graphs: Notes and Practical Considerations for Researchers

Mis à jour par François Rioult il y a plus de 10 ans · 3 révisions