Projet

Général

Profil

Actions

Data preparation with command line » Historique » Révision 1

Révision 1/3 | Suivant »
François Rioult, 03/12/2020 14:40


Data preparation with command line

Data preparation

This is a tutorial for designing your first scenario with KDAriane.

  • launch Ariane with
    java -jar ariane.jar
    
  • click on the "New graph" icon (or in the File menu)
  • in the left column, in the operator list, in the file category, drag a loader operator on the design chart.
  • set the file to be loaded by double-clicking on the operator, then click on load and find the zoo.csv file.
  • execute the operator by right-clicking on the operator for showing the contextual menu, then left-click on execute.
  • the operator state went to green. You can now visualize the result (the input file) by double-clicking on the operator the press show.
    1,1,0,0,1,0,0,1,1,1,1,0,0,4,0,0,1
    1,1,0,0,1,0,0,0,1,1,1,0,0,4,1,0,1
    4,0,0,1,0,0,1,1,1,1,0,0,1,0,1,0,0
    1,1,0,0,1,0,0,1,1,1,1,0,0,4,0,0,1
    1,1,0,0,1,0,0,1,1,1,1,0,0,4,1,0,1
    1,1,0,0,1,0,0,0,1,1,1,0,0,4,1,0,1
    1,1,0,0,1,0,0,0,1,1,1,0,0,4,1,1,1
    ...
    

  • 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.
    0 Class
    0 hair
    0 feathers
    0 eggs
    0 milk
    0 airborne
    0 aquatic
    0 predator
    0 toothed
    0 backbone
    0 breathes
    0 venomous
    0 fins
    0 legs
    0 tail
    0 domestic
    0 catsize
    
  • 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.
  • 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.
  • the name of an operator can be changed in the contextual menu: change it here with dictionary.
  • you can now run the operator and view the result by double-clicking on it then press show.
    #Class
    1
    2
    3
    4
    5
    6
    7
    #hair
    0
    1
    #feathers
    0
    1
    #eggs
    0
    1
    ...
    
  • 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.
    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.
    The zoo.bin file contains now the binary data:
    # binairisation du fichier /home/frioult/svn/kdariane/ariane/data/zoo.csv
    1 9 10 12 15 16 18 21 23 25 27 28 30 34 38 40 43 
    1 9 10 12 15 16 18 20 23 25 27 28 30 34 39 40 43 
    4 8 10 13 14 16 19 21 23 25 26 28 31 32 39 40 42 
    1 9 10 12 15 16 18 21 23 25 27 28 30 34 38 40 43 
    1 9 10 12 15 16 18 21 23 25 27 28 30 34 39 40 43 
    1 9 10 12 15 16 18 20 23 25 27 28 30 34 39 40 43 
    1 9 10 12 15 16 18 20 23 25 27 28 30 34 39 41 43
    

    and the translation file:
    #0
    1 Class<=1
    2 Class<=2
    3 Class<=3
    4 Class<=4
    5 Class<=5
    6 Class<=6
    7 Class<=7
    #1
    8 hair<=0
    9 hair<=1
    #2
    10 feathers<=0
    11 feathers<=1
    #3
    12 eggs<=0
    13 eggs<=1
    #4
    14 milk<=0
    15 milk<=1
    

Mis à jour par François Rioult il y a presque 4 ans · 1 révisions