Skip to content

Instantly share code, notes, and snippets.

@lethalbrains
Last active August 8, 2018 07:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lethalbrains/18cf41fe9b2cce4f1390fdca7255ac35 to your computer and use it in GitHub Desktop.
def __create_branches(self):
self.left = DecisionTree()
self.right = DecisionTree()
left_rows = self.data[self.data[self.split_feature] <= self.criteria]
right_rows = self.data[self.data[self.split_feature] > self.criteria]
self.left.fit(data = left_rows, target = self.target)
self.right.fit(data = right_rows, target = self.target)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment