Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-wozny committed May 17, 2024
1 parent fa25221 commit 4f5d47c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion multi_imbalance/resampling/rbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def _get_nearest_majority_and_minority_neighbours(self, k_nearest_neighbours, mi
return X_nearest_majority, X_nearest_minority

def _find_k_sorted_nearest_neighbours(self, minority_examples, X):
return [np.argsort(self.distance_function(minority, X))[1 : self.k + 1] for minority in minority_examples]
idx = self.k + 1
return [np.argsort(self.distance_function(minority, X))[1:idx] for minority in minority_examples]

def _generate_minority_example(self, current_x: np.ndarray, x_majority: np.ndarray, x_minority: np.ndarray):
mutual_potential = self._mutual_class_potential(current_x, x_majority, x_minority)
Expand Down

0 comments on commit 4f5d47c

Please sign in to comment.