Projet

Général

Profil

Data preparation » Historique » Version 10

François Rioult, 23/06/2010 20:57

1 1 François Rioult
h1. Data preparation
2 2 François Rioult
3
This is a tutorial for designing your first scenario with KDAriane.
4
5 3 François Rioult
* launch Ariane with
6 2 François Rioult
<pre>
7
java -jar ariane.jar
8
</pre>
9
10 3 François Rioult
* click on the "New graph" icon (or in the File menu)
11 5 François Rioult
!https://forge.greyc.fr/attachments/14/a1.png! 
12 6 François Rioult
13
* in the left column, in the operator list, in the file category, drag a _loader_ operator on the design chart.
14 5 François Rioult
!https://forge.greyc.fr/attachments/15/a2.png!
15 6 François Rioult
16
* set the file to be loaded by double-clicking on the operator, then click on _load_ and find the @zoo.csv@ file.
17 5 François Rioult
!https://forge.greyc.fr/attachments/16/a3.png!
18 6 François Rioult
19
* execute the operator by right-clicking on the operator for showing the contextual menu, then left-click on _execute_.
20 5 François Rioult
!https://forge.greyc.fr/attachments/17/a4.png!
21 6 François Rioult
22
* the operator state went to green. You can now visualize the result (the input file) by double-clicking on the operator the press _show_.
23 9 François Rioult
<pre>
24
1,1,0,0,1,0,0,1,1,1,1,0,0,4,0,0,1
25
1,1,0,0,1,0,0,0,1,1,1,0,0,4,1,0,1
26
4,0,0,1,0,0,1,1,1,1,0,0,1,0,1,0,0
27
1,1,0,0,1,0,0,1,1,1,1,0,0,4,0,0,1
28
1,1,0,0,1,0,0,1,1,1,1,0,0,4,1,0,1
29
1,1,0,0,1,0,0,0,1,1,1,0,0,4,1,0,1
30
1,1,0,0,1,0,0,0,1,1,1,0,0,4,1,1,1
31
...
32
</pre>
33 5 François Rioult
!https://forge.greyc.fr/attachments/18/a5.png!
34 6 François Rioult
35 7 François Rioult
* add a second file loader for @zoo.col@, that contains the description of the columns. Each line starts with an integer telling how much intervals with homogeneous population should be computed. It is zero is the attribute is qualitative. Then the name of the attribute appears.
36 6 François Rioult
<pre>
37
0 Class
38
0 hair
39
0 feathers
40
0 eggs
41
0 milk
42
0 airborne
43
0 aquatic
44
0 predator
45
0 toothed
46
0 backbone
47
0 breathes
48
0 venomous
49
0 fins
50
0 legs
51
0 tail
52
0 domestic
53
0 catsize
54
</pre>
55 1 François Rioult
56 8 François Rioult
* from the personal operators, category _shell_, drag an "eval121":[[eval121]] operator. It has two inputs, to which the file loaders should be connected: drag the small blue square from the left of the loader to the top input of @eval121@.
57 1 François Rioult
!https://forge.greyc.fr/attachments/10/a6.png!
58 7 François Rioult
59
* @eval121@ invokes a binary with the shell. Here we need to compute the dictionary of the data, given the columns description: double click on the operator and fill the parameter with @dictionary@.  
60 1 François Rioult
!https://forge.greyc.fr/attachments/11/a7.png!
61
* the name of an operator can be changed in the contextual menu: change it here with @dictionary@.
62
!https://forge.greyc.fr/attachments/12/a8.png!
63
* you can now run the operator and view the result by double-clicking on it then press _show_.
64 9 François Rioult
<pre>
65
#Class
66
1
67
2
68
3
69
4
70
5
71
6
72
7
73
#hair
74
0
75
1
76
#feathers
77
0
78
1
79
#eggs
80
0
81
1
82
...
83
</pre>
84 8 François Rioult
* in order to complete the scenario, add an "eval122":[[eval122]] for invoking @segmentation@, that computes the binary data and the translation file (for further use) starting from the CSV data and the dictionary computed with the previous operator.
85
You may also add a viewer operator (and specify which viewer you want - gedit by default), and two saver operator for permanently writing the result.
86 10 François Rioult
The @zoo.bin@ file contains now the binary data:
87
<pre>
88
# binairisation du fichier /home/frioult/svn/kdariane/ariane/data/zoo.csv
89
1 9 10 12 15 16 18 21 23 25 27 28 30 34 38 40 43 
90
1 9 10 12 15 16 18 20 23 25 27 28 30 34 39 40 43 
91
4 8 10 13 14 16 19 21 23 25 26 28 31 32 39 40 42 
92
1 9 10 12 15 16 18 21 23 25 27 28 30 34 38 40 43 
93
1 9 10 12 15 16 18 21 23 25 27 28 30 34 39 40 43 
94
1 9 10 12 15 16 18 20 23 25 27 28 30 34 39 40 43 
95
1 9 10 12 15 16 18 20 23 25 27 28 30 34 39 41 43
96
</pre>
97
and the translation file:
98
<pre>
99
#0
100
1 Class<=1
101
2 Class<=2
102
3 Class<=3
103
4 Class<=4
104
5 Class<=5
105
6 Class<=6
106
7 Class<=7
107
#1
108
8 hair<=0
109
9 hair<=1
110
#2
111
10 feathers<=0
112
11 feathers<=1
113
#3
114
12 eggs<=0
115
13 eggs<=1
116
#4
117
14 milk<=0
118
15 milk<=1
119
</pre>
120 5 François Rioult
!https://forge.greyc.fr/attachments/13/a9.png!