Commit 0d55d2d0 authored by Mark Daoust's avatar Mark Daoust
Browse files

Fix overfitting paragraph.

parent 60618910
......@@ -5,14 +5,7 @@
"colab": {
"name": "linear.ipynb",
"version": "0.3.2",
"views": {},
"default_view": {},
"provenance": [
{
"file_id": "https://github.com/tensorflow/models/blob/master/samples/core/tutorials/estimators/linear.ipynb",
"timestamp": 1531763859998
}
],
"provenance": [],
"private_outputs": true,
"collapsed_sections": [
"MWW1TyjaecRh"
......@@ -40,12 +33,7 @@
"metadata": {
"id": "mOtR1FzCef-u",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -118,12 +106,7 @@
"metadata": {
"id": "NQgONe5ecYvE",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -153,12 +136,7 @@
"metadata": {
"id": "tQzxON782Eby",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -183,12 +161,7 @@
"metadata": {
"id": "tTwQzWcn8aBu",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -211,12 +184,7 @@
"metadata": {
"id": "yVvFyhnkcYvL",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -241,12 +209,7 @@
"metadata": {
"id": "6QilS4-0cYvQ",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -285,12 +248,7 @@
"metadata": {
"id": "DYOkY8boUptJ",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -314,12 +272,7 @@
"metadata": {
"id": "1_3tBaLW4YM4",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -342,12 +295,7 @@
"metadata": {
"id": "py7MarZl5Yh6",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -376,12 +324,7 @@
"metadata": {
"id": "N6Tgye8bcYvX",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -394,12 +337,7 @@
"metadata": {
"id": "6y3mj9zKcYva",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -423,12 +361,7 @@
"metadata": {
"id": "vkn1FNmpcYvb",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -474,12 +407,7 @@
"metadata": {
"id": "N7zNJflKcYvg",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -511,12 +439,7 @@
"metadata": {
"id": "ygaKuikecYvi",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -548,12 +471,7 @@
"metadata": {
"id": "vUTeXaEUcYvn",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -577,12 +495,7 @@
"metadata": {
"id": "Mv3as_CEcYvu",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -612,12 +525,7 @@
"metadata": {
"id": "wnQdpEcVcYv0",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -671,12 +579,7 @@
"metadata": {
"id": "ZX0r2T5OcYv6",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -699,12 +602,7 @@
"metadata": {
"id": "kREtIPfwcYv_",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -727,12 +625,7 @@
"metadata": {
"id": "9R5eSJ1pcYwE",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -761,12 +654,7 @@
"metadata": {
"id": "uqPbUqlxcYwJ",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -796,12 +684,7 @@
"metadata": {
"id": "XN8k5S95cYwR",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -836,12 +719,7 @@
"metadata": {
"id": "0IjqSi9tcYwV",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -872,12 +750,7 @@
"metadata": {
"id": "kI43CYlncYwY",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -900,12 +773,7 @@
"metadata": {
"id": "8pSBaliCcYwb",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -929,12 +797,7 @@
"metadata": {
"id": "dCvQNv36cYwe",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -958,12 +821,7 @@
"metadata": {
"id": "0Y16peWacYwh",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -988,12 +846,7 @@
"metadata": {
"id": "q_ryRglmcYwk",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1020,12 +873,7 @@
"metadata": {
"id": "0Z5eUrd_cYwo",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1065,12 +913,7 @@
"metadata": {
"id": "_i_MLoo9cYws",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1118,12 +961,7 @@
"metadata": {
"id": "KT4pjD9AcYww",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1149,12 +987,7 @@
"metadata": {
"id": "Lr40vm3qcYwy",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1181,12 +1014,7 @@
"metadata": {
"id": "IAPhPzXscYw1",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1210,12 +1038,7 @@
"metadata": {
"id": "y8UaBld9cYw7",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1260,12 +1083,7 @@
"metadata": {
"id": "Klmf3OxpcYw-",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1309,12 +1127,7 @@
"metadata": {
"id": "ZlrIBuoecYxD",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1342,12 +1155,7 @@
"metadata": {
"id": "L9nVJEO8cYxI",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1379,12 +1187,7 @@
"metadata": {
"id": "8R5bz5CxcYxL",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1431,13 +1234,7 @@
"source": [
"## Adding Regularization to Prevent Overfitting\n",
"\n",
"Regularization is a technique used to avoid **overfitting**. Overfitting happens\n",
"when your model does well on the data it is trained on, but worse on test data\n",
"that the model has not seen before, such as live traffic. Overfitting generally\n",
"occurs when a model is excessively complex, such as having too many parameters\n",
"relative to the number of observed training data. Regularization allows for you\n",
"to control your model's complexity and makes the model more generalizable to\n",
"unseen data.\n",
"Regularization is a technique used to avoid overfitting. Overfitting happens when a model performs well on the data it is trained on, but worse on test data that the model has not seen before. Overfitting can occur when a model is excessively complex, such as having too many parameters relative to the number of observed training data. Regularization allows you to control the model's complexity and make the model more generalizable to unseen data.\n",
"\n",
"You can add L1 and L2 regularizations to the model with the following code:"
]
......@@ -1446,12 +1243,7 @@
"metadata": {
"id": "lzMUSBQ03hHx",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1476,12 +1268,7 @@
"metadata": {
"id": "ofmPL212JIy2",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1509,19 +1296,14 @@
},
"cell_type": "markdown",
"source": [
"These regularized models don't perform very differently base model. Let look ar the models' weight distributions to better see the effect of the regularization:"
"These regularized models don't perform very differently than the base model. Let's look ar the models' weight distributions to better see the effect of the regularization:"
]
},
{
"metadata": {
"id": "Wb6093N04XlS",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1557,12 +1339,7 @@
"metadata": {
"id": "rM3agZe3MT3D",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1589,12 +1366,7 @@
"metadata": {
"id": "IdFK7wWa5_0K",
"colab_type": "code",
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
}
"colab": {}
},
"cell_type": "code",
"source": [
......@@ -1628,4 +1400,4 @@
]
}
]
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment