Skip to content

Commit

Permalink
knearest fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil Pimpalkhare authored and Nikhil Pimpalkhare committed Oct 13, 2020
1 parent 1c3a06f commit a6a538a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion medleysolver/classifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ def get_ordering(self, point, count):
if np.random.rand() >= self.epsilon * (self.decay ** count) and self.solved:
candidates = sorted(self.solved, key=lambda entry: np.linalg.norm(entry.datapoint - point))[:self.k]
methods = [x.solve_method for x in candidates]
order = sorted(random.shuffle(list(SOLVERS.keys())), key= lambda x: methods.count(x))
ss = list(SOLVERS.keys())
random.shuffle(ss)
order = sorted(ss, key= lambda x: methods.count(x))
else:
order = Random.get_ordering(self, point, count)

Expand Down

0 comments on commit a6a538a

Please sign in to comment.