Projet

Général

Profil

Data preparation » Historique » Version 11

François Rioult, 23/10/2013 18:28

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 11 François Rioult
!https://forge.greyc.fr/attachments/355/dataPreparationGeneric.png!
5 2 François Rioult
6 3 François Rioult
* launch Ariane with
7 2 François Rioult
<pre>
8
java -jar ariane.jar
9
</pre>
10
11 3 François Rioult
* click on the "New graph" icon (or in the File menu)
12 5 François Rioult
!https://forge.greyc.fr/attachments/14/a1.png! 
13 6 François Rioult
14
* in the left column, in the operator list, in the file category, drag a _loader_ operator on the design chart.
15 5 François Rioult
!https://forge.greyc.fr/attachments/15/a2.png!
16 6 François Rioult
17
* set the file to be loaded by double-clicking on the operator, then click on _load_ and find the @zoo.csv@ file.
18 5 François Rioult
!https://forge.greyc.fr/attachments/16/a3.png!
19 6 François Rioult
20
* execute the operator by right-clicking on the operator for showing the contextual menu, then left-click on _execute_.
21 5 François Rioult
!https://forge.greyc.fr/attachments/17/a4.png!
22 6 François Rioult
23
* the operator state went to green. You can now visualize the result (the input file) by double-clicking on the operator the press _show_.
24 9 François Rioult
<pre>
25
1,1,0,0,1,0,0,1,1,1,1,0,0,4,0,0,1
26
1,1,0,0,1,0,0,0,1,1,1,0,0,4,1,0,1
27
4,0,0,1,0,0,1,1,1,1,0,0,1,0,1,0,0
28
1,1,0,0,1,0,0,1,1,1,1,0,0,4,0,0,1
29
1,1,0,0,1,0,0,1,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,0,1
31
1,1,0,0,1,0,0,0,1,1,1,0,0,4,1,1,1
32
...
33
</pre>
34 5 François Rioult
!https://forge.greyc.fr/attachments/18/a5.png!
35 6 François Rioult
36 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.
37 6 François Rioult
<pre>
38
0 Class
39
0 hair
40
0 feathers
41
0 eggs
42
0 milk
43
0 airborne
44
0 aquatic
45
0 predator
46
0 toothed
47
0 backbone
48
0 breathes
49
0 venomous
50
0 fins
51
0 legs
52
0 tail
53
0 domestic
54
0 catsize
55
</pre>
56 1 François Rioult
57 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@.
58 1 François Rioult
!https://forge.greyc.fr/attachments/10/a6.png!
59 7 François Rioult
60
* @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@.  
61 1 François Rioult
!https://forge.greyc.fr/attachments/11/a7.png!
62
* the name of an operator can be changed in the contextual menu: change it here with @dictionary@.
63
!https://forge.greyc.fr/attachments/12/a8.png!
64
* you can now run the operator and view the result by double-clicking on it then press _show_.
65 9 François Rioult
<pre>
66
#Class
67
1
68
2
69
3
70
4
71
5
72
6
73
7
74
#hair
75
0
76
1
77
#feathers
78
0
79
1
80
#eggs
81
0
82
1
83
...
84
</pre>
85 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.
86
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.
87 10 François Rioult
The @zoo.bin@ file contains now the binary data:
88
<pre>
89
# binairisation du fichier /home/frioult/svn/kdariane/ariane/data/zoo.csv
90
1 9 10 12 15 16 18 21 23 25 27 28 30 34 38 40 43 
91
1 9 10 12 15 16 18 20 23 25 27 28 30 34 39 40 43 
92
4 8 10 13 14 16 19 21 23 25 26 28 31 32 39 40 42 
93
1 9 10 12 15 16 18 21 23 25 27 28 30 34 38 40 43 
94
1 9 10 12 15 16 18 21 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 40 43 
96
1 9 10 12 15 16 18 20 23 25 27 28 30 34 39 41 43
97
</pre>
98
and the translation file:
99
<pre>
100
#0
101
1 Class<=1
102
2 Class<=2
103
3 Class<=3
104
4 Class<=4
105
5 Class<=5
106
6 Class<=6
107
7 Class<=7
108
#1
109
8 hair<=0
110
9 hair<=1
111
#2
112
10 feathers<=0
113
11 feathers<=1
114
#3
115
12 eggs<=0
116
13 eggs<=1
117
#4
118
14 milk<=0
119
15 milk<=1
120
</pre>
121 5 François Rioult
!https://forge.greyc.fr/attachments/13/a9.png!