Last active
August 8, 2018 07:32
-
-
Save lethalbrains/3d35e3d9d23191bae29cf788a110637f 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 __find_best_split(self): | |
best_split = {} | |
for col in self.independent: | |
information_gain, split = self.__find_best_split_for_column(col) | |
if split is None: continue | |
if not best_split or best_split["information_gain"] < information_gain: | |
best_split = {"split": split, | |
"col": col, | |
"information_gain": information_gain} | |
return best_split["split"], best_split["col"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment