In this lab, you will explore:
%matplotlib widget
import matplotlib.pyplot as plt
from ipywidgets import Output
from plt_overfit import overfit_example, output
plt.style.use('./deeplearning.mplstyle')
The week’s lecture described situations where overfitting can arise. Run the cell below to generate a plot that will allow you to explore overfitting. There are further instructions below the cell.
plt.close("all")
display(output)
ofit = overfit_example(False)
Output()
Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …
In the plot above you can:
Here are some things you should try:
Regression
and Categorical
to try both examples.To reset the plot, re-run the cell. Click slowly to allow the plot to update before receiving the next click.
Notes on implementations:
You have developed some intuition about the causes and solutions to overfitting. In the next lab, you will explore a commonly used solution, Regularization.