Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies, add python 3.10, 3.11 tests, ensure code compatibility #106

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix flake8
  • Loading branch information
mateusz-wozny committed May 17, 2024
commit 4f5d47c974be0877c302c31db5d5dd92d59aeec0
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
Loading