Skip to content

Commit

Permalink
adasyn.py: remove use of depreciated numpy function random_integers
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Hoppmann authored and ehoppmann committed Jun 5, 2019
1 parent f6a7ee2 commit 90e7e17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adasyn.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def generate_samples(self, x, knns, knnLabels, cl):
# generate gi synthetic examples for every minority example
for i in range(0, int(self.gi[ind])):
# randi holds an integer to choose a random minority kNNs
randi = self.random_state_.random_integers(
0, len(min_knns) - 1)
randi = self.random_state_.randint(
0, len(min_knns))
# l is a random number in [0,1)
l = self.random_state_.random_sample()
# X[min_knns[randi]] is the Xzi on equation [5]
Expand Down

0 comments on commit 90e7e17

Please sign in to comment.