Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ASSESSING MODEL
ACCURACY
Chapter 02 – Part II
2
Outline
Assessing Model Accuracy
Measuring the Quality of Fit
The Bias-Variance Trade-off
The Classification Setting
3
n i 1
Where ŷi is the prediction our method gives for the
observation in our training data.
4
A Problem
In either case our method has generally been designed to
make MSE small on the training data we are looking at
e.g. with linear regression we choose the line such that
MSE is minimized.
LEFT RIGHT
Black: Truth RED: Test MSE
Orange: Linear Estimate Grey: Training MSE
Blue: smoothing spline Dashed: Minimum possible test
Green: smoothing spline (more MSE (irreducible error)
flexible)
7
LEFT RIGHT
Black: Truth RED: Test MSE
Orange: Linear Estimate Grey: Training MSE
Blue: smoothing spline Dashed: Minimum possible test
Green: smoothing spline (more MSE (irreducible error)
flexible)
8
LEFT RIGHT
Black: Truth RED: Test MSE
Orange: Linear Estimate Grey: Training MSE
Blue: smoothing spline Dashed: Minimum possible test
Green: smoothing spline (more MSE (irreducible error)
flexible)
9
The Trade-off
It can be shown that for any given, X=x0, the expected
test MSE for a new Y at x0 will be equal to
Irreducible Error
Of course in real life problems the Bayes error rate can’t
be calculated exactly.
16
The smaller that k is the more flexible the method will be.
18
Simulated Data: K = 10
20
K = 1 and K = 100
21
A Fundamental Picture
In general training
errors will always
decline.
However, test errors
will decline at first
(as reductions in
bias dominate) but
will then start to
increase again (as
increases in
We must always keep this picture in mind when
variance dominate). choosing a learning method. More flexible/complicated
is not always better!