Skip to content

Commit 3a393c9

Browse files
authored
Merge pull request #27 from TakeshiTohyama/gh-pages-re
Training set should be test set in boostrapping lesson
2 parents 8b35379 + 2c235ee commit 3a393c9

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

_episodes/07-bootstrapping.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ reg.fit(x_train, y_train)
6969
accuracy = []
7070
n_iterations = 1000
7171
for i in range(n_iterations):
72-
X_bs, y_bs = resample(x_train, y_train, replace=True)
72+
X_bs, y_bs = resample(x_test, y_test, replace=True)
7373
# make predictions
7474
y_hat = reg.predict(X_bs)
7575
# evaluate model
@@ -117,7 +117,7 @@ print(f"Model accuracy is reported on the test set. 1000 bootstrapped samples "
117117

118118
```
119119
Model accuracy is reported on the test set. 1000 bootstrapped samples were used to calculate 95% confidence intervals.
120-
Median accuracy is 0.86 with a 95% a confidence interval of [0.80,0.91].
120+
Median accuracy is 0.82 with a 95% a confidence interval of [0.73,0.90].
121121
```
122122
{: .output}
123123

fig/section8-fig1.png

14.7 KB
Loading

fig/section8-fig2.png

19.2 KB
Loading

0 commit comments

Comments
 (0)