From 5cad133b1906721a23735f75f90c5e1387d9c181 Mon Sep 17 00:00:00 2001 From: juliagallucci <78810440+juliagallucci@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:05:18 -0400 Subject: [PATCH 1/4] Add files via upload --- .../live_code/live-code-4-15-2026.ipynb | 5327 +++++++++++++++++ 1 file changed, 5327 insertions(+) create mode 100644 04_this_cohort/live_code/live-code-4-15-2026.ipynb diff --git a/04_this_cohort/live_code/live-code-4-15-2026.ipynb b/04_this_cohort/live_code/live-code-4-15-2026.ipynb new file mode 100644 index 000000000..3ce7afd2f --- /dev/null +++ b/04_this_cohort/live_code/live-code-4-15-2026.ipynb @@ -0,0 +1,5327 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "from sklearn.preprocessing import StandardScaler\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.neighbors import KNeighborsClassifier\n", + "from sklearn.metrics import recall_score, precision_score\n", + "from sklearn.model_selection import cross_validate\n", + "from sklearn.model_selection import GridSearchCV" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
iddiagnosisradius_meantexture_meanperimeter_meanarea_meansmoothness_meancompactness_meanconcavity_meanconcave points_mean...radius_worsttexture_worstperimeter_worstarea_worstsmoothness_worstcompactness_worstconcavity_worstconcave points_worstsymmetry_worstfractal_dimension_worst
0842302M17.9910.38122.801001.00.118400.277600.300100.14710...25.38017.33184.602019.00.162200.665600.71190.26540.46010.11890
1842517M20.5717.77132.901326.00.084740.078640.086900.07017...24.99023.41158.801956.00.123800.186600.24160.18600.27500.08902
284300903M19.6921.25130.001203.00.109600.159900.197400.12790...23.57025.53152.501709.00.144400.424500.45040.24300.36130.08758
384348301M11.4220.3877.58386.10.142500.283900.241400.10520...14.91026.5098.87567.70.209800.866300.68690.25750.66380.17300
484358402M20.2914.34135.101297.00.100300.132800.198000.10430...22.54016.67152.201575.00.137400.205000.40000.16250.23640.07678
..................................................................
564926424M21.5622.39142.001479.00.111000.115900.243900.13890...25.45026.40166.102027.00.141000.211300.41070.22160.20600.07115
565926682M20.1328.25131.201261.00.097800.103400.144000.09791...23.69038.25155.001731.00.116600.192200.32150.16280.25720.06637
566926954M16.6028.08108.30858.10.084550.102300.092510.05302...18.98034.12126.701124.00.113900.309400.34030.14180.22180.07820
567927241M20.6029.33140.101265.00.117800.277000.351400.15200...25.74039.42184.601821.00.165000.868100.93870.26500.40870.12400
56892751B7.7624.5447.92181.00.052630.043620.000000.00000...9.45630.3759.16268.60.089960.064440.00000.00000.28710.07039
\n", + "

569 rows × 32 columns

\n", + "
" + ], + "text/plain": [ + " id diagnosis radius_mean texture_mean perimeter_mean area_mean \\\n", + "0 842302 M 17.99 10.38 122.80 1001.0 \n", + "1 842517 M 20.57 17.77 132.90 1326.0 \n", + "2 84300903 M 19.69 21.25 130.00 1203.0 \n", + "3 84348301 M 11.42 20.38 77.58 386.1 \n", + "4 84358402 M 20.29 14.34 135.10 1297.0 \n", + ".. ... ... ... ... ... ... \n", + "564 926424 M 21.56 22.39 142.00 1479.0 \n", + "565 926682 M 20.13 28.25 131.20 1261.0 \n", + "566 926954 M 16.60 28.08 108.30 858.1 \n", + "567 927241 M 20.60 29.33 140.10 1265.0 \n", + "568 92751 B 7.76 24.54 47.92 181.0 \n", + "\n", + " smoothness_mean compactness_mean concavity_mean concave points_mean \\\n", + "0 0.11840 0.27760 0.30010 0.14710 \n", + "1 0.08474 0.07864 0.08690 0.07017 \n", + "2 0.10960 0.15990 0.19740 0.12790 \n", + "3 0.14250 0.28390 0.24140 0.10520 \n", + "4 0.10030 0.13280 0.19800 0.10430 \n", + ".. ... ... ... ... \n", + "564 0.11100 0.11590 0.24390 0.13890 \n", + "565 0.09780 0.10340 0.14400 0.09791 \n", + "566 0.08455 0.10230 0.09251 0.05302 \n", + "567 0.11780 0.27700 0.35140 0.15200 \n", + "568 0.05263 0.04362 0.00000 0.00000 \n", + "\n", + " ... radius_worst texture_worst perimeter_worst area_worst \\\n", + "0 ... 25.380 17.33 184.60 2019.0 \n", + "1 ... 24.990 23.41 158.80 1956.0 \n", + "2 ... 23.570 25.53 152.50 1709.0 \n", + "3 ... 14.910 26.50 98.87 567.7 \n", + "4 ... 22.540 16.67 152.20 1575.0 \n", + ".. ... ... ... ... ... \n", + "564 ... 25.450 26.40 166.10 2027.0 \n", + "565 ... 23.690 38.25 155.00 1731.0 \n", + "566 ... 18.980 34.12 126.70 1124.0 \n", + "567 ... 25.740 39.42 184.60 1821.0 \n", + "568 ... 9.456 30.37 59.16 268.6 \n", + "\n", + " smoothness_worst compactness_worst concavity_worst \\\n", + "0 0.16220 0.66560 0.7119 \n", + "1 0.12380 0.18660 0.2416 \n", + "2 0.14440 0.42450 0.4504 \n", + "3 0.20980 0.86630 0.6869 \n", + "4 0.13740 0.20500 0.4000 \n", + ".. ... ... ... \n", + "564 0.14100 0.21130 0.4107 \n", + "565 0.11660 0.19220 0.3215 \n", + "566 0.11390 0.30940 0.3403 \n", + "567 0.16500 0.86810 0.9387 \n", + "568 0.08996 0.06444 0.0000 \n", + "\n", + " concave points_worst symmetry_worst fractal_dimension_worst \n", + "0 0.2654 0.4601 0.11890 \n", + "1 0.1860 0.2750 0.08902 \n", + "2 0.2430 0.3613 0.08758 \n", + "3 0.2575 0.6638 0.17300 \n", + "4 0.1625 0.2364 0.07678 \n", + ".. ... ... ... \n", + "564 0.2216 0.2060 0.07115 \n", + "565 0.1628 0.2572 0.06637 \n", + "566 0.1418 0.2218 0.07820 \n", + "567 0.2650 0.4087 0.12400 \n", + "568 0.0000 0.2871 0.07039 \n", + "\n", + "[569 rows x 32 columns]" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cancer = pd.read_csv(\"dataset/wdbc.csv\")\n", + "cancer" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
iddiagnosisradius_meantexture_meanperimeter_meanarea_meansmoothness_meancompactness_meanconcavity_meanconcave points_mean...radius_worsttexture_worstperimeter_worstarea_worstsmoothness_worstcompactness_worstconcavity_worstconcave points_worstsymmetry_worstfractal_dimension_worst
0842302Malignant17.9910.38122.801001.00.118400.277600.300100.14710...25.38017.33184.602019.00.162200.665600.71190.26540.46010.11890
1842517Malignant20.5717.77132.901326.00.084740.078640.086900.07017...24.99023.41158.801956.00.123800.186600.24160.18600.27500.08902
284300903Malignant19.6921.25130.001203.00.109600.159900.197400.12790...23.57025.53152.501709.00.144400.424500.45040.24300.36130.08758
384348301Malignant11.4220.3877.58386.10.142500.283900.241400.10520...14.91026.5098.87567.70.209800.866300.68690.25750.66380.17300
484358402Malignant20.2914.34135.101297.00.100300.132800.198000.10430...22.54016.67152.201575.00.137400.205000.40000.16250.23640.07678
..................................................................
564926424Malignant21.5622.39142.001479.00.111000.115900.243900.13890...25.45026.40166.102027.00.141000.211300.41070.22160.20600.07115
565926682Malignant20.1328.25131.201261.00.097800.103400.144000.09791...23.69038.25155.001731.00.116600.192200.32150.16280.25720.06637
566926954Malignant16.6028.08108.30858.10.084550.102300.092510.05302...18.98034.12126.701124.00.113900.309400.34030.14180.22180.07820
567927241Malignant20.6029.33140.101265.00.117800.277000.351400.15200...25.74039.42184.601821.00.165000.868100.93870.26500.40870.12400
56892751Benign7.7624.5447.92181.00.052630.043620.000000.00000...9.45630.3759.16268.60.089960.064440.00000.00000.28710.07039
\n", + "

569 rows × 32 columns

\n", + "
" + ], + "text/plain": [ + " id diagnosis radius_mean texture_mean perimeter_mean \\\n", + "0 842302 Malignant 17.99 10.38 122.80 \n", + "1 842517 Malignant 20.57 17.77 132.90 \n", + "2 84300903 Malignant 19.69 21.25 130.00 \n", + "3 84348301 Malignant 11.42 20.38 77.58 \n", + "4 84358402 Malignant 20.29 14.34 135.10 \n", + ".. ... ... ... ... ... \n", + "564 926424 Malignant 21.56 22.39 142.00 \n", + "565 926682 Malignant 20.13 28.25 131.20 \n", + "566 926954 Malignant 16.60 28.08 108.30 \n", + "567 927241 Malignant 20.60 29.33 140.10 \n", + "568 92751 Benign 7.76 24.54 47.92 \n", + "\n", + " area_mean smoothness_mean compactness_mean concavity_mean \\\n", + "0 1001.0 0.11840 0.27760 0.30010 \n", + "1 1326.0 0.08474 0.07864 0.08690 \n", + "2 1203.0 0.10960 0.15990 0.19740 \n", + "3 386.1 0.14250 0.28390 0.24140 \n", + "4 1297.0 0.10030 0.13280 0.19800 \n", + ".. ... ... ... ... \n", + "564 1479.0 0.11100 0.11590 0.24390 \n", + "565 1261.0 0.09780 0.10340 0.14400 \n", + "566 858.1 0.08455 0.10230 0.09251 \n", + "567 1265.0 0.11780 0.27700 0.35140 \n", + "568 181.0 0.05263 0.04362 0.00000 \n", + "\n", + " concave points_mean ... radius_worst texture_worst perimeter_worst \\\n", + "0 0.14710 ... 25.380 17.33 184.60 \n", + "1 0.07017 ... 24.990 23.41 158.80 \n", + "2 0.12790 ... 23.570 25.53 152.50 \n", + "3 0.10520 ... 14.910 26.50 98.87 \n", + "4 0.10430 ... 22.540 16.67 152.20 \n", + ".. ... ... ... ... ... \n", + "564 0.13890 ... 25.450 26.40 166.10 \n", + "565 0.09791 ... 23.690 38.25 155.00 \n", + "566 0.05302 ... 18.980 34.12 126.70 \n", + "567 0.15200 ... 25.740 39.42 184.60 \n", + "568 0.00000 ... 9.456 30.37 59.16 \n", + "\n", + " area_worst smoothness_worst compactness_worst concavity_worst \\\n", + "0 2019.0 0.16220 0.66560 0.7119 \n", + "1 1956.0 0.12380 0.18660 0.2416 \n", + "2 1709.0 0.14440 0.42450 0.4504 \n", + "3 567.7 0.20980 0.86630 0.6869 \n", + "4 1575.0 0.13740 0.20500 0.4000 \n", + ".. ... ... ... ... \n", + "564 2027.0 0.14100 0.21130 0.4107 \n", + "565 1731.0 0.11660 0.19220 0.3215 \n", + "566 1124.0 0.11390 0.30940 0.3403 \n", + "567 1821.0 0.16500 0.86810 0.9387 \n", + "568 268.6 0.08996 0.06444 0.0000 \n", + "\n", + " concave points_worst symmetry_worst fractal_dimension_worst \n", + "0 0.2654 0.4601 0.11890 \n", + "1 0.1860 0.2750 0.08902 \n", + "2 0.2430 0.3613 0.08758 \n", + "3 0.2575 0.6638 0.17300 \n", + "4 0.1625 0.2364 0.07678 \n", + ".. ... ... ... \n", + "564 0.2216 0.2060 0.07115 \n", + "565 0.1628 0.2572 0.06637 \n", + "566 0.1418 0.2218 0.07820 \n", + "567 0.2650 0.4087 0.12400 \n", + "568 0.0000 0.2871 0.07039 \n", + "\n", + "[569 rows x 32 columns]" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cancer[\"diagnosis\"] = cancer[\"diagnosis\"].replace({\n", + " \"M\": \"Malignant\",\n", + " \"B\" : \"Benign\"\n", + "})\n", + "cancer" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "standardized_cancer = cancer.copy() #copy of dataset" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['area_mean', 'area_se', 'area_worst', 'compactness_mean',\n", + " 'compactness_se', 'compactness_worst', 'concave points_mean',\n", + " 'concave points_se', 'concave points_worst', 'concavity_mean',\n", + " 'concavity_se', 'concavity_worst', 'fractal_dimension_mean',\n", + " 'fractal_dimension_se', 'fractal_dimension_worst', 'perimeter_mean',\n", + " 'perimeter_se', 'perimeter_worst', 'radius_mean', 'radius_se',\n", + " 'radius_worst', 'smoothness_mean', 'smoothness_se', 'smoothness_worst',\n", + " 'symmetry_mean', 'symmetry_se', 'symmetry_worst', 'texture_mean',\n", + " 'texture_se', 'texture_worst'],\n", + " dtype='object')" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "columns_to_exclude = ['id','diagnosis']\n", + "columns_to_scale = standardized_cancer.columns.difference(columns_to_exclude)\n", + "columns_to_scale" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
iddiagnosisradius_meantexture_meanperimeter_meanarea_meansmoothness_meancompactness_meanconcavity_meanconcave points_mean...radius_worsttexture_worstperimeter_worstarea_worstsmoothness_worstcompactness_worstconcavity_worstconcave points_worstsymmetry_worstfractal_dimension_worst
0842302Malignant1.097064-2.0733351.2699340.9843751.5684663.2835152.6528742.532475...1.886690-1.3592932.3036012.0012371.3076862.6166652.1095262.2960762.7506221.937015
1842517Malignant1.829821-0.3536321.6859551.908708-0.826962-0.487072-0.0238460.548144...1.805927-0.3692031.5351261.890489-0.375612-0.430444-0.1467491.087084-0.2438900.281190
284300903Malignant1.5798880.4561871.5665031.5588840.9422101.0529261.3634782.037231...1.511870-0.0239741.3474751.4562850.5274071.0829320.8549741.9550001.1522550.201391
384348301Malignant-0.7689090.253732-0.592687-0.7644643.2835533.4029091.9158971.451707...-0.2814640.133984-0.249939-0.5500213.3942753.8933971.9895882.1757866.0460414.935010
484358402Malignant1.750297-1.1518161.7765731.8262290.2803720.5393401.3710111.428493...1.298575-1.4667701.3385391.2207240.220556-0.3133950.6131790.729259-0.868353-0.397100
..................................................................
564926424Malignant2.1109950.7214732.0607862.3438561.0418420.2190601.9472852.320965...1.9011850.1177001.7525632.0153010.378365-0.2733180.6645121.629151-1.360158-0.709091
565926682Malignant1.7048542.0851341.6159311.7238420.102458-0.0178330.6930431.263669...1.5367202.0473991.4219401.494959-0.691230-0.3948200.2365730.733827-0.531855-0.973978
566926954Malignant0.7022842.0455740.6726760.577953-0.840484-0.0386800.0465880.105777...0.5613611.3748540.5790010.427906-0.8095870.3507350.3267670.414069-1.104549-0.318409
567927241Malignant1.8383412.3364571.9825241.7352181.5257673.2721443.2969442.658866...1.9612392.2379262.3036011.6531711.4304273.9048483.1976052.2899851.9190832.219635
56892751Benign-1.8084011.221792-1.814389-1.347789-3.112085-1.150752-1.114873-1.261820...-1.4108930.764190-1.432735-1.075813-1.859019-1.207552-1.305831-1.745063-0.048138-0.751207
\n", + "

569 rows × 32 columns

\n", + "
" + ], + "text/plain": [ + " id diagnosis radius_mean texture_mean perimeter_mean \\\n", + "0 842302 Malignant 1.097064 -2.073335 1.269934 \n", + "1 842517 Malignant 1.829821 -0.353632 1.685955 \n", + "2 84300903 Malignant 1.579888 0.456187 1.566503 \n", + "3 84348301 Malignant -0.768909 0.253732 -0.592687 \n", + "4 84358402 Malignant 1.750297 -1.151816 1.776573 \n", + ".. ... ... ... ... ... \n", + "564 926424 Malignant 2.110995 0.721473 2.060786 \n", + "565 926682 Malignant 1.704854 2.085134 1.615931 \n", + "566 926954 Malignant 0.702284 2.045574 0.672676 \n", + "567 927241 Malignant 1.838341 2.336457 1.982524 \n", + "568 92751 Benign -1.808401 1.221792 -1.814389 \n", + "\n", + " area_mean smoothness_mean compactness_mean concavity_mean \\\n", + "0 0.984375 1.568466 3.283515 2.652874 \n", + "1 1.908708 -0.826962 -0.487072 -0.023846 \n", + "2 1.558884 0.942210 1.052926 1.363478 \n", + "3 -0.764464 3.283553 3.402909 1.915897 \n", + "4 1.826229 0.280372 0.539340 1.371011 \n", + ".. ... ... ... ... \n", + "564 2.343856 1.041842 0.219060 1.947285 \n", + "565 1.723842 0.102458 -0.017833 0.693043 \n", + "566 0.577953 -0.840484 -0.038680 0.046588 \n", + "567 1.735218 1.525767 3.272144 3.296944 \n", + "568 -1.347789 -3.112085 -1.150752 -1.114873 \n", + "\n", + " concave points_mean ... radius_worst texture_worst perimeter_worst \\\n", + "0 2.532475 ... 1.886690 -1.359293 2.303601 \n", + "1 0.548144 ... 1.805927 -0.369203 1.535126 \n", + "2 2.037231 ... 1.511870 -0.023974 1.347475 \n", + "3 1.451707 ... -0.281464 0.133984 -0.249939 \n", + "4 1.428493 ... 1.298575 -1.466770 1.338539 \n", + ".. ... ... ... ... ... \n", + "564 2.320965 ... 1.901185 0.117700 1.752563 \n", + "565 1.263669 ... 1.536720 2.047399 1.421940 \n", + "566 0.105777 ... 0.561361 1.374854 0.579001 \n", + "567 2.658866 ... 1.961239 2.237926 2.303601 \n", + "568 -1.261820 ... -1.410893 0.764190 -1.432735 \n", + "\n", + " area_worst smoothness_worst compactness_worst concavity_worst \\\n", + "0 2.001237 1.307686 2.616665 2.109526 \n", + "1 1.890489 -0.375612 -0.430444 -0.146749 \n", + "2 1.456285 0.527407 1.082932 0.854974 \n", + "3 -0.550021 3.394275 3.893397 1.989588 \n", + "4 1.220724 0.220556 -0.313395 0.613179 \n", + ".. ... ... ... ... \n", + "564 2.015301 0.378365 -0.273318 0.664512 \n", + "565 1.494959 -0.691230 -0.394820 0.236573 \n", + "566 0.427906 -0.809587 0.350735 0.326767 \n", + "567 1.653171 1.430427 3.904848 3.197605 \n", + "568 -1.075813 -1.859019 -1.207552 -1.305831 \n", + "\n", + " concave points_worst symmetry_worst fractal_dimension_worst \n", + "0 2.296076 2.750622 1.937015 \n", + "1 1.087084 -0.243890 0.281190 \n", + "2 1.955000 1.152255 0.201391 \n", + "3 2.175786 6.046041 4.935010 \n", + "4 0.729259 -0.868353 -0.397100 \n", + ".. ... ... ... \n", + "564 1.629151 -1.360158 -0.709091 \n", + "565 0.733827 -0.531855 -0.973978 \n", + "566 0.414069 -1.104549 -0.318409 \n", + "567 2.289985 1.919083 2.219635 \n", + "568 -1.745063 -0.048138 -0.751207 \n", + "\n", + "[569 rows x 32 columns]" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "scaler = StandardScaler() #initialize our scaler\n", + "standardized_cancer[columns_to_scale] = scaler.fit_transform(standardized_cancer[columns_to_scale])\n", + "standardized_cancer" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "#set the seed\n", + "np.random.seed(1)\n", + "\n", + "#split the data\n", + "cancer_train, cancer_test = train_test_split(\n", + " standardized_cancer, train_size = 0.75, shuffle = True, stratify= standardized_cancer[\"diagnosis\"]\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 426 entries, 164 to 284\n", + "Data columns (total 32 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 id 426 non-null int64 \n", + " 1 diagnosis 426 non-null object \n", + " 2 radius_mean 426 non-null float64\n", + " 3 texture_mean 426 non-null float64\n", + " 4 perimeter_mean 426 non-null float64\n", + " 5 area_mean 426 non-null float64\n", + " 6 smoothness_mean 426 non-null float64\n", + " 7 compactness_mean 426 non-null float64\n", + " 8 concavity_mean 426 non-null float64\n", + " 9 concave points_mean 426 non-null float64\n", + " 10 symmetry_mean 426 non-null float64\n", + " 11 fractal_dimension_mean 426 non-null float64\n", + " 12 radius_se 426 non-null float64\n", + " 13 texture_se 426 non-null float64\n", + " 14 perimeter_se 426 non-null float64\n", + " 15 area_se 426 non-null float64\n", + " 16 smoothness_se 426 non-null float64\n", + " 17 compactness_se 426 non-null float64\n", + " 18 concavity_se 426 non-null float64\n", + " 19 concave points_se 426 non-null float64\n", + " 20 symmetry_se 426 non-null float64\n", + " 21 fractal_dimension_se 426 non-null float64\n", + " 22 radius_worst 426 non-null float64\n", + " 23 texture_worst 426 non-null float64\n", + " 24 perimeter_worst 426 non-null float64\n", + " 25 area_worst 426 non-null float64\n", + " 26 smoothness_worst 426 non-null float64\n", + " 27 compactness_worst 426 non-null float64\n", + " 28 concavity_worst 426 non-null float64\n", + " 29 concave points_worst 426 non-null float64\n", + " 30 symmetry_worst 426 non-null float64\n", + " 31 fractal_dimension_worst 426 non-null float64\n", + "dtypes: float64(30), int64(1), object(1)\n", + "memory usage: 109.8+ KB\n" + ] + } + ], + "source": [ + "cancer_train.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 143 entries, 357 to 332\n", + "Data columns (total 32 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 id 143 non-null int64 \n", + " 1 diagnosis 143 non-null object \n", + " 2 radius_mean 143 non-null float64\n", + " 3 texture_mean 143 non-null float64\n", + " 4 perimeter_mean 143 non-null float64\n", + " 5 area_mean 143 non-null float64\n", + " 6 smoothness_mean 143 non-null float64\n", + " 7 compactness_mean 143 non-null float64\n", + " 8 concavity_mean 143 non-null float64\n", + " 9 concave points_mean 143 non-null float64\n", + " 10 symmetry_mean 143 non-null float64\n", + " 11 fractal_dimension_mean 143 non-null float64\n", + " 12 radius_se 143 non-null float64\n", + " 13 texture_se 143 non-null float64\n", + " 14 perimeter_se 143 non-null float64\n", + " 15 area_se 143 non-null float64\n", + " 16 smoothness_se 143 non-null float64\n", + " 17 compactness_se 143 non-null float64\n", + " 18 concavity_se 143 non-null float64\n", + " 19 concave points_se 143 non-null float64\n", + " 20 symmetry_se 143 non-null float64\n", + " 21 fractal_dimension_se 143 non-null float64\n", + " 22 radius_worst 143 non-null float64\n", + " 23 texture_worst 143 non-null float64\n", + " 24 perimeter_worst 143 non-null float64\n", + " 25 area_worst 143 non-null float64\n", + " 26 smoothness_worst 143 non-null float64\n", + " 27 compactness_worst 143 non-null float64\n", + " 28 concavity_worst 143 non-null float64\n", + " 29 concave points_worst 143 non-null float64\n", + " 30 symmetry_worst 143 non-null float64\n", + " 31 fractal_dimension_worst 143 non-null float64\n", + "dtypes: float64(30), int64(1), object(1)\n", + "memory usage: 36.9+ KB\n" + ] + } + ], + "source": [ + "cancer_test.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "#K = 5\n", + "knn = KNeighborsClassifier(n_neighbors=5) #initialize our model" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "#defining our X and y\n", + "X = cancer_train[[\"perimeter_mean\",\"concavity_mean\"]]\n", + "y = cancer_train[\"diagnosis\"] " + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
KNeighborsClassifier()
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "KNeighborsClassifier()" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#fit model to train data\n", + "knn.fit(X,y)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
iddiagnosisradius_meantexture_meanperimeter_meanarea_meansmoothness_meancompactness_meanconcavity_meanconcave points_mean...texture_worstperimeter_worstarea_worstsmoothness_worstcompactness_worstconcavity_worstconcave points_worstsymmetry_worstfractal_dimension_worstpredicted
357901028Benign-0.073075-0.716655-0.142066-0.174028-0.635527-0.936601-0.926297-0.723241...-0.015832-0.313383-0.327294-0.748217-0.976252-1.052282-0.899073-0.871589-0.710199Benign
361901041Benign-0.2349630.530653-0.277170-0.309407-0.750104-0.769638-0.695035-0.636573...0.573662-0.426569-0.455973-0.805204-0.557036-0.724371-0.890242-0.426699-0.962341Benign
2128810703Malignant3.971288-0.1907383.9761305.2448411.2695710.8956282.9039732.852321...-1.1736522.4197652.845036-0.796437-0.6530930.2298570.683579-2.026684-1.590202Malignant
52791813702Benign-0.507616-1.633519-0.536668-0.530110-0.450497-0.782146-0.743497-0.579053...-1.043377-0.596944-0.554943-0.138898-0.298127-0.446594-0.1158170.338511-0.444757Benign
218510824Benign-1.313080-1.593959-1.302806-1.0835720.429819-0.747086-0.743748-0.726337...-1.631243-1.254913-0.9944220.001377-0.887193-0.880434-0.796903-0.729224-0.344455Benign
..................................................................
3649010877Benign-0.206561-0.544452-0.267285-0.291490-1.209121-0.897940-0.841049-0.881874...-0.647666-0.402145-0.381613-0.485202-0.551311-0.651448-0.681180-0.258450-0.450299Benign
434908469Benign0.208100-0.5467790.1203150.053500-0.506718-0.636788-0.694784-0.519727...-0.836565-0.147774-0.181211-0.463284-0.631464-0.720533-0.531351-0.607890-0.868688Benign
299892399Benign-1.0273620.884367-1.034658-0.9120730.365770-0.689284-0.801626-0.778182...-0.237300-1.106878-0.910393-0.792053-1.069510-1.106350-1.269232-1.089989-0.896396Benign
488913512Benign-0.695066-0.725963-0.678775-0.6666271.169940-0.221940-0.577646-0.453952...-0.665579-0.616305-0.5814880.886862-0.677903-0.591000-0.250572-0.156530-0.205361Benign
332897132Benign-0.8257120.132725-0.825000-0.7610510.643316-0.692695-1.052023-1.066224...0.016737-0.904036-0.7813630.439736-1.002397-1.241784-1.4371810.632947-1.037706Benign
\n", + "

143 rows × 33 columns

\n", + "
" + ], + "text/plain": [ + " id diagnosis radius_mean texture_mean perimeter_mean \\\n", + "357 901028 Benign -0.073075 -0.716655 -0.142066 \n", + "361 901041 Benign -0.234963 0.530653 -0.277170 \n", + "212 8810703 Malignant 3.971288 -0.190738 3.976130 \n", + "527 91813702 Benign -0.507616 -1.633519 -0.536668 \n", + "21 8510824 Benign -1.313080 -1.593959 -1.302806 \n", + ".. ... ... ... ... ... \n", + "364 9010877 Benign -0.206561 -0.544452 -0.267285 \n", + "434 908469 Benign 0.208100 -0.546779 0.120315 \n", + "299 892399 Benign -1.027362 0.884367 -1.034658 \n", + "488 913512 Benign -0.695066 -0.725963 -0.678775 \n", + "332 897132 Benign -0.825712 0.132725 -0.825000 \n", + "\n", + " area_mean smoothness_mean compactness_mean concavity_mean \\\n", + "357 -0.174028 -0.635527 -0.936601 -0.926297 \n", + "361 -0.309407 -0.750104 -0.769638 -0.695035 \n", + "212 5.244841 1.269571 0.895628 2.903973 \n", + "527 -0.530110 -0.450497 -0.782146 -0.743497 \n", + "21 -1.083572 0.429819 -0.747086 -0.743748 \n", + ".. ... ... ... ... \n", + "364 -0.291490 -1.209121 -0.897940 -0.841049 \n", + "434 0.053500 -0.506718 -0.636788 -0.694784 \n", + "299 -0.912073 0.365770 -0.689284 -0.801626 \n", + "488 -0.666627 1.169940 -0.221940 -0.577646 \n", + "332 -0.761051 0.643316 -0.692695 -1.052023 \n", + "\n", + " concave points_mean ... texture_worst perimeter_worst area_worst \\\n", + "357 -0.723241 ... -0.015832 -0.313383 -0.327294 \n", + "361 -0.636573 ... 0.573662 -0.426569 -0.455973 \n", + "212 2.852321 ... -1.173652 2.419765 2.845036 \n", + "527 -0.579053 ... -1.043377 -0.596944 -0.554943 \n", + "21 -0.726337 ... -1.631243 -1.254913 -0.994422 \n", + ".. ... ... ... ... ... \n", + "364 -0.881874 ... -0.647666 -0.402145 -0.381613 \n", + "434 -0.519727 ... -0.836565 -0.147774 -0.181211 \n", + "299 -0.778182 ... -0.237300 -1.106878 -0.910393 \n", + "488 -0.453952 ... -0.665579 -0.616305 -0.581488 \n", + "332 -1.066224 ... 0.016737 -0.904036 -0.781363 \n", + "\n", + " smoothness_worst compactness_worst concavity_worst \\\n", + "357 -0.748217 -0.976252 -1.052282 \n", + "361 -0.805204 -0.557036 -0.724371 \n", + "212 -0.796437 -0.653093 0.229857 \n", + "527 -0.138898 -0.298127 -0.446594 \n", + "21 0.001377 -0.887193 -0.880434 \n", + ".. ... ... ... \n", + "364 -0.485202 -0.551311 -0.651448 \n", + "434 -0.463284 -0.631464 -0.720533 \n", + "299 -0.792053 -1.069510 -1.106350 \n", + "488 0.886862 -0.677903 -0.591000 \n", + "332 0.439736 -1.002397 -1.241784 \n", + "\n", + " concave points_worst symmetry_worst fractal_dimension_worst predicted \n", + "357 -0.899073 -0.871589 -0.710199 Benign \n", + "361 -0.890242 -0.426699 -0.962341 Benign \n", + "212 0.683579 -2.026684 -1.590202 Malignant \n", + "527 -0.115817 0.338511 -0.444757 Benign \n", + "21 -0.796903 -0.729224 -0.344455 Benign \n", + ".. ... ... ... ... \n", + "364 -0.681180 -0.258450 -0.450299 Benign \n", + "434 -0.531351 -0.607890 -0.868688 Benign \n", + "299 -1.269232 -1.089989 -0.896396 Benign \n", + "488 -0.250572 -0.156530 -0.205361 Benign \n", + "332 -1.437181 0.632947 -1.037706 Benign \n", + "\n", + "[143 rows x 33 columns]" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cancer_test[\"predicted\"] = knn.predict(cancer_test[[\"perimeter_mean\",\"concavity_mean\"]])\n", + "cancer_test" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.9230769230769231" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "knn.score(cancer_test[[\"perimeter_mean\",\"concavity_mean\"]],\n", + " cancer_test[\"diagnosis\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
predictedBenignMalignant
diagnosis
Benign882
Malignant944
\n", + "
" + ], + "text/plain": [ + "predicted Benign Malignant\n", + "diagnosis \n", + "Benign 88 2\n", + "Malignant 9 44" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.crosstab(\n", + " cancer_test[\"diagnosis\"], #actual labels \n", + " cancer_test[\"predicted\"]\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.9565217391304348" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "precision_score(\n", + " y_true = cancer_test[\"diagnosis\"], #actual label \n", + " y_pred = cancer_test[\"predicted\"], #predicted label\n", + " pos_label = \"Malignant\"\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.8301886792452831" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "recall_score(\n", + " y_true= cancer_test[\"diagnosis\"],\n", + " y_pred = cancer_test[\"predicted\"],\n", + " pos_label = \"Malignant\" \n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [], + "source": [ + "#subdivide training data into train and validation\n", + "cancer_subtrain, cancer_validation = train_test_split(cancer_train, train_size=0.75, stratify=cancer_train[\"diagnosis\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
KNeighborsClassifier(n_neighbors=3)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "KNeighborsClassifier(n_neighbors=3)" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#k = 3 train on subtraining data\n", + "knn = KNeighborsClassifier(n_neighbors=3)\n", + "X = cancer_subtrain[[\"perimeter_mean\",\"concavity_mean\"]]\n", + "y = cancer_subtrain[\"diagnosis\"]\n", + "knn.fit(X,y)" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.897196261682243" + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#compute the score on validation data\n", + "knn.score(\n", + " cancer_validation[[\"perimeter_mean\",\"concavity_mean\"]],\n", + " cancer_validation[\"diagnosis\"]\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [], + "source": [ + "knn = KNeighborsClassifier(n_neighbors=3)\n", + "X = cancer_train[[\"perimeter_mean\",\"concavity_mean\"]]\n", + "y = cancer_train['diagnosis']\n", + "\n", + "returned_dictionary = cross_validate(\n", + " estimator = knn,\n", + " cv = 5, # 5-fold cross validation\n", + " X = X,\n", + " y = y \n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
fit_timescore_timetest_score
00.0012810.0031070.930233
10.0020800.0011830.894118
20.0009990.0016820.870588
30.0010200.0016340.952941
40.0009670.0021740.917647
\n", + "
" + ], + "text/plain": [ + " fit_time score_time test_score\n", + "0 0.001281 0.003107 0.930233\n", + "1 0.002080 0.001183 0.894118\n", + "2 0.000999 0.001682 0.870588\n", + "3 0.001020 0.001634 0.952941\n", + "4 0.000967 0.002174 0.917647" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cv_5_df = pd.DataFrame(returned_dictionary)\n", + "cv_5_df" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
fit_timescore_timetest_score
mean0.0012690.0019560.913105
sem0.0002100.0003280.014264
\n", + "
" + ], + "text/plain": [ + " fit_time score_time test_score\n", + "mean 0.001269 0.001956 0.913105\n", + "sem 0.000210 0.000328 0.014264" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cv_5_df.agg([\"mean\",\"sem\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": {}, + "outputs": [], + "source": [ + "#step 1. define parameter grid and initize empty model\n", + "knn = KNeighborsClassifier()\n", + "\n", + "parameter_grid = {\n", + " \"n_neighbors\" : range(1,400,5)\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [], + "source": [ + "#step 2. initialize our grid search object\n", + "cancer_tune_grid = GridSearchCV(\n", + " estimator = knn,\n", + " param_grid= parameter_grid,\n", + " cv = 10\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 386, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 391, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 383, n_samples = 43\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py:953: UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: \n", + "Traceback (most recent call last):\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_validation.py\", line 942, in _score\n", + " scores = scorer(estimator, X_test, y_test, **score_params)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/metrics/_scorer.py\", line 492, in __call__\n", + " return estimator.score(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 446, in score\n", + " return super().score(X, y, sample_weight)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/base.py\", line 548, in score\n", + " return accuracy_score(y, self.predict(X), sample_weight=sample_weight)\n", + " ^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_classification.py\", line 274, in predict\n", + " neigh_ind = self.kneighbors(X, return_distance=False)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/neighbors/_base.py\", line 854, in kneighbors\n", + " raise ValueError(\n", + "ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 396, n_samples_fit = 384, n_samples = 42\n", + "\n", + " warnings.warn(\n", + "/Users/juliagallucci/Desktop/CI:TA Positions/DSI Linear regression, classification, and resampling CI/LCR/lcr-env/lib/python3.11/site-packages/sklearn/model_selection/_search.py:1135: UserWarning: One or more of the test scores are non-finite: [0.87569214 0.90863787 0.90404208 0.92048726 0.91339978 0.91339978\n", + " 0.91339978 0.9110742 0.9110742 0.91578073 0.91345515 0.92043189\n", + " 0.91810631 0.92043189 0.92043189 0.92043189 0.92043189 0.91572536\n", + " 0.91334441 0.91334441 0.91334441 0.90863787 0.90863787 0.90863787\n", + " 0.90863787 0.90863787 0.90863787 0.90620155 0.9038206 0.90614618\n", + " 0.90143965 0.89905869 0.89435216 0.89435216 0.89202658 0.88493909\n", + " 0.88028793 0.88028793 0.87790698 0.87785161 0.87785161 0.87552602\n", + " 0.88017719 0.87547065 0.87547065 0.8730897 0.8730897 0.8730897\n", + " 0.87076412 0.8521041 0.84269103 0.8286268 0.8192691 0.8051495\n", + " 0.77220377 0.73460687 0.70885936 0.62674419 0.62674419 0.62674419\n", + " 0.62674419 0.62674419 0.62674419 0.62674419 0.62674419 0.62674419\n", + " 0.62674419 0.62674419 0.62674419 0.62674419 0.62674419 0.62674419\n", + " 0.62674419 0.62674419 0.62674419 0.62674419 0.62674419 nan\n", + " nan nan]\n", + " warnings.warn(\n" + ] + }, + { + "data": { + "text/html": [ + "
GridSearchCV(cv=10, estimator=KNeighborsClassifier(),\n",
+       "             param_grid={'n_neighbors': range(1, 400, 5)})
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "GridSearchCV(cv=10, estimator=KNeighborsClassifier(),\n", + " param_grid={'n_neighbors': range(1, 400, 5)})" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#step 3. fit model to our train data\n", + "cancer_tune_grid.fit(\n", + " cancer_train[[\"perimeter_mean\",\"concavity_mean\"]],\n", + " cancer_train[\"diagnosis\"]\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
mean_fit_timestd_fit_timemean_score_timestd_score_timeparam_n_neighborsparamssplit0_test_scoresplit1_test_scoresplit2_test_scoresplit3_test_scoresplit4_test_scoresplit5_test_scoresplit6_test_scoresplit7_test_scoresplit8_test_scoresplit9_test_scoremean_test_scorestd_test_scorerank_test_score
00.0011790.0004200.0017850.0007751{'n_neighbors': 1}0.9534880.8372090.9069770.8604650.8139530.8372090.8809520.9047620.8809520.8809520.8756920.03868442
10.0008640.0001820.0011910.0002106{'n_neighbors': 6}0.9302330.9534880.9069770.8372090.8372090.9069770.9285710.9285710.8809520.9761900.9086380.04337319
20.0009220.0001720.0012830.00015111{'n_neighbors': 11}0.9069770.9302330.9069770.8372090.8372090.8837210.9523810.9047620.9285710.9523810.9040420.03914728
30.0009760.0001890.0013460.00026816{'n_neighbors': 16}0.9069770.9534880.9302330.8372090.8372090.9302330.9523810.9523810.9285710.9761900.9204870.0453151
40.0009030.0001540.0012490.00013321{'n_neighbors': 21}0.9069770.9534880.9302330.8372090.8372090.9069770.9523810.9523810.8809520.9761900.9134000.04649511
............................................................
750.0018330.0003110.0052140.000782376{'n_neighbors': 376}0.6279070.6279070.6279070.6279070.6279070.6279070.6190480.6190480.6190480.6428570.6267440.00667458
760.0017760.0002240.0051880.000859381{'n_neighbors': 381}0.6279070.6279070.6279070.6279070.6279070.6279070.6190480.6190480.6190480.6428570.6267440.00667458
770.0015670.0002020.0019430.002271386{'n_neighbors': 386}NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN78
780.0019300.0003300.0014910.000797391{'n_neighbors': 391}NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN78
790.0019060.0004950.0014840.000461396{'n_neighbors': 396}NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN78
\n", + "

80 rows × 19 columns

\n", + "
" + ], + "text/plain": [ + " mean_fit_time std_fit_time mean_score_time std_score_time \\\n", + "0 0.001179 0.000420 0.001785 0.000775 \n", + "1 0.000864 0.000182 0.001191 0.000210 \n", + "2 0.000922 0.000172 0.001283 0.000151 \n", + "3 0.000976 0.000189 0.001346 0.000268 \n", + "4 0.000903 0.000154 0.001249 0.000133 \n", + ".. ... ... ... ... \n", + "75 0.001833 0.000311 0.005214 0.000782 \n", + "76 0.001776 0.000224 0.005188 0.000859 \n", + "77 0.001567 0.000202 0.001943 0.002271 \n", + "78 0.001930 0.000330 0.001491 0.000797 \n", + "79 0.001906 0.000495 0.001484 0.000461 \n", + "\n", + " param_n_neighbors params split0_test_score \\\n", + "0 1 {'n_neighbors': 1} 0.953488 \n", + "1 6 {'n_neighbors': 6} 0.930233 \n", + "2 11 {'n_neighbors': 11} 0.906977 \n", + "3 16 {'n_neighbors': 16} 0.906977 \n", + "4 21 {'n_neighbors': 21} 0.906977 \n", + ".. ... ... ... \n", + "75 376 {'n_neighbors': 376} 0.627907 \n", + "76 381 {'n_neighbors': 381} 0.627907 \n", + "77 386 {'n_neighbors': 386} NaN \n", + "78 391 {'n_neighbors': 391} NaN \n", + "79 396 {'n_neighbors': 396} NaN \n", + "\n", + " split1_test_score split2_test_score split3_test_score \\\n", + "0 0.837209 0.906977 0.860465 \n", + "1 0.953488 0.906977 0.837209 \n", + "2 0.930233 0.906977 0.837209 \n", + "3 0.953488 0.930233 0.837209 \n", + "4 0.953488 0.930233 0.837209 \n", + ".. ... ... ... \n", + "75 0.627907 0.627907 0.627907 \n", + "76 0.627907 0.627907 0.627907 \n", + "77 NaN NaN NaN \n", + "78 NaN NaN NaN \n", + "79 NaN NaN NaN \n", + "\n", + " split4_test_score split5_test_score split6_test_score \\\n", + "0 0.813953 0.837209 0.880952 \n", + "1 0.837209 0.906977 0.928571 \n", + "2 0.837209 0.883721 0.952381 \n", + "3 0.837209 0.930233 0.952381 \n", + "4 0.837209 0.906977 0.952381 \n", + ".. ... ... ... \n", + "75 0.627907 0.627907 0.619048 \n", + "76 0.627907 0.627907 0.619048 \n", + "77 NaN NaN NaN \n", + "78 NaN NaN NaN \n", + "79 NaN NaN NaN \n", + "\n", + " split7_test_score split8_test_score split9_test_score mean_test_score \\\n", + "0 0.904762 0.880952 0.880952 0.875692 \n", + "1 0.928571 0.880952 0.976190 0.908638 \n", + "2 0.904762 0.928571 0.952381 0.904042 \n", + "3 0.952381 0.928571 0.976190 0.920487 \n", + "4 0.952381 0.880952 0.976190 0.913400 \n", + ".. ... ... ... ... \n", + "75 0.619048 0.619048 0.642857 0.626744 \n", + "76 0.619048 0.619048 0.642857 0.626744 \n", + "77 NaN NaN NaN NaN \n", + "78 NaN NaN NaN NaN \n", + "79 NaN NaN NaN NaN \n", + "\n", + " std_test_score rank_test_score \n", + "0 0.038684 42 \n", + "1 0.043373 19 \n", + "2 0.039147 28 \n", + "3 0.045315 1 \n", + "4 0.046495 11 \n", + ".. ... ... \n", + "75 0.006674 58 \n", + "76 0.006674 58 \n", + "77 NaN 78 \n", + "78 NaN 78 \n", + "79 NaN 78 \n", + "\n", + "[80 rows x 19 columns]" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "accuracy_grid = pd.DataFrame(cancer_tune_grid.cv_results_)\n", + "accuracy_grid" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA90AAAJOCAYAAACqS2TfAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjcsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvTLEjVAAAAAlwSF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Lp37typrl27qkmTJjr//PO1efNmZ/t1112nO+64IxJ1BAAAQJwYPFgqV05aulT65JNo1wYAimDQffvttys5OVnr1q1T2bJlM7dffvnlmj59erjrBwAAgDhSubJ0883ubXq7ASSCkIPuzz//XI899pjq1Knjt71x48b6/fffw1k3AAAAxCEbHFm6tLRwoTRzZrRrAwBFLOjeu3evXw+31x9//KFSpUqFq14AAACIU9WrSzfccLS3GwDiWchBd8eOHfXGG29k3k9KSlJGRoYef/xxdenSJdz1AwAAQBy66y6pZEnpyy/dCwDEq+RQn2DB9dlnn61vv/1WBw8e1N13360ffvjB6en+6quvIlNLAAAAxBWbqdi/v/TCC25v9+efR7tGAFBEerqbN2+uX375RR06dFCPHj2c4ea9evXS0qVL1ahRo8jUEgAAAHFn6FApOVmaMcOd3w0A8SjJE+IC25a1vG7dus6w8kCP1atXT7EuPT1dqampSktLU0pKSrSrAwAAELcGDJBefVW64ALp44+jXRsAiSo9gjFgyEF38eLFnbW5q1Wrlm39btt25MgRxTqCbgAAgMLx669S06ZSRob04otS+fJSzZqWR8j+7uQoAIj9GDDk4eUWowfq5d6zZ49K29oPAAAAQJAaN5bOOMO9bRnNr7xSsty8DRpI06bRjAASKJHakCFDnGsLuEeMGOG3bJj1bi9cuFCtWrWKTC0BAAAQlyywnj8/+/aNG6VLLpGmTpV69YpGzQCgkINuS5Tm7elevny5StoaD//Pbrds2VJ33nlnmKoFAACAeGezEgcNsr8vsz9m22xw5eDBUo8eDDUHkABB95w5c5zr/v37a/z48SQYAwAAQIHMmydt2JDz4xZ4r1/vluvcmcYGkCDrdL9q6SUBAACAAtq8ObzlACAugm7z7bff6t1333WWCDt48KDfY9PIeAEAAIAgWJbycJYDgKIo5OzlkydP1umnn66ffvpJH3zwgQ4dOqQffvhBs2fPdlKsAwAAAMGwZcHq1HHnbgdi2+vWdcsBQMIE3aNHj9a//vUvffTRR04CNZvf/fPPP+uyyy5TvXr1IlNLAAAAxB1bh3v8ePd21sDbe3/cOJKoAUiwoHv16tW64IILnNsWdO/du9dZRuz222/Xiy++GHIFnn32WTVo0MBZ47tdu3ZatGhRruXHjRun448/XmXKlFHdunWd192/f3+B9gkAAIDosOXAbFmw2rX9t1euzHJhABI06K5YsaJ2797t3K5du7ZWrFjh3N61a5f27dsX0r6mTJnirP89atQoLVmyxFl2rHv37tq2bVvA8u+8846GDh3qlLfh7a+88oqzj3vvvTff+wQAAED0A++1a221HOnMM91tAweyPjeABA26O3XqpBkzZji3L730Ug0aNEgDBw5Unz59dPbZZ4e0r7FjxzrPtWXImjVrpgkTJqhs2bKaOHFiwPL/+9//dMYZZ+jKK690erK7devmvK5vT3ao+wQAAEDRGGpuy4JdcYV7f/HiaNcIAKIUdD/zzDO64v9/De+77z6nV3nr1q3q3bu30/McLMt6vnjxYnXt2vVoZYoVc+4vWLAg4HMsgZs9xxtk//bbb/r00091/vnn53uf5sCBA0pPT/e7AAAAoPCdeqp7/c037jrdAJBwS4ZVqlTJL6C14d75sWPHDh05ckTVq1f32273LTFbINbDbc/r0KGDPB6PDh8+rBtvvDFzeHl+9mnGjBmjBx54IF/vAwAAAOHTooVUqpT055+WS0g67jhaF0CC9XR72Rxpm8+9bNkyv0skzZ0718me/txzzznztW1N8E8++UQPPfRQgfY7bNgwpaWlZV7Wr18ftjoDAAAgeCVLSq1aHe3tBoCE6+m24dv9+vVzEplZb7Mvy2JuPc3BqFKliooXL+4MTfdl92vUqBHwOSNGjNA111yj66+/3rnfokULJ3v6DTfc4Ax1z88+TalSpZwLAAAAoq9tW2nhQslmFPbpE+3aAEAh93QPGDBATZo0cZKa2ZzqNWvWZF7sfrBsubHWrVtr1qxZmdsyMjKc++3btw/4HMuObkPafVmQbewEQH72CQAAgKI7rxsAEq6n2wLr999/X8eFYYKNJWGzXvM2bdqobdu2zhrc1nNtmcdN3759nWXJbM61ufDCC53s5CeffLKz/vaqVauc3m/b7g2+89onAAAAYiPoXrJEOnxYSg75L1YAKDpC/gmzZcG+//77sATdl19+ubZv366RI0dqy5YtatWql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Zvu/V8e9njJ510kho1auT0fp999tnZ9mM97Tav3Lenm8AbAAAg9hB0A4j5oNuGa/smUvN4PNq9e7czr/qtt94KaV9VqlRR8eLFtXXrVr/tdj+v+dh79+515nM/+OCDeb5Ow4YNnddatWpVwKDb5n+TaA0AACB+kql9/320awIA+Qy6//Wvf/kF3TYHu2rVqk7mcQvIQ1GyZEm1bt3aGQZ+8cUXO9syMjKc+7feemuuz33vvfecedhXX311nq+zYcMGJ8t5zZo1Q6ofAAAAYjPoXrdO+vNP6zCKdo0AJLqQg25bAzucbFh3v3791KZNG2eYuC0ZZr3Y3mzmffv2dYat27zrrEPLLVDPmhxtz549Thb13r17O73lq1ev1t13363jjjvOWYoMAAAA8cuC7Hr13KDblg7r1CnaNQKQ6EIOum3t6/Lly2dbost6nvft2+cE0KG4/PLLtX37do0cOdJJntaqVStNnz49M7naunXrnN50X7aG9/z58/X5559n258NV1+2bJmzhNmuXbtUq1YtdevWTQ899BBDyAEAABJkXrcF3TbEnKAbQLQleWxSdgiaNGmiF154QV26dPHbbhnCb7jhBicgjnWWSM2ymKelpSklJSXa1QEAAEAIRoyQHn5YspVsX36ZpgMQ3Rgw5CXDrOf52GOPzba9fv36zmMAAABANJHBHEBREnLQXa1aNWf4dlbff/99tvnVAAAAQLSSqa1YIR0+TPsDiLGgu0+fPrrttts0Z84cHTlyxLnMnj1bgwYN8lsfGwAAAIiGRo2ksmWl/fulVas4BgBiLJGaJSRbu3ats951cnJy5jJflmV89OjRkagjAAAAELTixaUWLaSFC91kak2b0ngAYqin29bWnjJlipMw7e2339a0adOcZbkmTpzoPAYAAABEG/O6AcRsT7dX48aNnQsAAABQ1BB0A4jZnu7evXvrsccey7b98ccfz7Z2NwAAABDNZGo2vBwAYiro/vLLL3X++edn237eeec5jwEAAABFJejeuFHauTPatQGQyEIOuvfs2RNw7naJEiWcBcUBAACAaEtJkY491r0dYLVbACi6QXeLFi2cRGpZTZ48Wc2aNQtXvQAAAIACYV43gJhMpDZixAj16tXLyVh+1llnOdtmzZqlSZMm6b333otEHQEAAIB8Bd0ffsi8bgAxFnRfeOGF+vDDD501uadOnaoyZcropJNO0syZM3XmmWdGppYAAABAiEimBqAoSPJ4PJ5w7WzFihVq3ry5Yp3NTU9NTVVaWppSbEIQAAAAYs7q1dJxx0nJydKrr0p16kgdO0rFi0e7ZgASKQYMeU53Vrt379aLL76otm3bqqV34gwAAAAQZUuXSklJ0uHD0jXXSF26SA0aSNOmRbtmABJJvoNuWx6sb9++qlmzpv75z38687u//vrr8NYOAAAAyAcLrC+7TMo6ptOWELvkEgJvAEV0TveWLVv02muv6ZVXXnG63y+77DIdOHDAmeNN5nIAAAAUBUeOSIMGZQ+4jW2z3u/Bg6UePRhqDqAI9XRbArXjjz9ey5Yt07hx47Rp0yY9/fTTka0dAAAAEKJ586QNG3J+3ALv9evdcgBQZHq6P/vsM91222266aab1Lhx48jWCgAAAMinzZvDWw4ACqWne/78+U7StNatW6tdu3Z65plntGPHjgK9OAAAABBuNWuGtxwAFErQfdppp+mll17S5s2b9fe//12TJ09WrVq1lJGRoRkzZjgBOQAAABBttiyYLQ9mc7cDse1167rlAKDIZS8vV66cBgwY4PR8L1++XHfccYceffRRVatWTRdddFFkagkAAAAEydbhHj/evZ018PbeHzeOJGoACkeB1um2xGqPP/64NmzYoEmTJoWvVgAAAEAB9OolTZ0q1a7tv93u23Z7HAAKQ5LHE2gxhcRmy6GlpqYqLS1NKSkp0a4OAAAACrB82JdfukH2rl3S559L55xDcwIovBiwQD3dAAAAQFEfat6liy1/696fPTvaNQKQaAi6AQAAEPe6dnWvZ86Mdk0AJBqCbgAAACRM0L14sfTHH9GuDYBEQtANAACAuFerltSsmWTZjBhiDqAwEXQDAAAgITDEHEA0EHQDAAAgIXizljOvG0BhIugGAABAQjjzTDeb+erV0po10a4NgERB0A0AAICEcMwx0mmnubfp7QZQWAi6AQAAkDAYYg6gsBF0AwAAIOGSqc2aJWVkRLs2ABIBQTcAAAASRtu27jDznTul776Ldm0AJAKCb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AsP/s7D85W9qjfv36noEDB2Y76cixKhyBjpNdXn311ZB++9auXes577zzPGXKlHFOVtpJzEOHDhXSu0gMeR2rdevWOQF2pUqVnN/A4447znPXXXd50tLS/PbDsYq8AQMGOL9t9veE/dbZ/0fegNvwnYqd48X3KraC7r8K6f+rJPsnvB35AAAAAADAMKcbAAAAAIAIIegGAAAAACBCCLoBAAAAAIgQgm4AAAAAACKEoBsAAAAAgAgh6AYAAAAAIEIIugEAAAAAiBCCbgAAAAAAIoSgGwCAQrJ27VolJSXpu+++KzJt/vPPP+u0005T6dKl1apVq4i/XoMGDTRu3Liwttlrr72mChUqhKmGAACEF0E3ACBhXHvttU4A9+ijj/pt//DDD53tiWjUqFEqV66cVq5cqVmzZkW83b755hvdcMMNBaozAACxhKAbAJBQrEf3scce059//ql4cfDgwXw/d/Xq1erQoYPq16+vypUrR7zdqlatqrJlyyoWHDp0KNpVAADEAYJuAEBC6dq1q2rUqKExY8bkWOb+++/PNtTahkTb0Gjf3t+LL75Yo0ePVvXq1Z3hzQ8++KAOHz6su+66S5UqVVKdOnX06quvBhzSffrppzuBbPPmzfXFF1/4Pb5ixQqdd955Kl++vLPva665Rjt27Mh8vHPnzrr11ls1ePBgValSRd27dw/4PjIyMpw6WT1KlSrlvKfp06dnPm691IsXL3bK2G173wVpNzN//nx17NhRZcqUUd26dXXbbbdp7969OQ4vt7awoN/aolmzZpo5c6ZTF+tF9/Xbb7+pS5cuTsDesmVLLViwINtr23MaN27s7MvaZP369X6PP//882rUqJFKliyp448/Xm+++abf4/a6Vuaiiy5yev8feeQR5yTDVVdd5ZwssPdk+w90TAEAyAlBNwAgoRQvXtwJlJ9++mlt2LChQPuaPXu2Nm3apC+//FJjx451hmr/7W9/U8WKFbVw4ULdeOON+vvf/57tdSwov+OOO7R06VK1b99eF154oXbu3Ok8tmvXLp111lk6+eST9e233zpB8tatW3XZZZf57eP11193gsevvvpKEyZMCFi/8ePH68knn9Q///lPLVu2zAlELaD89ddfncc3b96sE0880amL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f5z1nrbxeafZ2XJzCzZmc1Z911SLD+sHW0OvG8vus3r9rarXee3Lezz0K9fP7311ltOEjibew4AQLAIugEACcuGgltm6qeeespvu2UH3759ux5//HFnSPezzz7rJNIKF9ufJfayzN233HKLkyHbknYZu//HH384icIsALXX/+9//+sk/bLEY6GwhG02HNwSmlkQOnToUOfkgSUUi0S73XPPPc7wa0uc5u2d//e//51jIrVzzjnH6QG3gNYSr1kQPHz4cOexUNf/tp7wf/zjH05CNjuJYdnlTzvttMzh6tYWNvTdEqFZvSzx3bRp0/LstR45cqTzHlatWuWcDPn4448zA3kAAIJB0A0ASGi2XFbWYcoWVD333HNOcGzLUy1atCisQ4qtp9gutm/L7v2f//wnMyO2t3faAuxu3bo5Aa4tDWbzk33njwfDlusaMmSIk7Hb9mOZ0O21bNmrSLSbzbu25c9++eUXZ9kwy8BuQau9p0Bszrst82XD0m0+9vXXX5+ZvdyW/QqFZUC3oP/KK6905mrbfHI72eBlWdItm7tlcre5+C+88IKz9JedYMmN9dDbUHp7bza03upsc7wBAAhWkmVTC7o0AABABNkJB1u323qWCzoPHACAooCgGwAARI0Ns7deaet9t0Dbhr7bOuc2AgAAgHiQHO0KAACAxLV7925nWPi6deucIfZdu3bVk08+Ge1qAQAQNvR0AwAAAAAQISRSAwAAAAAgQgi6AQAAAACIEIJuAAAAAAAihKAbAAAAAIAIIegGAAAAACBCCLoBAAAAAIgQgm4AAAAAACKEoBsAAAAAgAgh6AYAAAAAQJHxfx5aD9ID9bvSAAAAAElFTkSuQmCC", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Create the plot\n", + "plt.figure(figsize=(10, 6))\n", + "\n", + "# Plot mean test scores with error bars\n", + "plt.plot(accuracy_grid['param_n_neighbors'], accuracy_grid['mean_test_score'], '-o', color='blue')\n", + "\n", + "# Add labels and legend\n", + "plt.xlabel('Number of Neighbors')\n", + "plt.ylabel('Accuracy estimate')\n", + "plt.title('K-Nearest Neighbors Performance')\n", + "plt.tight_layout()\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'n_neighbors': 16}" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#best value of K\n", + "cancer_tune_grid.best_params_" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "lcr-env", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.13" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 4471503f100c168f3be55094ada54fb55fc74bc4 Mon Sep 17 00:00:00 2001 From: juliagallucci <78810440+juliagallucci@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:42:57 -0400 Subject: [PATCH 2/4] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 90fcda70e..58ae225f6 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,9 @@ Participants should review the [Assignment Submission Guide](https://github.com/ | Assessment | Content | Due Dates | |--------------|------------------------------------|--------------| -| Assignment 1 | Classification (Sessions 1, 2) | Apr 19 | -| Assignment 2 | Regression (Sessions 3, 4) | Apr 28 | -| Assignment 3 | Clustering & Resampling (Sessions 5, 6) | May 5 | +| Assignment 1 | Classification (Sessions 1, 2) | Apr 21 | +| Assignment 2 | Regression (Sessions 3, 4) | May 3 | +| Assignment 3 | Clustering & Resampling (Sessions 5, 6) | May 10 | ### Contacts **Questions can be submitted to the _#dc3-help_ channel on Slack** From 844ba7e017f1400008b4b3bbbd1f14257c9967dd Mon Sep 17 00:00:00 2001 From: Aunima Date: Sun, 19 Apr 2026 22:29:21 -0400 Subject: [PATCH 3/4] Complete assignment 1 --- 02_activities/assignments/assignment_1.ipynb | 1445 +++++++++++++++++- 1 file changed, 1410 insertions(+), 35 deletions(-) diff --git a/02_activities/assignments/assignment_1.ipynb b/02_activities/assignments/assignment_1.ipynb index 1d25bbcb3..a2d793d1d 100644 --- a/02_activities/assignments/assignment_1.ipynb +++ b/02_activities/assignments/assignment_1.ipynb @@ -34,7 +34,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "4a3485d6-ba58-4660-a983-5680821c5719", "metadata": {}, "outputs": [], @@ -56,10 +56,288 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "a431d282-f9ca-4d5d-8912-71ffc9d8ea19", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
alcoholmalic_acidashalcalinity_of_ashmagnesiumtotal_phenolsflavanoidsnonflavanoid_phenolsproanthocyaninscolor_intensityhueod280/od315_of_diluted_winesprolineclass
014.231.712.4315.6127.02.803.060.282.295.641.043.921065.00
113.201.782.1411.2100.02.652.760.261.284.381.053.401050.00
213.162.362.6718.6101.02.803.240.302.815.681.033.171185.00
314.371.952.5016.8113.03.853.490.242.187.800.863.451480.00
413.242.592.8721.0118.02.802.690.391.824.321.042.93735.00
.............................................
17313.715.652.4520.595.01.680.610.521.067.700.641.74740.02
17413.403.912.4823.0102.01.800.750.431.417.300.701.56750.02
17513.274.282.2620.0120.01.590.690.431.3510.200.591.56835.02
17613.172.592.3720.0120.01.650.680.531.469.300.601.62840.02
17714.134.102.7424.596.02.050.760.561.359.200.611.60560.02
\n", + "

178 rows × 14 columns

\n", + "
" + ], + "text/plain": [ + " alcohol malic_acid ash alcalinity_of_ash magnesium total_phenols \\\n", + "0 14.23 1.71 2.43 15.6 127.0 2.80 \n", + "1 13.20 1.78 2.14 11.2 100.0 2.65 \n", + "2 13.16 2.36 2.67 18.6 101.0 2.80 \n", + "3 14.37 1.95 2.50 16.8 113.0 3.85 \n", + "4 13.24 2.59 2.87 21.0 118.0 2.80 \n", + ".. ... ... ... ... ... ... \n", + "173 13.71 5.65 2.45 20.5 95.0 1.68 \n", + "174 13.40 3.91 2.48 23.0 102.0 1.80 \n", + "175 13.27 4.28 2.26 20.0 120.0 1.59 \n", + "176 13.17 2.59 2.37 20.0 120.0 1.65 \n", + "177 14.13 4.10 2.74 24.5 96.0 2.05 \n", + "\n", + " flavanoids nonflavanoid_phenols proanthocyanins color_intensity hue \\\n", + "0 3.06 0.28 2.29 5.64 1.04 \n", + "1 2.76 0.26 1.28 4.38 1.05 \n", + "2 3.24 0.30 2.81 5.68 1.03 \n", + "3 3.49 0.24 2.18 7.80 0.86 \n", + "4 2.69 0.39 1.82 4.32 1.04 \n", + ".. ... ... ... ... ... \n", + "173 0.61 0.52 1.06 7.70 0.64 \n", + "174 0.75 0.43 1.41 7.30 0.70 \n", + "175 0.69 0.43 1.35 10.20 0.59 \n", + "176 0.68 0.53 1.46 9.30 0.60 \n", + "177 0.76 0.56 1.35 9.20 0.61 \n", + "\n", + " od280/od315_of_diluted_wines proline class \n", + "0 3.92 1065.0 0 \n", + "1 3.40 1050.0 0 \n", + "2 3.17 1185.0 0 \n", + "3 3.45 1480.0 0 \n", + "4 2.93 735.0 0 \n", + ".. ... ... ... \n", + "173 1.74 740.0 2 \n", + "174 1.56 750.0 2 \n", + "175 1.56 835.0 2 \n", + "176 1.62 840.0 2 \n", + "177 1.60 560.0 2 \n", + "\n", + "[178 rows x 14 columns]" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "from sklearn.datasets import load_wine\n", "\n", @@ -91,12 +369,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "56916892", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "178\n" + ] + } + ], "source": [ - "# Your answer here" + "# Your answer here\n", + "print(wine_df.shape[0])" ] }, { @@ -109,12 +396,42 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "id": "df0ef103", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 178 entries, 0 to 177\n", + "Data columns (total 14 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 alcohol 178 non-null float64\n", + " 1 malic_acid 178 non-null float64\n", + " 2 ash 178 non-null float64\n", + " 3 alcalinity_of_ash 178 non-null float64\n", + " 4 magnesium 178 non-null float64\n", + " 5 total_phenols 178 non-null float64\n", + " 6 flavanoids 178 non-null float64\n", + " 7 nonflavanoid_phenols 178 non-null float64\n", + " 8 proanthocyanins 178 non-null float64\n", + " 9 color_intensity 178 non-null float64\n", + " 10 hue 178 non-null float64\n", + " 11 od280/od315_of_diluted_wines 178 non-null float64\n", + " 12 proline 178 non-null float64\n", + " 13 class 178 non-null int64 \n", + "dtypes: float64(13), int64(1)\n", + "memory usage: 19.6 KB\n", + "None\n" + ] + } + ], "source": [ - "# Your answer here" + "# Your answer here\n", + "print(wine_df.info())" ] }, { @@ -127,12 +444,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "id": "47989426", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "int64\n", + "[0 1 2]\n" + ] + } + ], "source": [ - "# Your answer here" + "# Your answer here\n", + "print(wine_df['class'].dtype)\n", + "print(wine_df[\"class\"].unique())" ] }, { @@ -146,12 +474,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "id": "bd7b0910", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "13\n" + ] + } + ], "source": [ - "# Your answer here" + "# Your answer here\n", + "print(wine_df.shape[1]-1)" ] }, { @@ -175,10 +512,37 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "id": "cc899b59", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " alcohol malic_acid ash alcalinity_of_ash magnesium \\\n", + "0 1.518613 -0.562250 0.232053 -1.169593 1.913905 \n", + "1 0.246290 -0.499413 -0.827996 -2.490847 0.018145 \n", + "2 0.196879 0.021231 1.109334 -0.268738 0.088358 \n", + "3 1.691550 -0.346811 0.487926 -0.809251 0.930918 \n", + "4 0.295700 0.227694 1.840403 0.451946 1.281985 \n", + "\n", + " total_phenols flavanoids nonflavanoid_phenols proanthocyanins \\\n", + "0 0.808997 1.034819 -0.659563 1.224884 \n", + "1 0.568648 0.733629 -0.820719 -0.544721 \n", + "2 0.808997 1.215533 -0.498407 2.135968 \n", + "3 2.491446 1.466525 -0.981875 1.032155 \n", + "4 0.808997 0.663351 0.226796 0.401404 \n", + "\n", + " color_intensity hue od280/od315_of_diluted_wines proline \n", + "0 0.251717 0.362177 1.847920 1.013009 \n", + "1 -0.293321 0.406051 1.113449 0.965242 \n", + "2 0.269020 0.318304 0.788587 1.395148 \n", + "3 1.186068 -0.427544 1.184071 2.334574 \n", + "4 -0.319276 0.362177 0.449601 -0.037874 \n" + ] + } + ], "source": [ "# Select predictors (excluding the last column)\n", "predictors = wine_df.iloc[:, :-1]\n", @@ -204,7 +568,7 @@ "id": "403ef0bb", "metadata": {}, "source": [ - "> Your answer here..." + "> It is important for KNN because it is based on distance. Without standardization, it could incorrectly identify nearest neighbours. Therefore, standardization helps to ensure each feature is equal to the distance between wine samples" ] }, { @@ -220,7 +584,7 @@ "id": "fdee5a15", "metadata": {}, "source": [ - "> Your answer here..." + "> The variable \"class\" is categorical, therefore not quantities with meaningful magnitude" ] }, { @@ -236,7 +600,7 @@ "id": "f0676c21", "metadata": {}, "source": [ - "> Your answer here..." + "> It is to ensure that splitting of the data (training and testing) each time we run the code. No, the seed value does not matter because the value does not impact the model, but rather it is important to fix it to one value" ] }, { @@ -251,7 +615,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 28, "id": "72c101f2", "metadata": {}, "outputs": [], @@ -261,7 +625,10 @@ "\n", "# split the data into a training and testing set. hint: use train_test_split !\n", "\n", - "# Your code here ..." + "# Your code here ...\n", + "x_train, x_test, y_train, y_test = train_test_split(\n", + " predictors_standardized, wine_df[\"class\"], train_size = 0.75, shuffle = True, stratify= wine_df[\"class\"], random_state = 123\n", + ")" ] }, { @@ -284,12 +651,1011 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 45, "id": "08818c64", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
GridSearchCV(cv=10, estimator=KNeighborsClassifier(),\n",
+       "             param_grid={'n_neighbors': range(1, 51)})
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "GridSearchCV(cv=10, estimator=KNeighborsClassifier(),\n", + " param_grid={'n_neighbors': range(1, 51)})" + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "# Your code here..." + "# Your code here...\n", + "knn = KNeighborsClassifier()\n", + "parameter_grid = {\n", + " \"n_neighbors\" : range(1, 51)\n", + "}\n", + "wine_tune_grid = GridSearchCV(\n", + " estimator = knn,\n", + " param_grid = parameter_grid,\n", + " cv = 10 \n", + ")\n", + "wine_tune_grid.fit(x_train, y_train)" ] }, { @@ -305,12 +1671,26 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 46, "id": "ffefa9f2", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final Test Accuracy: 93.33%\n" + ] + } + ], "source": [ - "# Your code here..." + "# Your code here...\n", + "best_n_neighbors = wine_tune_grid.best_params_['n_neighbors']\n", + "knn_best = KNeighborsClassifier(n_neighbors = best_n_neighbors)\n", + "knn.fit(x_train, y_train)\n", + "y_pred = knn.predict(x_test)\n", + "final_accuracy = accuracy_score(y_test, y_pred)\n", + "print(f\"Final Test Accuracy: {final_accuracy:.2%}\")" ] }, { @@ -365,7 +1745,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.10.4", + "display_name": "lcr-env", "language": "python", "name": "python3" }, @@ -379,12 +1759,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.19" - }, - "vscode": { - "interpreter": { - "hash": "497a84dc8fec8cf8d24e7e87b6d954c9a18a327edc66feb9b9ea7e9e72cc5c7e" - } + "version": "3.11.15" } }, "nbformat": 4, From a78ed95042a5f630fa1cec31f95568b63556cc57 Mon Sep 17 00:00:00 2001 From: Aunima Date: Mon, 27 Apr 2026 12:43:49 -0400 Subject: [PATCH 4/4] assignment-1 --- 02_activities/assignments/assignment_1.ipynb | 1094 +----------------- 1 file changed, 38 insertions(+), 1056 deletions(-) diff --git a/02_activities/assignments/assignment_1.ipynb b/02_activities/assignments/assignment_1.ipynb index a2d793d1d..0422bee27 100644 --- a/02_activities/assignments/assignment_1.ipynb +++ b/02_activities/assignments/assignment_1.ipynb @@ -34,7 +34,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 8, "id": "4a3485d6-ba58-4660-a983-5680821c5719", "metadata": {}, "outputs": [], @@ -56,7 +56,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 9, "id": "a431d282-f9ca-4d5d-8912-71ffc9d8ea19", "metadata": {}, "outputs": [ @@ -291,49 +291,23 @@ "" ], "text/plain": [ - " alcohol malic_acid ash alcalinity_of_ash magnesium total_phenols \\\n", - "0 14.23 1.71 2.43 15.6 127.0 2.80 \n", - "1 13.20 1.78 2.14 11.2 100.0 2.65 \n", - "2 13.16 2.36 2.67 18.6 101.0 2.80 \n", - "3 14.37 1.95 2.50 16.8 113.0 3.85 \n", - "4 13.24 2.59 2.87 21.0 118.0 2.80 \n", - ".. ... ... ... ... ... ... \n", - "173 13.71 5.65 2.45 20.5 95.0 1.68 \n", - "174 13.40 3.91 2.48 23.0 102.0 1.80 \n", - "175 13.27 4.28 2.26 20.0 120.0 1.59 \n", - "176 13.17 2.59 2.37 20.0 120.0 1.65 \n", - "177 14.13 4.10 2.74 24.5 96.0 2.05 \n", - "\n", - " flavanoids nonflavanoid_phenols proanthocyanins color_intensity hue \\\n", - "0 3.06 0.28 2.29 5.64 1.04 \n", - "1 2.76 0.26 1.28 4.38 1.05 \n", - "2 3.24 0.30 2.81 5.68 1.03 \n", - "3 3.49 0.24 2.18 7.80 0.86 \n", - "4 2.69 0.39 1.82 4.32 1.04 \n", - ".. ... ... ... ... ... \n", - "173 0.61 0.52 1.06 7.70 0.64 \n", - "174 0.75 0.43 1.41 7.30 0.70 \n", - "175 0.69 0.43 1.35 10.20 0.59 \n", - "176 0.68 0.53 1.46 9.30 0.60 \n", - "177 0.76 0.56 1.35 9.20 0.61 \n", - "\n", - " od280/od315_of_diluted_wines proline class \n", - "0 3.92 1065.0 0 \n", - "1 3.40 1050.0 0 \n", - "2 3.17 1185.0 0 \n", - "3 3.45 1480.0 0 \n", - "4 2.93 735.0 0 \n", - ".. ... ... ... \n", - "173 1.74 740.0 2 \n", - "174 1.56 750.0 2 \n", - "175 1.56 835.0 2 \n", - "176 1.62 840.0 2 \n", - "177 1.60 560.0 2 \n", + " alcohol malic_acid ash ... od280/od315_of_diluted_wines proline class\n", + "0 14.23 1.71 2.43 ... 3.92 1065.0 0\n", + "1 13.20 1.78 2.14 ... 3.40 1050.0 0\n", + "2 13.16 2.36 2.67 ... 3.17 1185.0 0\n", + "3 14.37 1.95 2.50 ... 3.45 1480.0 0\n", + "4 13.24 2.59 2.87 ... 2.93 735.0 0\n", + ".. ... ... ... ... ... ... ...\n", + "173 13.71 5.65 2.45 ... 1.74 740.0 2\n", + "174 13.40 3.91 2.48 ... 1.56 750.0 2\n", + "175 13.27 4.28 2.26 ... 1.56 835.0 2\n", + "176 13.17 2.59 2.37 ... 1.62 840.0 2\n", + "177 14.13 4.10 2.74 ... 1.60 560.0 2\n", "\n", "[178 rows x 14 columns]" ] }, - "execution_count": 2, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -369,7 +343,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 10, "id": "56916892", "metadata": {}, "outputs": [ @@ -396,7 +370,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 11, "id": "df0ef103", "metadata": {}, "outputs": [ @@ -474,7 +448,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 13, "id": "bd7b0910", "metadata": {}, "outputs": [ @@ -512,7 +486,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 14, "id": "cc899b59", "metadata": {}, "outputs": [ @@ -520,26 +494,14 @@ "name": "stdout", "output_type": "stream", "text": [ - " alcohol malic_acid ash alcalinity_of_ash magnesium \\\n", - "0 1.518613 -0.562250 0.232053 -1.169593 1.913905 \n", - "1 0.246290 -0.499413 -0.827996 -2.490847 0.018145 \n", - "2 0.196879 0.021231 1.109334 -0.268738 0.088358 \n", - "3 1.691550 -0.346811 0.487926 -0.809251 0.930918 \n", - "4 0.295700 0.227694 1.840403 0.451946 1.281985 \n", + " alcohol malic_acid ... od280/od315_of_diluted_wines proline\n", + "0 1.518613 -0.562250 ... 1.847920 1.013009\n", + "1 0.246290 -0.499413 ... 1.113449 0.965242\n", + "2 0.196879 0.021231 ... 0.788587 1.395148\n", + "3 1.691550 -0.346811 ... 1.184071 2.334574\n", + "4 0.295700 0.227694 ... 0.449601 -0.037874\n", "\n", - " total_phenols flavanoids nonflavanoid_phenols proanthocyanins \\\n", - "0 0.808997 1.034819 -0.659563 1.224884 \n", - "1 0.568648 0.733629 -0.820719 -0.544721 \n", - "2 0.808997 1.215533 -0.498407 2.135968 \n", - "3 2.491446 1.466525 -0.981875 1.032155 \n", - "4 0.808997 0.663351 0.226796 0.401404 \n", - "\n", - " color_intensity hue od280/od315_of_diluted_wines proline \n", - "0 0.251717 0.362177 1.847920 1.013009 \n", - "1 -0.293321 0.406051 1.113449 0.965242 \n", - "2 0.269020 0.318304 0.788587 1.395148 \n", - "3 1.186068 -0.427544 1.184071 2.334574 \n", - "4 -0.319276 0.362177 0.449601 -0.037874 \n" + "[5 rows x 13 columns]\n" ] } ], @@ -568,7 +530,7 @@ "id": "403ef0bb", "metadata": {}, "source": [ - "> It is important for KNN because it is based on distance. Without standardization, it could incorrectly identify nearest neighbours. Therefore, standardization helps to ensure each feature is equal to the distance between wine samples" + "Without standardization, features with larger scales can dominate the distance and bias the identification of nearest neighbours. Standardization ensures that all features are on a similar scale, so each feature contributes fairly." ] }, { @@ -600,7 +562,7 @@ "id": "f0676c21", "metadata": {}, "source": [ - "> It is to ensure that splitting of the data (training and testing) each time we run the code. No, the seed value does not matter because the value does not impact the model, but rather it is important to fix it to one value" + "Setting a seed is important because it ensures that the random processes (like data splitting or random initialization) produce the same results each time the code is run, which makes experiments reproducible." ] }, { @@ -615,7 +577,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 15, "id": "72c101f2", "metadata": {}, "outputs": [], @@ -651,997 +613,16 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 21, "id": "08818c64", "metadata": {}, "outputs": [ { - "data": { - "text/html": [ - "
GridSearchCV(cv=10, estimator=KNeighborsClassifier(),\n",
-       "             param_grid={'n_neighbors': range(1, 51)})
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" - ], - "text/plain": [ - "GridSearchCV(cv=10, estimator=KNeighborsClassifier(),\n", - " param_grid={'n_neighbors': range(1, 51)})" - ] - }, - "execution_count": 45, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "{'n_neighbors': 7}\n" + ] } ], "source": [ @@ -1655,7 +636,8 @@ " param_grid = parameter_grid,\n", " cv = 10 \n", ")\n", - "wine_tune_grid.fit(x_train, y_train)" + "wine_tune_grid.fit(x_train, y_train)\n", + "print (wine_tune_grid.best_params_)" ] }, { @@ -1671,7 +653,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 17, "id": "ffefa9f2", "metadata": {}, "outputs": [