Skip to content

Commit

Permalink
update exploration 4 to use heatmap
Browse files Browse the repository at this point in the history
  • Loading branch information
AHFXAdam committed Jan 30, 2024
1 parent c45e0e0 commit 4f9ad56
Showing 1 changed file with 21 additions and 72 deletions.
93 changes: 21 additions & 72 deletions notebooks/Exploration_04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "OIyOz1W-kvIR",
"vscode": {
"languageId": "python"
}
"id": "OIyOz1W-kvIR"
},
"outputs": [],
"source": []
Expand All @@ -51,10 +48,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Osg2wpr0ul6R",
"vscode": {
"languageId": "python"
}
"id": "Osg2wpr0ul6R"
},
"outputs": [],
"source": []
Expand All @@ -63,10 +57,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "tPlZ1WmWunXB",
"vscode": {
"languageId": "python"
}
"id": "tPlZ1WmWunXB"
},
"outputs": [],
"source": []
Expand All @@ -86,10 +77,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "NcsmVzKllukC",
"vscode": {
"languageId": "python"
}
"id": "NcsmVzKllukC"
},
"outputs": [],
"source": []
Expand Down Expand Up @@ -143,10 +131,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "JhIKMSFmnWD3",
"vscode": {
"languageId": "python"
}
"id": "JhIKMSFmnWD3"
},
"outputs": [],
"source": [
Expand All @@ -169,10 +154,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "5OiWdSVAnfdV",
"vscode": {
"languageId": "python"
}
"id": "5OiWdSVAnfdV"
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -203,10 +185,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "t2DlWt96ni10",
"vscode": {
"languageId": "python"
}
"id": "t2DlWt96ni10"
},
"outputs": [],
"source": [
Expand All @@ -232,10 +211,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "bycoj7HnyoNi",
"vscode": {
"languageId": "python"
}
"id": "bycoj7HnyoNi"
},
"outputs": [],
"source": []
Expand All @@ -244,10 +220,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Mb7f5WiVnupq",
"vscode": {
"languageId": "python"
}
"id": "Mb7f5WiVnupq"
},
"outputs": [],
"source": []
Expand Down Expand Up @@ -290,10 +263,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "KynXQXBRk-nL",
"vscode": {
"languageId": "python"
}
"id": "KynXQXBRk-nL"
},
"outputs": [],
"source": [
Expand All @@ -306,10 +276,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "PXGAiVEf04Wo",
"vscode": {
"languageId": "python"
}
"id": "PXGAiVEf04Wo"
},
"outputs": [],
"source": [
Expand All @@ -336,10 +303,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "dizfrzOr1I8a",
"vscode": {
"languageId": "python"
}
"id": "dizfrzOr1I8a"
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -383,10 +347,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Y1wzEojqoEn_",
"vscode": {
"languageId": "python"
}
"id": "Y1wzEojqoEn_"
},
"outputs": [],
"source": [
Expand All @@ -398,10 +359,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "v8rNy7hxoNfu",
"vscode": {
"languageId": "python"
}
"id": "v8rNy7hxoNfu"
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -437,10 +395,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "ZndOJI6XoP46",
"vscode": {
"languageId": "python"
}
"id": "ZndOJI6XoP46"
},
"outputs": [],
"source": [
Expand All @@ -466,10 +421,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "oqyBO7NRpjjB",
"vscode": {
"languageId": "python"
}
"id": "oqyBO7NRpjjB"
},
"outputs": [],
"source": [
Expand All @@ -486,9 +438,9 @@
"source": [
"#### Confusion Matrix Plot\n",
"\n",
"It's easier to see the results of the confusion matrix if we plot the results. The easiest way to do this is with the [confusion matrix](https://scikit-learn.org/stable/auto_examples/model_selection/plot_confusion_matrix.html) function. \n",
"It's easier to see the results of the confusion matrix if we plot the results. One way to do this is with Seaborn's [heatmap](https://seaborn.pydata.org/generated/seaborn.heatmap.html) function. \n",
"\n",
"This function works a little bit differently than the others. It takes as parameters your model instance, and the X_test and y_test data frames, and outputs a confusion matrix showing how well the model did in predicting the target values. \n",
"This function works a little bit differently than the others. It takes as parameters your model instance, and then options for making the chart display the way you want, and outputs a confusion matrix showing how well the model did in predicting the target values. \n",
"\n",
"You'll notice that in many cases (including this one), the numbers in the confusion matrix will be the same as the results you see from the confusion_matrix() function above, but the plot makes it easier to interpret the results.\n",
"\n",
Expand All @@ -499,15 +451,12 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "6CuFoRyHp6fu",
"vscode": {
"languageId": "python"
}
"id": "6CuFoRyHp6fu"
},
"outputs": [],
"source": [
"# Import the plot_confusion_matrix function and use it to plot the confusion\n",
"# matrix for the test data.\n"
"# Create a Seaborn heatmap\n",
"\n"
]
},
{
Expand Down

0 comments on commit 4f9ad56

Please sign in to comment.