Skip to content

Commit 46fdb1b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ddbce91 commit 46fdb1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: machine_learning/mab.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ def select_arm(self):
159159
"""
160160
if self.total_counts < self.k:
161161
return self.total_counts
162-
ucb_values = self.values + \
163-
np.sqrt(2 * np.log(self.total_counts) / self.counts)
162+
ucb_values = self.values + np.sqrt(2 * np.log(self.total_counts) / self.counts)
164163
return np.argmax(ucb_values)
165164

166165
def update(self, arm_index: int, reward: int):
@@ -388,5 +387,6 @@ def test_mab_strategies():
388387

389388
if __name__ == "__main__":
390389
import doctest
390+
391391
doctest.testmod()
392392
test_mab_strategies()

0 commit comments

Comments
 (0)