From 3226acff4be6f766eee1b2c3a4d91fe7ddf88073 Mon Sep 17 00:00:00 2001 From: mrdbourke Date: Tue, 24 Sep 2024 17:35:55 +1000 Subject: [PATCH] update titles and add Google Colab link --- ...-to-end-heart-disease-classification.ipynb | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/section-3-structured-data-projects/end-to-end-heart-disease-classification.ipynb b/section-3-structured-data-projects/end-to-end-heart-disease-classification.ipynb index 6acec808c..72c14dd1f 100644 --- a/section-3-structured-data-projects/end-to-end-heart-disease-classification.ipynb +++ b/section-3-structured-data-projects/end-to-end-heart-disease-classification.ipynb @@ -1,5 +1,16 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + " \"Open\n", + "\n", + "\n", + "[View source code](https://github.com/mrdbourke/zero-to-mastery-ml/blob/master/section-3-structured-data-projects/end-to-end-heart-disease-classification.ipynb) | [Read notebook in online book format](https://dev.mrdbourke.com/zero-to-mastery-ml/end-to-end-heart-disease-classification/)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -3314,7 +3325,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Tune KNeighborsClassifier (K-Nearest Neighbors or KNN) by hand\n", + "### 6.1 Tune KNeighborsClassifier (K-Nearest Neighbors or KNN) by hand\n", "\n", "There are several hyperparameters we can tune for the K-Nearest Neighbors (KNN) algorithm (or [`sklearn.neighbors.KNeighborsClassifier`](https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html)).\n", "\n", @@ -3475,7 +3486,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Tuning models with with [`RandomizedSearchCV`](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.RandomizedSearchCV.html)\n", + "### 6.2 Tuning models with with [`RandomizedSearchCV`](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.RandomizedSearchCV.html)\n", "\n", "Reading the Scikit-Learn documentation for [`LogisticRegression`](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV), we find there's a number of different hyperparameters we can tune.\n", "\n", @@ -3687,7 +3698,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Tuning a model with [`GridSearchCV`](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html)\n", + "### 6.3 Tuning a model with [`GridSearchCV`](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html)\n", "\n", "The difference between `RandomizedSearchCV` and `GridSearchCV` is: \n", "\n", @@ -3787,7 +3798,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Evaluating a classification model, beyond accuracy\n", + "## 7. Evaluating a classification model, beyond accuracy\n", "\n", "Now we've got a tuned model, let's get some of the metrics we discussed before.\n", "\n", @@ -3898,7 +3909,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ROC Curve and AUC Scores\n", + "### 7.1 ROC Curve and AUC Scores\n", "\n", "What's a ROC curve?\n", "\n", @@ -3962,7 +3973,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Creating a confusion matrix \n", + "### 7.2 Creating a confusion matrix \n", "\n", "A confusion matrix is a visual way to show where your model made the right predictions and where it made the wrong predictions (or in other words, got confused).\n", "\n", @@ -4049,7 +4060,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Classification report\n", + "### 7.3 Classification report\n", "\n", "A classification report is a collection of different metrics and other details.\n", "\n", @@ -4368,7 +4379,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Feature importance\n", + "## 8. Feature importance\n", "\n", "Feature importance is another way of asking, \"Which features contribute most to the outcomes of the model?\"\n", "\n", @@ -4694,7 +4705,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## 6. Experimentation\n", + "## 9. Experimentation\n", "\n", "We've completed all the metrics your boss requested!\n", "\n", @@ -4725,7 +4736,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### What next?\n", + "## What next?\n", "\n", "You might be wondering, what happens when the evaluation metric doesn't get hit?\n", "\n",