MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

machine_learning/decision_tree.py:11–17  ·  view source on GitHub ↗
(self, depth=5, min_leaf_size=5)

Source from the content-addressed store, hash-verified

9
10class DecisionTree:
11 def __init__(self, depth=5, min_leaf_size=5):
12 self.depth = depth
13 self.decision_boundary = 0
14 self.left = None
15 self.right = None
16 self.min_leaf_size = min_leaf_size
17 self.prediction = None
18
19 def mean_squared_error(self, labels, prediction):
20 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected