Projet

Général

Profil

Score » Historique » Version 2

François Rioult, 19/10/2013 20:54

1 1 François Rioult
h1. Score
2
3
h2. Synopsis
4
5 2 François Rioult
@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.
6 1 François Rioult
7
h2. Input format
8
9
Each lines has three fields, separated by a tab char:
10 2 François Rioult
# The string description of the object, whose first field is the true class
11
# the decision value for the first class (1), preceeded with a ':'
12
# the decision value for Class 2, preceeded with a ':'
13 1 François Rioult
etc.
14
15
h2. Example
16
17
<pre>
18 2 François Rioult
$ cat score-test.txt
19
1 5 7 8 12 15 18 22 24 27 30 32 34 36           :11.561 :46.2681
20
2 5 7 11 13 16 18 22 23 27 30 32 35 38          :0      :850.127
21
...
22
$ score score-test.txt
23
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
24
<root>
25
<roc>
26
<point x="0" y="0"/>
27
<point x="0.166667" y="0.533333"/>
28
<point x="0.166667" y="0.6"/>
29
<point x="0.166667" y="0.666667"/>
30
<point x="0.25" y="0.666667"/>
31
<point x="0.25" y="0.733333"/>
32
<point x="0.333333" y="0.733333"/>
33
<point x="0.416667" y="0.733333"/>
34
<point x="0.416667" y="0.8"/>
35
<point x="0.416667" y="0.866667"/>
36
<point x="0.416667" y="0.933333"/>
37
<point x="0.5" y="0.933333"/>
38
<point x="0.583333" y="0.933333"/>
39
<point x="1" y="1"/>
40
<auc>78.0556</auc>
41
</roc>
42
<score>70.3704</score>
43
<class index="1">
44
<precision>73.3333</precision>
45
<recall>73.3333</recall>
46
<fscore>73.3333</fscore>
47
<decision class="1">11</decision>
48
<decision class="1">4</decision>
49
</class>
50
<class index="2">
51
<precision>66.6667</precision>
52
<recall>66.6667</recall>
53
<fscore>66.6667</fscore>
54
<decision class="2">4</decision>
55
<decision class="2">8</decision>
56
</class>
57
<average>
58
<precision>70</precision>
59
<recall>70</recall>
60
<fscore>70</fscore>
61
</average>
62
</root>
63 1 François Rioult
</pre>
64
65
h2. C++ code
66
67 2 François Rioult
The code is avalaible below (score.tgz). Just extract and make, the binary is in the @dist/Release/GNU-Linux-x86@ folder.