Projet

Général

Profil

Data preparation with command line » Historique » Version 1

François Rioult, 03/12/2020 14:40

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