Skip to content

Commit c71fd5b

Browse files
committed
BUG Fix output message
This was caught and reported by a user
1 parent 853183b commit c71fd5b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎ch02/heldout.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#
66
# It is made available under the MIT License
77

8-
# This script demonstrates the difference between the training error and
9-
# testing (held-out) error.
8+
# This script demonstrates the difference between the training accuracy and
9+
# testing (held-out) accuracy.
1010

1111
from matplotlib import pyplot as plt
1212
import numpy as np
@@ -30,10 +30,10 @@
3030
training = ~testing
3131

3232
model = learn_model(features[training], virginica[training])
33-
train_error = accuracy(features[training], virginica[training], model)
34-
test_error = accuracy(features[testing], virginica[testing], model)
33+
train_accuracy = accuracy(features[training], virginica[training], model)
34+
test_accuracy = accuracy(features[testing], virginica[testing], model)
3535

3636
print('''\
37-
Training error was {0:.1%}.
38-
Testing error was {1:.1%} (N = {2}).
39-
'''.format(train_error, test_error, testing.sum()))
37+
Training accuracy was {0:.1%}.
38+
Testing accuracy was {1:.1%} (N = {2}).
39+
'''.format(train_accuracy, test_accuracy, testing.sum()))

0 commit comments

Comments
 (0)