-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDecisionNode.java
More file actions
36 lines (29 loc) · 829 Bytes
/
Copy pathDecisionNode.java
File metadata and controls
36 lines (29 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by VenkataRamesh on 12/7/2016.
*/
public class DecisionNode {
public String featureLabel;
public Map<String, DecisionNode> children = new HashMap<>();
public boolean isLeaf;
public int attributeIndex;
public double splitAttributeCutValue;
public String splitCatValue;
public DecisionNode(String featureLabel) {
this.featureLabel = featureLabel;
}
public DecisionNode() {
}
public void setLeaf(boolean isLeaf) {
this.isLeaf = isLeaf;
}
public void setFeatureLabel(String feature) {
this.featureLabel = feature;
}
public void addNode(DecisionNode node, String edgeLabel) {
this.children.put(edgeLabel, node);
}
}