MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / __init__

Method __init__

mla/ensemble/tree.py:15–26  ·  view source on GitHub ↗
(self, regression=False, criterion=None, n_classes=None)

Source from the content-addressed store, hash-verified

13 """Recursive implementation of decision tree."""
14
15 def __init__(self, regression=False, criterion=None, n_classes=None):
16 self.regression = regression
17 self.impurity = None
18 self.threshold = None
19 self.column_index = None
20 self.outcome = None
21 self.criterion = criterion
22 self.loss = None
23 self.n_classes = n_classes # Only for classification
24
25 self.left_child = None
26 self.right_child = None
27
28 @property
29 def is_terminal(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected