We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9d7a028 + f2d9038 commit a824511Copy full SHA for a824511
1 file changed
machine_learning/mab.py
@@ -159,8 +159,7 @@ def select_arm(self) -> int:
159
"""
160
if self.total_counts < self.k:
161
return self.total_counts
162
- ucb_values = self.values + \
163
- np.sqrt(2 * np.log(self.total_counts) / self.counts)
+ ucb_values = self.values + np.sqrt(2 * np.log(self.total_counts) / self.counts)
164
return np.argmax(ucb_values)
165
166
def update(self, arm_index: int, reward: int) -> None:
0 commit comments