Skip to content

Instantly share code, notes, and snippets.

@lethalbrains
Created August 8, 2018 09:21
Show Gist options
  • Save lethalbrains/e6053aa75da9385b35ed416b3b6ea5a9 to your computer and use it in GitHub Desktop.
Save lethalbrains/e6053aa75da9385b35ed416b3b6ea5a9 to your computer and use it in GitHub Desktop.
@property
def is_leaf_node(self): return self.left is None
@property
def probability(self):
return self.data[self.target].value_counts().apply(lambda x: x/len(self.data)).tolist()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment