Skip to content

Commit 18de144

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6233abc commit 18de144

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

machine_learning/adaboost.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def _build_stump(
7676
thresholds = np.unique(feature_matrix[:, feature])
7777
for threshold in thresholds:
7878
for polarity in [1, -1]:
79-
pred = self._stump_predict(feature_matrix, feature, threshold, polarity)
79+
pred = self._stump_predict(
80+
feature_matrix, feature, threshold, polarity
81+
)
8082
error = np.sum(sample_weights * (pred != target_signed))
8183
if error < min_error:
8284
min_error = error
@@ -98,4 +100,4 @@ def _stump_predict(
98100
pred[feature_matrix[:, feature] < threshold] = -1
99101
else:
100102
pred[feature_matrix[:, feature] > threshold] = -1
101-
return pred
103+
return pred

0 commit comments

Comments
 (0)