Skip to content

Commit

Permalink
First batch of edits
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger committed May 14, 2020
1 parent 5b70a64 commit 7abc2c3
Show file tree
Hide file tree
Showing 42 changed files with 2,010 additions and 2,415 deletions.
597 changes: 317 additions & 280 deletions 01_intro.ipynb

Large diffs are not rendered by default.

384 changes: 199 additions & 185 deletions 02_production.ipynb

Large diffs are not rendered by default.

387 changes: 194 additions & 193 deletions 03_ethics.ipynb

Large diffs are not rendered by default.

682 changes: 385 additions & 297 deletions 04_mnist_basics.ipynb

Large diffs are not rendered by default.

338 changes: 170 additions & 168 deletions 05_pet_breeds.ipynb

Large diffs are not rendered by default.

508 changes: 101 additions & 407 deletions 06_multicat.ipynb

Large diffs are not rendered by default.

174 changes: 87 additions & 87 deletions 07_sizing_and_tta.ipynb

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions 08_collab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Collaborative filtering deep dive"
"# Collaborative Filtering Deep Dive"
]
},
{
Expand All @@ -48,7 +48,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## A first look at the data"
"## A First Look at the Data"
]
},
{
Expand Down Expand Up @@ -318,7 +318,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Learning the latent factors"
"## Learning the Latent Factors"
]
},
{
Expand Down Expand Up @@ -816,7 +816,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Collaborative filtering from scratch"
"## Collaborative Filtering from Scratch"
]
},
{
Expand Down Expand Up @@ -1214,7 +1214,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Weight decay"
"### Weight Decay"
]
},
{
Expand Down Expand Up @@ -1272,7 +1272,7 @@
"In practice though, it would be very inefficient (and maybe numerically unstable) to compute that big sum and add it to the loss. If you remember a little bit of high schoool math, you might recall that the derivative of `p**2` with respect to `p` is `2*p`, so adding that big sum to our loss is exactly the same as doing:\n",
"\n",
"``` python\n",
"weight.grad += wd * 2 * weight\n",
"parameters.grad += wd * 2 * parameters\n",
"```\n",
"\n",
"In practice, since `wd` is a parameter that we choose, we can just make it twice as big, so we don't even need the `*2` in the above equation. To use weight decay in fastai, just pass `wd` in your call to fit:"
Expand Down Expand Up @@ -1354,7 +1354,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Creating our own Embedding module"
"### Creating Our Own Embedding Module"
]
},
{
Expand Down Expand Up @@ -1601,7 +1601,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Interpreting embeddings and biases"
"## Interpreting Embeddings and Biases"
]
},
{
Expand Down Expand Up @@ -1903,7 +1903,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Embedding distance"
"### Embedding Distance"
]
},
{
Expand Down Expand Up @@ -1950,7 +1950,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Boot strapping a collaborative filtering model"
"## Boot Strapping a Collaborative Filtering Model"
]
},
{
Expand Down Expand Up @@ -1986,7 +1986,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Deep learning for collaborative filtering"
"## Deep Learning for Collaborative Filtering"
]
},
{
Expand Down Expand Up @@ -2238,7 +2238,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Sidebar: kwargs and delegates"
"### Sidebar: Kwargs and Delegates"
]
},
{
Expand Down Expand Up @@ -2330,7 +2330,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Further research\n",
"### Further Research\n",
"\n",
"1. Take a look at all the differences between the `Embedding` version of `DotProductBias` and the `create_params` version, and try to understand why each of those changes is required. If you're not sure, try reverting each change, to see what happens. (NB: even the type of brackets used in `forward` has changed!)\n",
"1. Find three other areas where collaborative filtering is being used, and find out what pros and cons of this approach in those areas.\n",
Expand Down
60 changes: 30 additions & 30 deletions 09_tabular.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"hide_input": true
"hide_input": false
},
"outputs": [
{
Expand Down Expand Up @@ -41,7 +41,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tabular modelling deep dive"
"# Tabular Modeling Deep Dive"
]
},
{
Expand All @@ -57,7 +57,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Categorical embeddings"
"## Categorical Embeddings"
]
},
{
Expand Down Expand Up @@ -187,7 +187,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Beyond deep learning"
"## Beyond Deep Learning"
]
},
{
Expand Down Expand Up @@ -239,7 +239,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## The dataset"
"## The Dataset"
]
},
{
Expand Down Expand Up @@ -390,7 +390,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Look at the data"
"### Look at the Data"
]
},
{
Expand Down Expand Up @@ -542,7 +542,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Decision trees"
"## Decision Trees"
]
},
{
Expand Down Expand Up @@ -591,7 +591,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Handling dates"
"### Handling Dates"
]
},
{
Expand Down Expand Up @@ -1405,7 +1405,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Creating the decision tree"
"### Creating the Decision Tree"
]
},
{
Expand Down Expand Up @@ -7418,7 +7418,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Categorical variables"
"### Categorical Variables"
]
},
{
Expand Down Expand Up @@ -7454,7 +7454,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Random forests"
"## Random Forests"
]
},
{
Expand Down Expand Up @@ -7493,7 +7493,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Creating a random forest"
"### Creating a Random Forest"
]
},
{
Expand Down Expand Up @@ -7662,7 +7662,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Out-of-bag error"
"### Out-of-Bag Error"
]
},
{
Expand Down Expand Up @@ -7721,7 +7721,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Model interpretation"
"## Model Interpretation"
]
},
{
Expand All @@ -7743,7 +7743,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Tree variance for prediction confidence"
"### Tree Variance for Prediction Confidence"
]
},
{
Expand Down Expand Up @@ -7840,7 +7840,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Feature importance"
"### Feature Importance"
]
},
{
Expand Down Expand Up @@ -8020,7 +8020,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Removing low-importance variables"
"### Removing Low-Importance Variables"
]
},
{
Expand Down Expand Up @@ -8173,7 +8173,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Removing redundant features"
"### Removing Redundant Features"
]
},
{
Expand Down Expand Up @@ -8396,14 +8396,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Tk add transition"
"Now that we know which variable influence the most our predictions, we can have a look at how they affect the results using partial dependence plots."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Partial dependence"
"### Partial Dependence"
]
},
{
Expand Down Expand Up @@ -8526,7 +8526,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Data leakage"
"### Data Leakage"
]
},
{
Expand Down Expand Up @@ -8570,7 +8570,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Tree interpreter"
"### Tree Interpreter"
]
},
{
Expand Down Expand Up @@ -8716,7 +8716,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Extrapolation and neural networks"
"## Extrapolation and Neural Networks"
]
},
{
Expand All @@ -8730,7 +8730,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### The extrapolation problem"
"### The Extrapolation Problem"
]
},
{
Expand Down Expand Up @@ -8890,7 +8890,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Finding out of domain data"
"### Finding out of Domain Data"
]
},
{
Expand Down Expand Up @@ -9139,7 +9139,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Using a neural network"
"### Using a Neural Network"
]
},
{
Expand Down Expand Up @@ -9560,7 +9560,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Sidebar: fastai's Tabular classes"
"### Sidebar: fastai's Tabular Classes"
]
},
{
Expand Down Expand Up @@ -9700,7 +9700,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Combining embeddings with other methods"
"### Combining Embeddings with Other Methods"
]
},
{
Expand Down Expand Up @@ -9732,7 +9732,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Conclusion: our advice for tabular modeling"
"## Conclusion: Our Advice for Tabular Modeling"
]
},
{
Expand Down Expand Up @@ -9802,7 +9802,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Further research"
"### Further Research"
]
},
{
Expand Down
Loading

0 comments on commit 7abc2c3

Please sign in to comment.