Skip to content

Commit

Permalink
linear fix
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 a6a538a commit 918ad9b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions medleysolver/classifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ def get_ordering(self, point, count):
for i in range(len(SOLVERS))]

ps = [thetas[i].T @ point + beta.T @ point + self.alpha * np.sqrt(sigmas[i]) for i in range(len(SOLVERS))]

i_order = sorted(random.shuffle(list(range(len(ps)))), key=lambda x: -1 * ps[x])
ss = list(range(len(ps)))
random.shuffle(ss)
i_order = sorted(ss, key=lambda x: -1 * ps[x])
order = [list(SOLVERS.keys())[int(choice)] for choice in i_order]
return order

Expand Down

0 comments on commit 918ad9b

Please sign in to comment.