8

I'm doing the conceptual model for a Decision tree database. The goal is store any Decision tree.

I have four entity types: DecisionTree, Node, Branch and Leaf.

  • Each Decision tree is composed of Decision node(s), Branch(es) and Leaves.
  • Each Decision node has a name and position.
  • Each Branch is a path for a possible decision or occurrence.
  • Each Leaf has represents the class label of the object to be classified.

Example of a decision tree:

enter image description here

Figure 1 provides an example of decision tree with its associated rules, where p(Class #i) is the probability of objects to belong to Class #i.

Example of Trees in SQL databases:

Representation of a decision tree:

enter image description here

My conceptual design is represented in the following entity-relationship diagram (ERD):

enter image description here

So, the question is: How can I associate an Node, Branch and Leaf with an DecisionTree?

Michael Green
  • 22,481
  • 12
  • 46
  • 87
Amater90
  • 81
  • 1
  • 3
  • shouldn't the probability of n0 in the chart be 1 why is it 0.70, it's the root. – NO WAR WITH RUSSIA Jun 06 '18 at 14:32
  • If the objects don't belong to the root, where do they belong? They root has a probability of 70%. That means it's not the root. – NO WAR WITH RUSSIA Jun 06 '18 at 17:26
  • Table provides an example of decision tree with its associated rules, where p(Class #i) is the probability of objects to belong to Class #i. Each row in the table represents an edge of the tree from node parent to node node. Each edge is associated with a condition, where the attribute name is stored in the field attrib and the domain for the split is represented by the values of the fields minval and maxval. The field class holds the label of the most frequent class in the partition associated with the node node of the edge together with the probability prob of the class occurrence. – Amater90 Jun 06 '18 at 17:35
  • just asking about the root, and only why it has a prob of 0.70 and not 1 – NO WAR WITH RUSSIA Jun 06 '18 at 18:12
  • why do you need to store this in a sql table? are you sorting/filtering/analying fields seperately? probably easiest just to store in a blob – Neil McGuigan Jun 06 '18 at 22:44
  • 1
    probability is associated with class attribute, which is the attribute to predict. – Amater90 Jun 07 '18 at 04:08
  • Your ERD is too flat. You need 2 or three tables, depending on whether or not you want to store attributes that apply to the whole tree. Your tables: tree (may not be needed), branch, node. – ALisboa Nov 13 '19 at 17:17

0 Answers0