Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions content/09.overfitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This subtle distinction is made clearer by seeing what happens when a model is t
Deep learning models are particularly susceptible to overfitting due to their relatively large number of parameters and associated representational capacity.
To continue the student analogy, a smarter student has greater potential for memorization than average one and thus may be more inclined to memorize.

![A visual example of overfitting. While a high-degree polynomial gets high accuracy on its training data, it performs poorly on data that is has not seen before, whereas a simple linear regression works well. The greater representational capacity of the polynomial is analogous to using a larger or deeper neural network.](images/overfitting.png){#fig:overfitting-fig}
![A visual example of overfitting and failure to generalize. While a high-degree polynomial gets high accuracy on its training data, it performs poorly on data unlike that which it has seen before. In contrast, a simple linear regression works well on both datasets. The greater representational capacity of the polynomial is analogous to using a larger or deeper neural network.](images/overfitting.png){#fig:overfitting-fig}

The simplest way to combat overfitting is to detect it.
This can be done by splitting the dataset into three parts: a training set, a tuning set (also commonly called a validation set in the machine learning literature), and a test set.
Expand All @@ -22,5 +22,6 @@ Similarly, when dealing with sequence data, holding out data that are evolutiona
In these cases, simply holding out test data selected from a random partition of the training data is insufficient.
The best remedy for confounding variables is to [know your data](#know-your-problem) and to test your model on truly independent data.


In essence, practitioners should split data into training, tuning, and single-use testing sets to assess the performance of the model on data that can provide a reliable estimate of its generalization performance.
Futhermore, be cognizant of the danger of skewed or biased data artificially inflating accuracy.
Futhermore, be cognizant of the danger of skewed or biased data artificially inflating accuracy.
91 changes: 32 additions & 59 deletions content/images/overfitting.ipynb

Large diffs are not rendered by default.

Binary file modified content/images/overfitting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading