Skip to content

Commit

Permalink
Updated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
iuliivasilev committed Jul 13, 2024
1 parent a489b10 commit 6ee13b6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions survivors/tree/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,10 @@ def find_best_split(self):

# if attrs[attr]["sign_split"] > 0 and self.info["bonf"]: # suffix for simple p-value
# attrs[attr]["p_value"] = attrs[attr]["p_value"] / attrs[attr]["sign_split"]
return (attr, attrs[attr])
return attr, attrs[attr]

def ind_for_nodes(self, X_attr, best_split, is_categ):
"""
Map the number of the according child node by rule and sample features.
"""
""" Map the number of the according child node by rule and sample features """
rule_id = best_split["pos_nan"].index(0)
query = best_split["values"][rule_id]
if is_categ:
Expand All @@ -244,9 +242,7 @@ def ind_for_nodes(self, X_attr, best_split, is_categ):
return np.where(values, rule_id, 1 - rule_id)

def split(self):
"""
Find best split of df sample and create child nodes
"""
""" Find best split of df sample and create child nodes """
node_edges = np.array([], dtype=int)
self.rule_edges = np.array([], dtype=Rule)

Expand Down

0 comments on commit 6ee13b6

Please sign in to comment.