3. How do you
measure how
good a model
is?
Number of
Countries
Visited
Number of
Years in
School
Height
(Feet)
Original
Label
Who am
I?
15 13 5.0 Adult
2 3 3.5 Child
7 4 4.0 Child
1 5 7.0 Adult
4. How do you
measure how
good a model is?
• Create a “Validation/test
Dataset” – a part of the
training data put aside to
use when testing.
Number of
Countries
Visited
Number of
Years in
School
Height
(Feet)
Original
Label
Who am
I?
15 13 5.0 Adult
2 3 3.5 Child
7 4 4.0 Child
1 5 7.0 Adult
Validation/Test Dataset
20% of the Dataset
Training Data
80% of the Dataset
Dataset
5. How do you
measure how
good a model is?
Validation/Test Dataset
• Create a “Validation/test
Dataset” – a part of the
training data put aside to
use when testing.
• Validation dataset has the
actual (correct answer)
• After the model is trained,
use it to predict the
answer and compare
prediction to the actual
answer in the validation
dataset
Number of
Countries
Visited
Number of
Years in
School
Height (Feet) Original
Label Who
am I?
15 13 5.0 Adult
2 3 3.5 Child
7 4 4.0 Child
1 5 7.0 Adult
6. Comparing the
trained AI
predictions to the
actual answers
Correct Answers - 3
Incorrect Answers - 1
Actual
Answers
AI Prediction
Answers
• In classification, answer is
precisely right or wrong.
Right if it matches label, wrong
otherwise
(no matter how many categories
there are)
Number of
Countries
Visited
Number of
Years in
School
Height
(Feet)
Original Label
Who am I?
What the model
predicted
15 13 5.0 Adult Adult
2 3 3.5 Child Child
7 4 4.0 Child Child
1 5 7.0 Adult Child
7. Calculating Accuracy
• Correct Answers*100/Total
answers
• Closer to 100% the better
• We will see more metrics in
later projects
3 Correct * 100/ 4 Total = 75%
Actual
Answers
AI Prediction
Answers
Number of
Countries
Visited
Number of
Years in
School
Height
(Feet)
Original Label
Who am I?
What the model
predicted
15 13 5.0 Adult Adult
2 3 3.5 Child Child
7 4 4.0 Child Child
1 5 7.0 Adult Child