Creating your Decision Tree 'by hand'

GeoDMA creates decision trees automatically. However, you can define a classification by your own. To build your decision tree, you must create an ascii file with .c45 extension, using, for example, notepad.

This is the file basic structure:

decision_tree
###
number_of_classes
classes_names#
number_of_features
features_names
###

where:

  • decision_tree is the full decision tree, explained in the above example, with the symbol “#” after each class name (when a leave)
  • number_of_classes is the amount of classes present in the decision tree
  • classes_names is a list of names, one class per line, with the symbol “#” after each class name
  • number_of_features is the amount of features present in the decision tree
  • features_names is the list of names, one attribute per line

Note: check if classes_names and features_names match with your created classes and features in GeoDMA to avoid classification errors. The feature names should not have spaces. The classes names can have spaces, however they must always be followed by a “#” symbol.

Example

The following figure shows one decision tree.

The corresponding .c45 file is shown above:

Gyrate <= 190.6 -> Small#
Gyrate > 190.6
|  Area <= 182.5 
|  |  Shape <= 2.01 -> Irregular Pattern#
|  |  Shape > 2.01 -> Linear#
|  Area > 182.5 
|  |  Gyrate <= 1227.5 -> Medium#
|  |  Gyrate > 1227.5
|  |  |  Para <= 44.85 -> Large#
|  |  |  Para > 44.85 -> Linear#
###
5
Irregular Pattern#
Large#
Linear#
Medium#
Small#
4
Area
Gyrate
Para
Shape
###

Now you know how to create your own decision tree 'by hand'!

Go back to the manual.


Navigation