Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasDrews97 committed Apr 19, 2024
1 parent 49ca501 commit f6fe948
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
8 changes: 0 additions & 8 deletions hiclass/LocalClassifierPerNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,6 @@ def predict_proba(self, X):

# normalize probabilities
level_probability_list = _normalize_probabilities(level_probability_list)
"""
level_probability_list = [
np.nan_to_num(
level_probabilities / level_probabilities.sum(axis=1, keepdims=True)
)
for level_probabilities in level_probability_list
]
"""

# combine probabilities horizontally
level_probability_list = self._combine_and_reorder(level_probability_list)
Expand Down
8 changes: 0 additions & 8 deletions hiclass/LocalClassifierPerParentNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,6 @@ def _predict_proba_remaining_levels(self, X, y):

# normalize probabilities
level_probability_list = _normalize_probabilities(level_probability_list)
"""
level_probability_list = [
np.nan_to_num(
level_probabilities / level_probabilities.sum(axis=1, keepdims=True)
)
for level_probabilities in level_probability_list
]
"""

return level_probability_list

Expand Down
1 change: 0 additions & 1 deletion hiclass/_calibration/Calibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def predict_proba(self, X: np.ndarray):
for idx, split in enumerate(score_splits):
probabilities[:, idx] = self.calibrators[idx].predict_proba(split)

# probabilities /= probabilities.sum(axis=1, keepdims=True)
probabilities = _normalize_probabilities(probabilities)

else:
Expand Down
1 change: 0 additions & 1 deletion hiclass/_calibration/VennAbersCalibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ def predict_proba(self, scores: np.ndarray):
probabilities[:, idx] = self.ivaps[idx].predict_proba(scores)

# normalize
# probabilities /= probabilities.sum(axis=1, keepdims=True)
probabilities = _normalize_probabilities(probabilities)
return probabilities

Expand Down

0 comments on commit f6fe948

Please sign in to comment.