Add some section headers

This commit is contained in:
Aurélien Geron
2021-10-03 00:14:44 +13:00
parent 2bd68d6348
commit 6b821335c0
3 changed files with 239 additions and 26 deletions

View File

@@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**Chapter 4 Training Linear Models**"
"**Chapter 4 Training Models**"
]
},
{
@@ -89,7 +89,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Linear regression using the Normal Equation"
"# Linear Regression"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## The Normal Equation"
]
},
{
@@ -243,7 +250,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Linear regression using batch gradient descent"
"# Gradient Descent\n",
"## Batch Gradient Descent"
]
},
{
@@ -330,7 +338,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Stochastic Gradient Descent"
"## Stochastic Gradient Descent"
]
},
{
@@ -416,7 +424,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Mini-batch gradient descent"
"## Mini-batch gradient descent"
]
},
{
@@ -494,7 +502,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Polynomial regression"
"# Polynomial Regression"
]
},
{
@@ -616,6 +624,13 @@
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Learning Curves"
]
},
{
"cell_type": "code",
"execution_count": 35,
@@ -678,7 +693,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Regularized models"
"# Regularized Linear Models"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ridge Regression"
]
},
{
@@ -772,6 +794,13 @@
"sgd_reg.predict([[1.5]])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lasso Regression"
]
},
{
"cell_type": "code",
"execution_count": 43,
@@ -803,6 +832,13 @@
"lasso_reg.predict([[1.5]])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Elastic Net"
]
},
{
"cell_type": "code",
"execution_count": 45,
@@ -815,6 +851,13 @@
"elastic_net.predict([[1.5]])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Early Stopping"
]
},
{
"cell_type": "code",
"execution_count": 46,
@@ -829,13 +872,6 @@
"X_train, X_val, y_train, y_val = train_test_split(X[:50], y[:50].ravel(), test_size=0.5, random_state=10)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Early stopping example:"
]
},
{
"cell_type": "code",
"execution_count": 47,
@@ -1029,7 +1065,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Logistic regression"
"# Logistic Regression"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Decision Boundaries"
]
},
{
@@ -1166,6 +1209,13 @@
"log_reg.predict([[1.7], [1.5]])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Softmax Regression"
]
},
{
"cell_type": "code",
"execution_count": 62,