{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# \ud83d\udcdd Exercise M7.02\n", "\n", "We presented different classification metrics in the previous notebook.\n", "However, we did not use it with a cross-validation. This exercise aims at\n", "practicing and implementing cross-validation.\n", "\n", "We will reuse the blood transfusion dataset." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "blood_transfusion = pd.read_csv(\"../datasets/blood_transfusion.csv\")\n", "data = blood_transfusion.drop(columns=\"Class\")\n", "target = blood_transfusion[\"Class\"]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
Note
\n", "If you want a deeper overview regarding this dataset, you can refer to the\n", "Appendix - Datasets description section at the end of this MOOC.
\n", "Tip
\n", "We catch the exception with a try/except pattern to be able to print it.
\n", "