CZECH TECHNICAL UNIVERSITY IN PRAGUE
Faculty of Electrical Engineering Department of Cybernetics
- P. Poˇ
s´ ık c 2015 Artificial Intelligence – 1 / 13
Bias-variance trade-off.
- Crossvalidation. Regularization.
Bias-variance trade-off. Crossvalidation. Regularization. Petr Po - - PowerPoint PPT Presentation
CZECH TECHNICAL UNIVERSITY IN PRAGUE Faculty of Electrical Engineering Department of Cybernetics Bias-variance trade-off. Crossvalidation. Regularization. Petr Po s k P. Po s k c 2015 Artificial Intelligence 1 / 13
s´ ık c 2015 Artificial Intelligence – 1 / 13
s´ ık c 2015 Artificial Intelligence – 2 / 13
s´ ık c 2015 Artificial Intelligence – 3 / 13
s´ ık c 2015 Artificial Intelligence – 3 / 13
s´ ık c 2015 Artificial Intelligence – 3 / 13
−0.5 0.5 1 1.5 2 2.5 −1 −0.5 0.5 1 1.5 2 2.5 3 f(x) = x f(x) = x3−3x2+3x
s´ ık c 2015 Artificial Intelligence – 3 / 13
−0.5 0.5 1 1.5 2 2.5 −1 −0.5 0.5 1 1.5 2 2.5 3 f(x) = x f(x) = x3−3x2+3x
s´ ık c 2015 Artificial Intelligence – 3 / 13
−0.5 0.5 1 1.5 2 2.5 −1 −0.5 0.5 1 1.5 2 2.5 3 f(x) = x f(x) = x3−3x2+3x
−0.5 0.5 1 1.5 2 2.5 −0.5 0.5 1 1.5 2 2.5 f(x) = −0.09 + 0.99x f(x) = 0.00 + (−0.31x) + (1.67x2) + (−0.51x3)
s´ ık c 2015 Artificial Intelligence – 3 / 13
−0.5 0.5 1 1.5 2 2.5 −1 −0.5 0.5 1 1.5 2 2.5 3 f(x) = x f(x) = x3−3x2+3x
−0.5 0.5 1 1.5 2 2.5 −0.5 0.5 1 1.5 2 2.5 f(x) = −0.09 + 0.99x f(x) = 0.00 + (−0.31x) + (1.67x2) + (−0.51x3)
s´ ık c 2015 Artificial Intelligence – 3 / 13
−0.5 0.5 1 1.5 2 2.5 −1 −0.5 0.5 1 1.5 2 2.5 3 f(x) = x f(x) = x3−3x2+3x
−0.5 0.5 1 1.5 2 2.5 −0.5 0.5 1 1.5 2 2.5 f(x) = −0.09 + 0.99x f(x) = 0.00 + (−0.31x) + (1.67x2) + (−0.51x3)
s´ ık c 2015 Artificial Intelligence – 4 / 13
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 0, tr. e rr.: 8.319, te st. e rr.: 6.901 Tra ining da ta T e sting da ta
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 1, tr. e rr.: 2.013, te st. e rr.: 2.841 Tra ining da ta T e sting da ta
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 2, tr. e rr.: 0.647, te st. e rr.: 0.925 Tra ining da ta T e sting da ta
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 3, tr. e rr.: 0.645, te st. e rr.: 0.919 Tra ining da ta T e sting da ta
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 5, tr. e rr.: 0.611, te st. e rr.: 0.979 Tra ining da ta T e sting da ta
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 9, tr. e rr.: 0.545, te st. e rr.: 1.067 Tra ining da ta T e sting da ta
How to evaluate a predictive model?
error
suitable model flexibility
Regularization
s´ ık c 2015 Artificial Intelligence – 5 / 13
s´ ık c 2015 Artificial Intelligence – 6 / 13
s´ ık c 2015 Artificial Intelligence – 6 / 13
s´ ık c 2015 Artificial Intelligence – 7 / 13
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 1, tr. e rr.: 2.013, te st. e rr.: 2.841 Tra ining da ta T e sting da ta
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 2, tr. e rr.: 0.647, te st. e rr.: 0.925 Tra ining da ta T e sting da ta
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 9, tr. e rr.: 0.545, te st. e rr.: 1.067 Tra ining da ta T e sting da ta
s´ ık c 2015 Artificial Intelligence – 7 / 13
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 1, tr. e rr.: 2.013, te st. e rr.: 2.841 Tra ining da ta T e sting da ta
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 2, tr. e rr.: 0.647, te st. e rr.: 0.925 Tra ining da ta T e sting da ta
− 2 − 1 1 2 3 4 x − 4 − 2 2 4 6 8 10 y
Polynom de g.: 9, tr. e rr.: 0.545, te st. e rr.: 1.067 Tra ining da ta T e sting da ta
Model Error Model Flexibility Training data Testing data
How to evaluate a predictive model?
error
suitable model flexibility
Regularization
s´ ık c 2015 Artificial Intelligence – 8 / 13
How to evaluate a predictive model?
error
suitable model flexibility
Regularization
s´ ık c 2015 Artificial Intelligence – 8 / 13
How to evaluate a predictive model?
error
suitable model flexibility
Regularization
s´ ık c 2015 Artificial Intelligence – 8 / 13
How to evaluate a predictive model?
error
suitable model flexibility
Regularization
s´ ık c 2015 Artificial Intelligence – 9 / 13
How to evaluate a predictive model?
error
suitable model flexibility
Regularization
s´ ık c 2015 Artificial Intelligence – 9 / 13
How to evaluate a predictive model?
error
suitable model flexibility
Regularization
s´ ık c 2015 Artificial Intelligence – 9 / 13
How to evaluate a predictive model?
error
suitable model flexibility
Regularization
s´ ık c 2015 Artificial Intelligence – 9 / 13
How to evaluate a predictive model?
error
suitable model flexibility
Regularization
s´ ık c 2015 Artificial Intelligence – 10 / 13
s´ ık c 2015 Artificial Intelligence – 11 / 13
s´ ık c 2015 Artificial Intelligence – 12 / 13
i=1
D
d=1
d.
10-8 10-6 10-4 10-2 100 102 104 106 108 Re gula riza tion fa ctor 0.5 1.0 1.5 2.0 2.5 3.0 3.5 MSE
Tra ining e rror T e sting e rror
10-8 10-6 10-4 10-2 100 102 104 106 108 Re gula riza tion fa ctor − 10 − 5 5 10 15 Coe fficie nt size
s´ ık c 2015 Artificial Intelligence – 13 / 13
i=1
D
d=1
10-8 10-7 10-6 10-5 10-4 10-3 10-2 10-1 100 101 102 Re gula riza tion fa ctor 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4 2.6 2.8 MSE
Tra ining e rror T e sting e rror
10-8 10-7 10-6 10-5 10-4 10-3 10-2 10-1 100 101 102 Re gula riza tion fa ctor − 0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Coe fficie nt size