diff --git a/02_activities/assignments/assignment_1.ipynb b/02_activities/assignments/assignment_1.ipynb index 828092657..f49c0d420 100644 --- a/02_activities/assignments/assignment_1.ipynb +++ b/02_activities/assignments/assignment_1.ipynb @@ -34,7 +34,106 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, + "id": "05336b75", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting pandas\n", + " Downloading pandas-2.3.0-cp312-cp312-win_amd64.whl.metadata (19 kB)\n", + "Requirement already satisfied: numpy in c:\\users\\hashi\\miniconda3\\lib\\site-packages (2.3.0)\n", + "Collecting matplotlib\n", + " Downloading matplotlib-3.10.3-cp312-cp312-win_amd64.whl.metadata (11 kB)\n", + "Collecting scikit-learn\n", + " Downloading scikit_learn-1.7.0-cp312-cp312-win_amd64.whl.metadata (14 kB)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in c:\\users\\hashi\\miniconda3\\lib\\site-packages (from pandas) (2.9.0.post0)\n", + "Collecting pytz>=2020.1 (from pandas)\n", + " Downloading pytz-2025.2-py2.py3-none-any.whl.metadata (22 kB)\n", + "Collecting tzdata>=2022.7 (from pandas)\n", + " Downloading tzdata-2025.2-py2.py3-none-any.whl.metadata (1.4 kB)\n", + "Collecting contourpy>=1.0.1 (from matplotlib)\n", + " Downloading contourpy-1.3.2-cp312-cp312-win_amd64.whl.metadata (5.5 kB)\n", + "Collecting cycler>=0.10 (from matplotlib)\n", + " Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)\n", + "Collecting fonttools>=4.22.0 (from matplotlib)\n", + " Downloading fonttools-4.58.4-cp312-cp312-win_amd64.whl.metadata (108 kB)\n", + "Collecting kiwisolver>=1.3.1 (from matplotlib)\n", + " Downloading kiwisolver-1.4.8-cp312-cp312-win_amd64.whl.metadata (6.3 kB)\n", + "Requirement already satisfied: packaging>=20.0 in c:\\users\\hashi\\miniconda3\\lib\\site-packages (from matplotlib) (24.2)\n", + "Collecting pillow>=8 (from matplotlib)\n", + " Downloading pillow-11.2.1-cp312-cp312-win_amd64.whl.metadata (9.1 kB)\n", + "Collecting pyparsing>=2.3.1 (from matplotlib)\n", + " Downloading pyparsing-3.2.3-py3-none-any.whl.metadata (5.0 kB)\n", + "Collecting scipy>=1.8.0 (from scikit-learn)\n", + " Downloading scipy-1.15.3-cp312-cp312-win_amd64.whl.metadata (60 kB)\n", + "Collecting joblib>=1.2.0 (from scikit-learn)\n", + " Downloading joblib-1.5.1-py3-none-any.whl.metadata (5.6 kB)\n", + "Collecting threadpoolctl>=3.1.0 (from scikit-learn)\n", + " Downloading threadpoolctl-3.6.0-py3-none-any.whl.metadata (13 kB)\n", + "Requirement already satisfied: six>=1.5 in c:\\users\\hashi\\miniconda3\\lib\\site-packages (from python-dateutil>=2.8.2->pandas) (1.17.0)\n", + "Downloading pandas-2.3.0-cp312-cp312-win_amd64.whl (11.0 MB)\n", + " ---------------------------------------- 0.0/11.0 MB ? eta -:--:--\n", + " -------- ------------------------------- 2.4/11.0 MB 15.0 MB/s eta 0:00:01\n", + " -------------------- ------------------- 5.5/11.0 MB 14.6 MB/s eta 0:00:01\n", + " ------------------------------ --------- 8.4/11.0 MB 14.5 MB/s eta 0:00:01\n", + " ---------------------------------------- 11.0/11.0 MB 13.7 MB/s eta 0:00:00\n", + "Downloading matplotlib-3.10.3-cp312-cp312-win_amd64.whl (8.1 MB)\n", + " ---------------------------------------- 0.0/8.1 MB ? eta -:--:--\n", + " -------------- ------------------------- 2.9/8.1 MB 12.9 MB/s eta 0:00:01\n", + " ----------------------------- ---------- 6.0/8.1 MB 14.2 MB/s eta 0:00:01\n", + " ---------------------------------------- 8.1/8.1 MB 13.5 MB/s eta 0:00:00\n", + "Downloading scikit_learn-1.7.0-cp312-cp312-win_amd64.whl (10.7 MB)\n", + " ---------------------------------------- 0.0/10.7 MB ? eta -:--:--\n", + " ---------- ----------------------------- 2.9/10.7 MB 14.0 MB/s eta 0:00:01\n", + " ---------------------- ----------------- 6.0/10.7 MB 14.8 MB/s eta 0:00:01\n", + " --------------------------------- ------ 8.9/10.7 MB 14.2 MB/s eta 0:00:01\n", + " ---------------------------------------- 10.7/10.7 MB 13.6 MB/s eta 0:00:00\n", + "Downloading contourpy-1.3.2-cp312-cp312-win_amd64.whl (223 kB)\n", + "Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)\n", + "Downloading fonttools-4.58.4-cp312-cp312-win_amd64.whl (2.2 MB)\n", + " ---------------------------------------- 0.0/2.2 MB ? eta -:--:--\n", + " ---------------------------------------- 2.2/2.2 MB 14.0 MB/s eta 0:00:00\n", + "Downloading joblib-1.5.1-py3-none-any.whl (307 kB)\n", + "Downloading kiwisolver-1.4.8-cp312-cp312-win_amd64.whl (71 kB)\n", + "Downloading pillow-11.2.1-cp312-cp312-win_amd64.whl (2.7 MB)\n", + " ---------------------------------------- 0.0/2.7 MB ? eta -:--:--\n", + " ---------------------------------------- 2.7/2.7 MB 14.0 MB/s eta 0:00:00\n", + "Downloading pyparsing-3.2.3-py3-none-any.whl (111 kB)\n", + "Downloading pytz-2025.2-py2.py3-none-any.whl (509 kB)\n", + "Downloading scipy-1.15.3-cp312-cp312-win_amd64.whl (41.0 MB)\n", + " ---------------------------------------- 0.0/41.0 MB ? eta -:--:--\n", + " -- ------------------------------------- 2.9/41.0 MB 13.9 MB/s eta 0:00:03\n", + " ----- ---------------------------------- 6.0/41.0 MB 14.2 MB/s eta 0:00:03\n", + " -------- ------------------------------- 8.9/41.0 MB 14.2 MB/s eta 0:00:03\n", + " ----------- ---------------------------- 12.1/41.0 MB 14.2 MB/s eta 0:00:03\n", + " -------------- ------------------------- 15.2/41.0 MB 14.3 MB/s eta 0:00:02\n", + " ----------------- ---------------------- 17.8/41.0 MB 14.1 MB/s eta 0:00:02\n", + " -------------------- ------------------- 21.0/41.0 MB 14.1 MB/s eta 0:00:02\n", + " ----------------------- ---------------- 23.9/41.0 MB 14.0 MB/s eta 0:00:02\n", + " -------------------------- ------------- 26.7/41.0 MB 14.1 MB/s eta 0:00:02\n", + " ----------------------------- ---------- 29.9/41.0 MB 14.1 MB/s eta 0:00:01\n", + " -------------------------------- ------- 33.0/41.0 MB 14.1 MB/s eta 0:00:01\n", + " ----------------------------------- ---- 36.2/41.0 MB 14.2 MB/s eta 0:00:01\n", + " -------------------------------------- - 39.1/41.0 MB 14.1 MB/s eta 0:00:01\n", + " --------------------------------------- 40.9/41.0 MB 14.1 MB/s eta 0:00:01\n", + " ---------------------------------------- 41.0/41.0 MB 13.6 MB/s eta 0:00:00\n", + "Downloading threadpoolctl-3.6.0-py3-none-any.whl (18 kB)\n", + "Downloading tzdata-2025.2-py2.py3-none-any.whl (347 kB)\n", + "Installing collected packages: pytz, tzdata, threadpoolctl, scipy, pyparsing, pillow, kiwisolver, joblib, fonttools, cycler, contourpy, scikit-learn, pandas, matplotlib\n", + "Successfully installed contourpy-1.3.2 cycler-0.12.1 fonttools-4.58.4 joblib-1.5.1 kiwisolver-1.4.8 matplotlib-3.10.3 pandas-2.3.0 pillow-11.2.1 pyparsing-3.2.3 pytz-2025.2 scikit-learn-1.7.0 scipy-1.15.3 threadpoolctl-3.6.0 tzdata-2025.2\n" + ] + } + ], + "source": [ + "!pip install pandas numpy matplotlib scikit-learn\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, "id": "4a3485d6-ba58-4660-a983-5680821c5719", "metadata": {}, "outputs": [], @@ -57,9 +156,295 @@ { "cell_type": "code", "execution_count": null, - "id": "a431d282-f9ca-4d5d-8912-71ffc9d8ea19", + "id": "b4835719", "metadata": {}, "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "a431d282-f9ca-4d5d-8912-71ffc9d8ea19", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
| \n", + " | alcohol | \n", + "malic_acid | \n", + "ash | \n", + "alcalinity_of_ash | \n", + "magnesium | \n", + "total_phenols | \n", + "flavanoids | \n", + "nonflavanoid_phenols | \n", + "proanthocyanins | \n", + "color_intensity | \n", + "hue | \n", + "od280/od315_of_diluted_wines | \n", + "proline | \n", + "class | \n", + "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", + "14.23 | \n", + "1.71 | \n", + "2.43 | \n", + "15.6 | \n", + "127.0 | \n", + "2.80 | \n", + "3.06 | \n", + "0.28 | \n", + "2.29 | \n", + "5.64 | \n", + "1.04 | \n", + "3.92 | \n", + "1065.0 | \n", + "0 | \n", + "
| 1 | \n", + "13.20 | \n", + "1.78 | \n", + "2.14 | \n", + "11.2 | \n", + "100.0 | \n", + "2.65 | \n", + "2.76 | \n", + "0.26 | \n", + "1.28 | \n", + "4.38 | \n", + "1.05 | \n", + "3.40 | \n", + "1050.0 | \n", + "0 | \n", + "
| 2 | \n", + "13.16 | \n", + "2.36 | \n", + "2.67 | \n", + "18.6 | \n", + "101.0 | \n", + "2.80 | \n", + "3.24 | \n", + "0.30 | \n", + "2.81 | \n", + "5.68 | \n", + "1.03 | \n", + "3.17 | \n", + "1185.0 | \n", + "0 | \n", + "
| 3 | \n", + "14.37 | \n", + "1.95 | \n", + "2.50 | \n", + "16.8 | \n", + "113.0 | \n", + "3.85 | \n", + "3.49 | \n", + "0.24 | \n", + "2.18 | \n", + "7.80 | \n", + "0.86 | \n", + "3.45 | \n", + "1480.0 | \n", + "0 | \n", + "
| 4 | \n", + "13.24 | \n", + "2.59 | \n", + "2.87 | \n", + "21.0 | \n", + "118.0 | \n", + "2.80 | \n", + "2.69 | \n", + "0.39 | \n", + "1.82 | \n", + "4.32 | \n", + "1.04 | \n", + "2.93 | \n", + "735.0 | \n", + "0 | \n", + "
| ... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
| 173 | \n", + "13.71 | \n", + "5.65 | \n", + "2.45 | \n", + "20.5 | \n", + "95.0 | \n", + "1.68 | \n", + "0.61 | \n", + "0.52 | \n", + "1.06 | \n", + "7.70 | \n", + "0.64 | \n", + "1.74 | \n", + "740.0 | \n", + "2 | \n", + "
| 174 | \n", + "13.40 | \n", + "3.91 | \n", + "2.48 | \n", + "23.0 | \n", + "102.0 | \n", + "1.80 | \n", + "0.75 | \n", + "0.43 | \n", + "1.41 | \n", + "7.30 | \n", + "0.70 | \n", + "1.56 | \n", + "750.0 | \n", + "2 | \n", + "
| 175 | \n", + "13.27 | \n", + "4.28 | \n", + "2.26 | \n", + "20.0 | \n", + "120.0 | \n", + "1.59 | \n", + "0.69 | \n", + "0.43 | \n", + "1.35 | \n", + "10.20 | \n", + "0.59 | \n", + "1.56 | \n", + "835.0 | \n", + "2 | \n", + "
| 176 | \n", + "13.17 | \n", + "2.59 | \n", + "2.37 | \n", + "20.0 | \n", + "120.0 | \n", + "1.65 | \n", + "0.68 | \n", + "0.53 | \n", + "1.46 | \n", + "9.30 | \n", + "0.60 | \n", + "1.62 | \n", + "840.0 | \n", + "2 | \n", + "
| 177 | \n", + "14.13 | \n", + "4.10 | \n", + "2.74 | \n", + "24.5 | \n", + "96.0 | \n", + "2.05 | \n", + "0.76 | \n", + "0.56 | \n", + "1.35 | \n", + "9.20 | \n", + "0.61 | \n", + "1.60 | \n", + "560.0 | \n", + "2 | \n", + "
178 rows × 14 columns
\n", + "