Created
August 8, 2018 08:31
-
-
Save lethalbrains/fd7e554292ff4e2f65fe527e47acc0fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __init__(self, max_depth = 4, depth = 1): | |
self.max_depth = max_depth | |
self.depth = depth | |
self.left = None | |
self.right = None | |
def __create_branches(self): | |
self.left = DecisionTree(max_depth = self.max_depth, | |
depth = self.depth + 1) | |
self.right = DecisionTree(max_depth = self.max_depth, | |
depth = self.depth + 1) | |
# Rest of code in this method would remain the same. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment