Search code examples
scriptingprogramming-languages

ideal language to use?


I have this decision tree,

a6 <= 0.190181: 3 (7350.0/269.0)

    a6 > 0.190181
|   a1 <= 1.248655
|   |   a6 <= 2.482277
|   |   |   a2 <= 0.195427
|   |   |   |   a5 <= 1.878633: 3 (5.0/1.0)
|   |   |   |   a5 > 1.878633
|   |   |   |   |   a6 <= 2.342224
|   |   |   |   |   |   a6 <= 1.215502
|   |   |   |   |   |   |   a5 <= 3.757267
|   |   |   |   |   |   |   |   a3 <= 1.373932
|   |   |   |   |   |   |   |   |   a5 <= 3.209332: 1 (3.0/1.0)
|   |   |   |   |   |   |   |   |   a5 > 3.209332: 3 (3.0)
|   |   |   |   |   |   |   |   a3 > 1.373932
|   |   |   |   |   |   |   |   |   a5 <= 3.131056: 2 (3.0)
|   |   |   |   |   |   |   |   |   a5 > 3.131056: 1 (3.0/1.0)
|   |   |   |   |   |   |   a5 > 3.757267
|   |   |   |   |   |   |   |   a1 <= 0.554452: 1 (3.0/1.0)
|   |   |   |   |   |   |   |   a1 > 0.554452: 2 (8.0)
|   |   |   |   |   |   a6 > 1.215502
|   |   |   |   |   |   |   a4 <= 12.664134: 2 (41.0/1.0)
|   |   |   |   |   |   |   a4 > 12.664134
|   |   |   |   |   |   |   |   a4 <= 12.743923: 1 (8.0/1.0)
|   |   |   |   |   |   |   |   a4 > 12.743923: 2 (7.0)
|   |   |   |   |   a6 > 2.342224: 3 (3.0/1.0)
|   |   |   a2 > 0.195427
|   |   |   |   a5 <= 3.365885
|   |   |   |   |   a5 <= 1.95691: 3 (23.0)
|   |   |   |   |   a5 > 1.95691
|   |   |   |   |   |   a2 <= 1.465705
|   |   |   |   |   |   |   a3 <= 0.686966
|   |   |   |   |   |   |   |   a3 <= 0.457977
|   |   |   |   |   |   |   |   |   a3 <= 0.152659: 1 (2.0)
|   |   |   |   |   |   |   |   |   a3 > 0.152659: 3 (7.0)
|   |   |   |   |   |   |   |   a3 > 0.457977: 1 (7.0/1.0)
|   |   |   |   |   |   |   a3 > 0.686966
|   |   |   |   |   |   |   |   a1 <= 0.824766
|   |   |   |   |   |   |   |   |   a4 <= 12.431223: 3 (9.0)
|   |   |   |   |   |   |   |   |   a4 > 12.431223
|   |   |   |   |   |   |   |   |   |   a4 <= 12.566686: 2 (3.0)
|   |   |   |   |   |   |   |   |   |   a4 > 12.566686: 3 (3.0)
|   |   |   |   |   |   |   |   a1 > 0.824766
|   |   |   |   |   |   |   |   |   a3 <= 0.992284: 2 (3.0/1.0)
|   |   |   |   |   |   |   |   |   a3 > 0.992284
|   |   |   |   |   |   |   |   |   |   a1 <= 1.020451: 1 (6.0/1.0)
|   |   |   |   |   |   |   |   |   |   a1 > 1.020451: 3 (8.0/1.0)
|   |   |   |   |   |   a2 > 1.465705
|   |   |   |   |   |   |   a4 <= 12.516655
|   |   |   |   |   |   |   |   a1 <= 0.281815: 3 (2.0)
|   |   |   |   |   |   |   |   a1 > 0.281815: 1 (4.0/1.0)
|   |   |   |   |   |   |   a4 > 12.516655: 3 (33.0/2.0)
|   |   |   |   a5 > 3.365885

there is some more to it...could some body suggest me,what would be the ideal language to use to code such a decision tree. the values "0.190181" etc could be read from a file


Solution

  • There are a plenty of options for you. Try to limit them by thinking about the requirements first. For example do you want your program to be portable across different platforms? Is the performance of a scripting language (for example python) sufficient? Try creating a prototype to test the performance.

    PS: Sorry but I don't have permissions to comment yet, thus I have to reply with an answer.