.. _book_fig_chapter8_fig_cross_val_B: Cross Validation Examples: part 2 --------------------------------- Figure 8.13 Three models of increasing complexity applied to our toy dataset (eq. 8.75). The d = 2 model, like the linear model in figure 8.12, suffers from high bias, and underfits the data. The d = 19 model suffers from high variance, and overfits the data. The d = 3 model is a good compromise between these extremes. .. image:: ../images/chapter8/fig_cross_val_B_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: fig_cross_val_B.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: fig_cross_val_B.py :lines: 11- .. raw:: html
:download:`[download source: fig_cross_val_B.py] ` .. raw:: html