{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "In this lab, you’ll explore the breast cancer dataset and try to train the model to predict if the person is having breast cancer or not. We will start off with a weak learner, a decision tree with maximum depth = 2.\n", "\n", "We will then build an adaboost ensemble with 50 trees with a step of 3 and compare the performance with the weak learner.\n", "\n", "Let's get started by loading the libraries." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import numpy as np \n", "import pandas as pd \n", "import sklearn\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "\n", "from sklearn.cross_validation import train_test_split\n", "from sklearn.model_selection import KFold\n", "from sklearn.model_selection import GridSearchCV\n", "from sklearn.model_selection import cross_val_score\n", "from sklearn.preprocessing import LabelEncoder\n", "from sklearn.tree import DecisionTreeClassifier\n", "from sklearn.ensemble import AdaBoostClassifier\n", "from sklearn.ensemble import GradientBoostingClassifier\n", "from sklearn.datasets import load_breast_cancer\n", "from sklearn.datasets import load_digits\n", "from sklearn import metrics\n", "%matplotlib inline\n", "\n", "import os\n", "import warnings\n", "warnings.filterwarnings('ignore')\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We will use the breast cancer dataset in which the target variable has 1 if the person has cancer and 0 otherwise. Let's load the data." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "cancer = load_breast_cancer()\n", "digits = load_digits()\n", "\n", "data = cancer" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "df = pd.DataFrame(data= np.c_[data['data'], data['target']],\n", " columns= list(data['feature_names']) + ['target'])\n", "df['target'] = df['target'].astype('uint16')" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | mean radius | \n", "mean texture | \n", "mean perimeter | \n", "mean area | \n", "mean smoothness | \n", "mean compactness | \n", "mean concavity | \n", "mean concave points | \n", "mean symmetry | \n", "mean fractal dimension | \n", "... | \n", "worst texture | \n", "worst perimeter | \n", "worst area | \n", "worst smoothness | \n", "worst compactness | \n", "worst concavity | \n", "worst concave points | \n", "worst symmetry | \n", "worst fractal dimension | \n", "target | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "17.990 | \n", "10.38 | \n", "122.80 | \n", "1001.0 | \n", "0.11840 | \n", "0.27760 | \n", "0.300100 | \n", "0.147100 | \n", "0.2419 | \n", "0.07871 | \n", "... | \n", "17.33 | \n", "184.60 | \n", "2019.0 | \n", "0.16220 | \n", "0.66560 | \n", "0.71190 | \n", "0.26540 | \n", "0.4601 | \n", "0.11890 | \n", "0 | \n", "
1 | \n", "20.570 | \n", "17.77 | \n", "132.90 | \n", "1326.0 | \n", "0.08474 | \n", "0.07864 | \n", "0.086900 | \n", "0.070170 | \n", "0.1812 | \n", "0.05667 | \n", "... | \n", "23.41 | \n", "158.80 | \n", "1956.0 | \n", "0.12380 | \n", "0.18660 | \n", "0.24160 | \n", "0.18600 | \n", "0.2750 | \n", "0.08902 | \n", "0 | \n", "
2 | \n", "19.690 | \n", "21.25 | \n", "130.00 | \n", "1203.0 | \n", "0.10960 | \n", "0.15990 | \n", "0.197400 | \n", "0.127900 | \n", "0.2069 | \n", "0.05999 | \n", "... | \n", "25.53 | \n", "152.50 | \n", "1709.0 | \n", "0.14440 | \n", "0.42450 | \n", "0.45040 | \n", "0.24300 | \n", "0.3613 | \n", "0.08758 | \n", "0 | \n", "
3 | \n", "11.420 | \n", "20.38 | \n", "77.58 | \n", "386.1 | \n", "0.14250 | \n", "0.28390 | \n", "0.241400 | \n", "0.105200 | \n", "0.2597 | \n", "0.09744 | \n", "... | \n", "26.50 | \n", "98.87 | \n", "567.7 | \n", "0.20980 | \n", "0.86630 | \n", "0.68690 | \n", "0.25750 | \n", "0.6638 | \n", "0.17300 | \n", "0 | \n", "
4 | \n", "20.290 | \n", "14.34 | \n", "135.10 | \n", "1297.0 | \n", "0.10030 | \n", "0.13280 | \n", "0.198000 | \n", "0.104300 | \n", "0.1809 | \n", "0.05883 | \n", "... | \n", "16.67 | \n", "152.20 | \n", "1575.0 | \n", "0.13740 | \n", "0.20500 | \n", "0.40000 | \n", "0.16250 | \n", "0.2364 | \n", "0.07678 | \n", "0 | \n", "
5 | \n", "12.450 | \n", "15.70 | \n", "82.57 | \n", "477.1 | \n", "0.12780 | \n", "0.17000 | \n", "0.157800 | \n", "0.080890 | \n", "0.2087 | \n", "0.07613 | \n", "... | \n", "23.75 | \n", "103.40 | \n", "741.6 | \n", "0.17910 | \n", "0.52490 | \n", "0.53550 | \n", "0.17410 | \n", "0.3985 | \n", "0.12440 | \n", "0 | \n", "
6 | \n", "18.250 | \n", "19.98 | \n", "119.60 | \n", "1040.0 | \n", "0.09463 | \n", "0.10900 | \n", "0.112700 | \n", "0.074000 | \n", "0.1794 | \n", "0.05742 | \n", "... | \n", "27.66 | \n", "153.20 | \n", "1606.0 | \n", "0.14420 | \n", "0.25760 | \n", "0.37840 | \n", "0.19320 | \n", "0.3063 | \n", "0.08368 | \n", "0 | \n", "
7 | \n", "13.710 | \n", "20.83 | \n", "90.20 | \n", "577.9 | \n", "0.11890 | \n", "0.16450 | \n", "0.093660 | \n", "0.059850 | \n", "0.2196 | \n", "0.07451 | \n", "... | \n", "28.14 | \n", "110.60 | \n", "897.0 | \n", "0.16540 | \n", "0.36820 | \n", "0.26780 | \n", "0.15560 | \n", "0.3196 | \n", "0.11510 | \n", "0 | \n", "
8 | \n", "13.000 | \n", "21.82 | \n", "87.50 | \n", "519.8 | \n", "0.12730 | \n", "0.19320 | \n", "0.185900 | \n", "0.093530 | \n", "0.2350 | \n", "0.07389 | \n", "... | \n", "30.73 | \n", "106.20 | \n", "739.3 | \n", "0.17030 | \n", "0.54010 | \n", "0.53900 | \n", "0.20600 | \n", "0.4378 | \n", "0.10720 | \n", "0 | \n", "
9 | \n", "12.460 | \n", "24.04 | \n", "83.97 | \n", "475.9 | \n", "0.11860 | \n", "0.23960 | \n", "0.227300 | \n", "0.085430 | \n", "0.2030 | \n", "0.08243 | \n", "... | \n", "40.68 | \n", "97.65 | \n", "711.4 | \n", "0.18530 | \n", "1.05800 | \n", "1.10500 | \n", "0.22100 | \n", "0.4366 | \n", "0.20750 | \n", "0 | \n", "
10 | \n", "16.020 | \n", "23.24 | \n", "102.70 | \n", "797.8 | \n", "0.08206 | \n", "0.06669 | \n", "0.032990 | \n", "0.033230 | \n", "0.1528 | \n", "0.05697 | \n", "... | \n", "33.88 | \n", "123.80 | \n", "1150.0 | \n", "0.11810 | \n", "0.15510 | \n", "0.14590 | \n", "0.09975 | \n", "0.2948 | \n", "0.08452 | \n", "0 | \n", "
11 | \n", "15.780 | \n", "17.89 | \n", "103.60 | \n", "781.0 | \n", "0.09710 | \n", "0.12920 | \n", "0.099540 | \n", "0.066060 | \n", "0.1842 | \n", "0.06082 | \n", "... | \n", "27.28 | \n", "136.50 | \n", "1299.0 | \n", "0.13960 | \n", "0.56090 | \n", "0.39650 | \n", "0.18100 | \n", "0.3792 | \n", "0.10480 | \n", "0 | \n", "
12 | \n", "19.170 | \n", "24.80 | \n", "132.40 | \n", "1123.0 | \n", "0.09740 | \n", "0.24580 | \n", "0.206500 | \n", "0.111800 | \n", "0.2397 | \n", "0.07800 | \n", "... | \n", "29.94 | \n", "151.70 | \n", "1332.0 | \n", "0.10370 | \n", "0.39030 | \n", "0.36390 | \n", "0.17670 | \n", "0.3176 | \n", "0.10230 | \n", "0 | \n", "
13 | \n", "15.850 | \n", "23.95 | \n", "103.70 | \n", "782.7 | \n", "0.08401 | \n", "0.10020 | \n", "0.099380 | \n", "0.053640 | \n", "0.1847 | \n", "0.05338 | \n", "... | \n", "27.66 | \n", "112.00 | \n", "876.5 | \n", "0.11310 | \n", "0.19240 | \n", "0.23220 | \n", "0.11190 | \n", "0.2809 | \n", "0.06287 | \n", "0 | \n", "
14 | \n", "13.730 | \n", "22.61 | \n", "93.60 | \n", "578.3 | \n", "0.11310 | \n", "0.22930 | \n", "0.212800 | \n", "0.080250 | \n", "0.2069 | \n", "0.07682 | \n", "... | \n", "32.01 | \n", "108.80 | \n", "697.7 | \n", "0.16510 | \n", "0.77250 | \n", "0.69430 | \n", "0.22080 | \n", "0.3596 | \n", "0.14310 | \n", "0 | \n", "
15 | \n", "14.540 | \n", "27.54 | \n", "96.73 | \n", "658.8 | \n", "0.11390 | \n", "0.15950 | \n", "0.163900 | \n", "0.073640 | \n", "0.2303 | \n", "0.07077 | \n", "... | \n", "37.13 | \n", "124.10 | \n", "943.2 | \n", "0.16780 | \n", "0.65770 | \n", "0.70260 | \n", "0.17120 | \n", "0.4218 | \n", "0.13410 | \n", "0 | \n", "
16 | \n", "14.680 | \n", "20.13 | \n", "94.74 | \n", "684.5 | \n", "0.09867 | \n", "0.07200 | \n", "0.073950 | \n", "0.052590 | \n", "0.1586 | \n", "0.05922 | \n", "... | \n", "30.88 | \n", "123.40 | \n", "1138.0 | \n", "0.14640 | \n", "0.18710 | \n", "0.29140 | \n", "0.16090 | \n", "0.3029 | \n", "0.08216 | \n", "0 | \n", "
17 | \n", "16.130 | \n", "20.68 | \n", "108.10 | \n", "798.8 | \n", "0.11700 | \n", "0.20220 | \n", "0.172200 | \n", "0.102800 | \n", "0.2164 | \n", "0.07356 | \n", "... | \n", "31.48 | \n", "136.80 | \n", "1315.0 | \n", "0.17890 | \n", "0.42330 | \n", "0.47840 | \n", "0.20730 | \n", "0.3706 | \n", "0.11420 | \n", "0 | \n", "
18 | \n", "19.810 | \n", "22.15 | \n", "130.00 | \n", "1260.0 | \n", "0.09831 | \n", "0.10270 | \n", "0.147900 | \n", "0.094980 | \n", "0.1582 | \n", "0.05395 | \n", "... | \n", "30.88 | \n", "186.80 | \n", "2398.0 | \n", "0.15120 | \n", "0.31500 | \n", "0.53720 | \n", "0.23880 | \n", "0.2768 | \n", "0.07615 | \n", "0 | \n", "
19 | \n", "13.540 | \n", "14.36 | \n", "87.46 | \n", "566.3 | \n", "0.09779 | \n", "0.08129 | \n", "0.066640 | \n", "0.047810 | \n", "0.1885 | \n", "0.05766 | \n", "... | \n", "19.26 | \n", "99.70 | \n", "711.2 | \n", "0.14400 | \n", "0.17730 | \n", "0.23900 | \n", "0.12880 | \n", "0.2977 | \n", "0.07259 | \n", "1 | \n", "
20 | \n", "13.080 | \n", "15.71 | \n", "85.63 | \n", "520.0 | \n", "0.10750 | \n", "0.12700 | \n", "0.045680 | \n", "0.031100 | \n", "0.1967 | \n", "0.06811 | \n", "... | \n", "20.49 | \n", "96.09 | \n", "630.5 | \n", "0.13120 | \n", "0.27760 | \n", "0.18900 | \n", "0.07283 | \n", "0.3184 | \n", "0.08183 | \n", "1 | \n", "
21 | \n", "9.504 | \n", "12.44 | \n", "60.34 | \n", "273.9 | \n", "0.10240 | \n", "0.06492 | \n", "0.029560 | \n", "0.020760 | \n", "0.1815 | \n", "0.06905 | \n", "... | \n", "15.66 | \n", "65.13 | \n", "314.9 | \n", "0.13240 | \n", "0.11480 | \n", "0.08867 | \n", "0.06227 | \n", "0.2450 | \n", "0.07773 | \n", "1 | \n", "
22 | \n", "15.340 | \n", "14.26 | \n", "102.50 | \n", "704.4 | \n", "0.10730 | \n", "0.21350 | \n", "0.207700 | \n", "0.097560 | \n", "0.2521 | \n", "0.07032 | \n", "... | \n", "19.08 | \n", "125.10 | \n", "980.9 | \n", "0.13900 | \n", "0.59540 | \n", "0.63050 | \n", "0.23930 | \n", "0.4667 | \n", "0.09946 | \n", "0 | \n", "
23 | \n", "21.160 | \n", "23.04 | \n", "137.20 | \n", "1404.0 | \n", "0.09428 | \n", "0.10220 | \n", "0.109700 | \n", "0.086320 | \n", "0.1769 | \n", "0.05278 | \n", "... | \n", "35.59 | \n", "188.00 | \n", "2615.0 | \n", "0.14010 | \n", "0.26000 | \n", "0.31550 | \n", "0.20090 | \n", "0.2822 | \n", "0.07526 | \n", "0 | \n", "
24 | \n", "16.650 | \n", "21.38 | \n", "110.00 | \n", "904.6 | \n", "0.11210 | \n", "0.14570 | \n", "0.152500 | \n", "0.091700 | \n", "0.1995 | \n", "0.06330 | \n", "... | \n", "31.56 | \n", "177.00 | \n", "2215.0 | \n", "0.18050 | \n", "0.35780 | \n", "0.46950 | \n", "0.20950 | \n", "0.3613 | \n", "0.09564 | \n", "0 | \n", "
25 | \n", "17.140 | \n", "16.40 | \n", "116.00 | \n", "912.7 | \n", "0.11860 | \n", "0.22760 | \n", "0.222900 | \n", "0.140100 | \n", "0.3040 | \n", "0.07413 | \n", "... | \n", "21.40 | \n", "152.40 | \n", "1461.0 | \n", "0.15450 | \n", "0.39490 | \n", "0.38530 | \n", "0.25500 | \n", "0.4066 | \n", "0.10590 | \n", "0 | \n", "
26 | \n", "14.580 | \n", "21.53 | \n", "97.41 | \n", "644.8 | \n", "0.10540 | \n", "0.18680 | \n", "0.142500 | \n", "0.087830 | \n", "0.2252 | \n", "0.06924 | \n", "... | \n", "33.21 | \n", "122.40 | \n", "896.9 | \n", "0.15250 | \n", "0.66430 | \n", "0.55390 | \n", "0.27010 | \n", "0.4264 | \n", "0.12750 | \n", "0 | \n", "
27 | \n", "18.610 | \n", "20.25 | \n", "122.10 | \n", "1094.0 | \n", "0.09440 | \n", "0.10660 | \n", "0.149000 | \n", "0.077310 | \n", "0.1697 | \n", "0.05699 | \n", "... | \n", "27.26 | \n", "139.90 | \n", "1403.0 | \n", "0.13380 | \n", "0.21170 | \n", "0.34460 | \n", "0.14900 | \n", "0.2341 | \n", "0.07421 | \n", "0 | \n", "
28 | \n", "15.300 | \n", "25.27 | \n", "102.40 | \n", "732.4 | \n", "0.10820 | \n", "0.16970 | \n", "0.168300 | \n", "0.087510 | \n", "0.1926 | \n", "0.06540 | \n", "... | \n", "36.71 | \n", "149.30 | \n", "1269.0 | \n", "0.16410 | \n", "0.61100 | \n", "0.63350 | \n", "0.20240 | \n", "0.4027 | \n", "0.09876 | \n", "0 | \n", "
29 | \n", "17.570 | \n", "15.05 | \n", "115.00 | \n", "955.1 | \n", "0.09847 | \n", "0.11570 | \n", "0.098750 | \n", "0.079530 | \n", "0.1739 | \n", "0.06149 | \n", "... | \n", "19.52 | \n", "134.90 | \n", "1227.0 | \n", "0.12550 | \n", "0.28120 | \n", "0.24890 | \n", "0.14560 | \n", "0.2756 | \n", "0.07919 | \n", "0 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
539 | \n", "7.691 | \n", "25.44 | \n", "48.34 | \n", "170.4 | \n", "0.08668 | \n", "0.11990 | \n", "0.092520 | \n", "0.013640 | \n", "0.2037 | \n", "0.07751 | \n", "... | \n", "31.89 | \n", "54.49 | \n", "223.6 | \n", "0.15960 | \n", "0.30640 | \n", "0.33930 | \n", "0.05000 | \n", "0.2790 | \n", "0.10660 | \n", "1 | \n", "
540 | \n", "11.540 | \n", "14.44 | \n", "74.65 | \n", "402.9 | \n", "0.09984 | \n", "0.11200 | \n", "0.067370 | \n", "0.025940 | \n", "0.1818 | \n", "0.06782 | \n", "... | \n", "19.68 | \n", "78.78 | \n", "457.8 | \n", "0.13450 | \n", "0.21180 | \n", "0.17970 | \n", "0.06918 | \n", "0.2329 | \n", "0.08134 | \n", "1 | \n", "
541 | \n", "14.470 | \n", "24.99 | \n", "95.81 | \n", "656.4 | \n", "0.08837 | \n", "0.12300 | \n", "0.100900 | \n", "0.038900 | \n", "0.1872 | \n", "0.06341 | \n", "... | \n", "31.73 | \n", "113.50 | \n", "808.9 | \n", "0.13400 | \n", "0.42020 | \n", "0.40400 | \n", "0.12050 | \n", "0.3187 | \n", "0.10230 | \n", "1 | \n", "
542 | \n", "14.740 | \n", "25.42 | \n", "94.70 | \n", "668.6 | \n", "0.08275 | \n", "0.07214 | \n", "0.041050 | \n", "0.030270 | \n", "0.1840 | \n", "0.05680 | \n", "... | \n", "32.29 | \n", "107.40 | \n", "826.4 | \n", "0.10600 | \n", "0.13760 | \n", "0.16110 | \n", "0.10950 | \n", "0.2722 | \n", "0.06956 | \n", "1 | \n", "
543 | \n", "13.210 | \n", "28.06 | \n", "84.88 | \n", "538.4 | \n", "0.08671 | \n", "0.06877 | \n", "0.029870 | \n", "0.032750 | \n", "0.1628 | \n", "0.05781 | \n", "... | \n", "37.17 | \n", "92.48 | \n", "629.6 | \n", "0.10720 | \n", "0.13810 | \n", "0.10620 | \n", "0.07958 | \n", "0.2473 | \n", "0.06443 | \n", "1 | \n", "
544 | \n", "13.870 | \n", "20.70 | \n", "89.77 | \n", "584.8 | \n", "0.09578 | \n", "0.10180 | \n", "0.036880 | \n", "0.023690 | \n", "0.1620 | \n", "0.06688 | \n", "... | \n", "24.75 | \n", "99.17 | \n", "688.6 | \n", "0.12640 | \n", "0.20370 | \n", "0.13770 | \n", "0.06845 | \n", "0.2249 | \n", "0.08492 | \n", "1 | \n", "
545 | \n", "13.620 | \n", "23.23 | \n", "87.19 | \n", "573.2 | \n", "0.09246 | \n", "0.06747 | \n", "0.029740 | \n", "0.024430 | \n", "0.1664 | \n", "0.05801 | \n", "... | \n", "29.09 | \n", "97.58 | \n", "729.8 | \n", "0.12160 | \n", "0.15170 | \n", "0.10490 | \n", "0.07174 | \n", "0.2642 | \n", "0.06953 | \n", "1 | \n", "
546 | \n", "10.320 | \n", "16.35 | \n", "65.31 | \n", "324.9 | \n", "0.09434 | \n", "0.04994 | \n", "0.010120 | \n", "0.005495 | \n", "0.1885 | \n", "0.06201 | \n", "... | \n", "21.77 | \n", "71.12 | \n", "384.9 | \n", "0.12850 | \n", "0.08842 | \n", "0.04384 | \n", "0.02381 | \n", "0.2681 | \n", "0.07399 | \n", "1 | \n", "
547 | \n", "10.260 | \n", "16.58 | \n", "65.85 | \n", "320.8 | \n", "0.08877 | \n", "0.08066 | \n", "0.043580 | \n", "0.024380 | \n", "0.1669 | \n", "0.06714 | \n", "... | \n", "22.04 | \n", "71.08 | \n", "357.4 | \n", "0.14610 | \n", "0.22460 | \n", "0.17830 | \n", "0.08333 | \n", "0.2691 | \n", "0.09479 | \n", "1 | \n", "
548 | \n", "9.683 | \n", "19.34 | \n", "61.05 | \n", "285.7 | \n", "0.08491 | \n", "0.05030 | \n", "0.023370 | \n", "0.009615 | \n", "0.1580 | \n", "0.06235 | \n", "... | \n", "25.59 | \n", "69.10 | \n", "364.2 | \n", "0.11990 | \n", "0.09546 | \n", "0.09350 | \n", "0.03846 | \n", "0.2552 | \n", "0.07920 | \n", "1 | \n", "
549 | \n", "10.820 | \n", "24.21 | \n", "68.89 | \n", "361.6 | \n", "0.08192 | \n", "0.06602 | \n", "0.015480 | \n", "0.008160 | \n", "0.1976 | \n", "0.06328 | \n", "... | \n", "31.45 | \n", "83.90 | \n", "505.6 | \n", "0.12040 | \n", "0.16330 | \n", "0.06194 | \n", "0.03264 | \n", "0.3059 | \n", "0.07626 | \n", "1 | \n", "
550 | \n", "10.860 | \n", "21.48 | \n", "68.51 | \n", "360.5 | \n", "0.07431 | \n", "0.04227 | \n", "0.000000 | \n", "0.000000 | \n", "0.1661 | \n", "0.05948 | \n", "... | \n", "24.77 | \n", "74.08 | \n", "412.3 | \n", "0.10010 | \n", "0.07348 | \n", "0.00000 | \n", "0.00000 | \n", "0.2458 | \n", "0.06592 | \n", "1 | \n", "
551 | \n", "11.130 | \n", "22.44 | \n", "71.49 | \n", "378.4 | \n", "0.09566 | \n", "0.08194 | \n", "0.048240 | \n", "0.022570 | \n", "0.2030 | \n", "0.06552 | \n", "... | \n", "28.26 | \n", "77.80 | \n", "436.6 | \n", "0.10870 | \n", "0.17820 | \n", "0.15640 | \n", "0.06413 | \n", "0.3169 | \n", "0.08032 | \n", "1 | \n", "
552 | \n", "12.770 | \n", "29.43 | \n", "81.35 | \n", "507.9 | \n", "0.08276 | \n", "0.04234 | \n", "0.019970 | \n", "0.014990 | \n", "0.1539 | \n", "0.05637 | \n", "... | \n", "36.00 | \n", "88.10 | \n", "594.7 | \n", "0.12340 | \n", "0.10640 | \n", "0.08653 | \n", "0.06498 | \n", "0.2407 | \n", "0.06484 | \n", "1 | \n", "
553 | \n", "9.333 | \n", "21.94 | \n", "59.01 | \n", "264.0 | \n", "0.09240 | \n", "0.05605 | \n", "0.039960 | \n", "0.012820 | \n", "0.1692 | \n", "0.06576 | \n", "... | \n", "25.05 | \n", "62.86 | \n", "295.8 | \n", "0.11030 | \n", "0.08298 | \n", "0.07993 | \n", "0.02564 | \n", "0.2435 | \n", "0.07393 | \n", "1 | \n", "
554 | \n", "12.880 | \n", "28.92 | \n", "82.50 | \n", "514.3 | \n", "0.08123 | \n", "0.05824 | \n", "0.061950 | \n", "0.023430 | \n", "0.1566 | \n", "0.05708 | \n", "... | \n", "35.74 | \n", "88.84 | \n", "595.7 | \n", "0.12270 | \n", "0.16200 | \n", "0.24390 | \n", "0.06493 | \n", "0.2372 | \n", "0.07242 | \n", "1 | \n", "
555 | \n", "10.290 | \n", "27.61 | \n", "65.67 | \n", "321.4 | \n", "0.09030 | \n", "0.07658 | \n", "0.059990 | \n", "0.027380 | \n", "0.1593 | \n", "0.06127 | \n", "... | \n", "34.91 | \n", "69.57 | \n", "357.6 | \n", "0.13840 | \n", "0.17100 | \n", "0.20000 | \n", "0.09127 | \n", "0.2226 | \n", "0.08283 | \n", "1 | \n", "
556 | \n", "10.160 | \n", "19.59 | \n", "64.73 | \n", "311.7 | \n", "0.10030 | \n", "0.07504 | \n", "0.005025 | \n", "0.011160 | \n", "0.1791 | \n", "0.06331 | \n", "... | \n", "22.88 | \n", "67.88 | \n", "347.3 | \n", "0.12650 | \n", "0.12000 | \n", "0.01005 | \n", "0.02232 | \n", "0.2262 | \n", "0.06742 | \n", "1 | \n", "
557 | \n", "9.423 | \n", "27.88 | \n", "59.26 | \n", "271.3 | \n", "0.08123 | \n", "0.04971 | \n", "0.000000 | \n", "0.000000 | \n", "0.1742 | \n", "0.06059 | \n", "... | \n", "34.24 | \n", "66.50 | \n", "330.6 | \n", "0.10730 | \n", "0.07158 | \n", "0.00000 | \n", "0.00000 | \n", "0.2475 | \n", "0.06969 | \n", "1 | \n", "
558 | \n", "14.590 | \n", "22.68 | \n", "96.39 | \n", "657.1 | \n", "0.08473 | \n", "0.13300 | \n", "0.102900 | \n", "0.037360 | \n", "0.1454 | \n", "0.06147 | \n", "... | \n", "27.27 | \n", "105.90 | \n", "733.5 | \n", "0.10260 | \n", "0.31710 | \n", "0.36620 | \n", "0.11050 | \n", "0.2258 | \n", "0.08004 | \n", "1 | \n", "
559 | \n", "11.510 | \n", "23.93 | \n", "74.52 | \n", "403.5 | \n", "0.09261 | \n", "0.10210 | \n", "0.111200 | \n", "0.041050 | \n", "0.1388 | \n", "0.06570 | \n", "... | \n", "37.16 | \n", "82.28 | \n", "474.2 | \n", "0.12980 | \n", "0.25170 | \n", "0.36300 | \n", "0.09653 | \n", "0.2112 | \n", "0.08732 | \n", "1 | \n", "
560 | \n", "14.050 | \n", "27.15 | \n", "91.38 | \n", "600.4 | \n", "0.09929 | \n", "0.11260 | \n", "0.044620 | \n", "0.043040 | \n", "0.1537 | \n", "0.06171 | \n", "... | \n", "33.17 | \n", "100.20 | \n", "706.7 | \n", "0.12410 | \n", "0.22640 | \n", "0.13260 | \n", "0.10480 | \n", "0.2250 | \n", "0.08321 | \n", "1 | \n", "
561 | \n", "11.200 | \n", "29.37 | \n", "70.67 | \n", "386.0 | \n", "0.07449 | \n", "0.03558 | \n", "0.000000 | \n", "0.000000 | \n", "0.1060 | \n", "0.05502 | \n", "... | \n", "38.30 | \n", "75.19 | \n", "439.6 | \n", "0.09267 | \n", "0.05494 | \n", "0.00000 | \n", "0.00000 | \n", "0.1566 | \n", "0.05905 | \n", "1 | \n", "
562 | \n", "15.220 | \n", "30.62 | \n", "103.40 | \n", "716.9 | \n", "0.10480 | \n", "0.20870 | \n", "0.255000 | \n", "0.094290 | \n", "0.2128 | \n", "0.07152 | \n", "... | \n", "42.79 | \n", "128.70 | \n", "915.0 | \n", "0.14170 | \n", "0.79170 | \n", "1.17000 | \n", "0.23560 | \n", "0.4089 | \n", "0.14090 | \n", "0 | \n", "
563 | \n", "20.920 | \n", "25.09 | \n", "143.00 | \n", "1347.0 | \n", "0.10990 | \n", "0.22360 | \n", "0.317400 | \n", "0.147400 | \n", "0.2149 | \n", "0.06879 | \n", "... | \n", "29.41 | \n", "179.10 | \n", "1819.0 | \n", "0.14070 | \n", "0.41860 | \n", "0.65990 | \n", "0.25420 | \n", "0.2929 | \n", "0.09873 | \n", "0 | \n", "
564 | \n", "21.560 | \n", "22.39 | \n", "142.00 | \n", "1479.0 | \n", "0.11100 | \n", "0.11590 | \n", "0.243900 | \n", "0.138900 | \n", "0.1726 | \n", "0.05623 | \n", "... | \n", "26.40 | \n", "166.10 | \n", "2027.0 | \n", "0.14100 | \n", "0.21130 | \n", "0.41070 | \n", "0.22160 | \n", "0.2060 | \n", "0.07115 | \n", "0 | \n", "
565 | \n", "20.130 | \n", "28.25 | \n", "131.20 | \n", "1261.0 | \n", "0.09780 | \n", "0.10340 | \n", "0.144000 | \n", "0.097910 | \n", "0.1752 | \n", "0.05533 | \n", "... | \n", "38.25 | \n", "155.00 | \n", "1731.0 | \n", "0.11660 | \n", "0.19220 | \n", "0.32150 | \n", "0.16280 | \n", "0.2572 | \n", "0.06637 | \n", "0 | \n", "
566 | \n", "16.600 | \n", "28.08 | \n", "108.30 | \n", "858.1 | \n", "0.08455 | \n", "0.10230 | \n", "0.092510 | \n", "0.053020 | \n", "0.1590 | \n", "0.05648 | \n", "... | \n", "34.12 | \n", "126.70 | \n", "1124.0 | \n", "0.11390 | \n", "0.30940 | \n", "0.34030 | \n", "0.14180 | \n", "0.2218 | \n", "0.07820 | \n", "0 | \n", "
567 | \n", "20.600 | \n", "29.33 | \n", "140.10 | \n", "1265.0 | \n", "0.11780 | \n", "0.27700 | \n", "0.351400 | \n", "0.152000 | \n", "0.2397 | \n", "0.07016 | \n", "... | \n", "39.42 | \n", "184.60 | \n", "1821.0 | \n", "0.16500 | \n", "0.86810 | \n", "0.93870 | \n", "0.26500 | \n", "0.4087 | \n", "0.12400 | \n", "0 | \n", "
568 | \n", "7.760 | \n", "24.54 | \n", "47.92 | \n", "181.0 | \n", "0.05263 | \n", "0.04362 | \n", "0.000000 | \n", "0.000000 | \n", "0.1587 | \n", "0.05884 | \n", "... | \n", "30.37 | \n", "59.16 | \n", "268.6 | \n", "0.08996 | \n", "0.06444 | \n", "0.00000 | \n", "0.00000 | \n", "0.2871 | \n", "0.07039 | \n", "1 | \n", "
569 rows × 31 columns
\n", "\n", " | mean radius | \n", "mean texture | \n", "mean perimeter | \n", "mean area | \n", "mean smoothness | \n", "mean compactness | \n", "mean concavity | \n", "mean concave points | \n", "mean symmetry | \n", "mean fractal dimension | \n", "... | \n", "worst texture | \n", "worst perimeter | \n", "worst area | \n", "worst smoothness | \n", "worst compactness | \n", "worst concavity | \n", "worst concave points | \n", "worst symmetry | \n", "worst fractal dimension | \n", "target | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "17.99 | \n", "10.38 | \n", "122.80 | \n", "1001.0 | \n", "0.11840 | \n", "0.27760 | \n", "0.3001 | \n", "0.14710 | \n", "0.2419 | \n", "0.07871 | \n", "... | \n", "17.33 | \n", "184.60 | \n", "2019.0 | \n", "0.1622 | \n", "0.6656 | \n", "0.7119 | \n", "0.2654 | \n", "0.4601 | \n", "0.11890 | \n", "0 | \n", "
1 | \n", "20.57 | \n", "17.77 | \n", "132.90 | \n", "1326.0 | \n", "0.08474 | \n", "0.07864 | \n", "0.0869 | \n", "0.07017 | \n", "0.1812 | \n", "0.05667 | \n", "... | \n", "23.41 | \n", "158.80 | \n", "1956.0 | \n", "0.1238 | \n", "0.1866 | \n", "0.2416 | \n", "0.1860 | \n", "0.2750 | \n", "0.08902 | \n", "0 | \n", "
2 | \n", "19.69 | \n", "21.25 | \n", "130.00 | \n", "1203.0 | \n", "0.10960 | \n", "0.15990 | \n", "0.1974 | \n", "0.12790 | \n", "0.2069 | \n", "0.05999 | \n", "... | \n", "25.53 | \n", "152.50 | \n", "1709.0 | \n", "0.1444 | \n", "0.4245 | \n", "0.4504 | \n", "0.2430 | \n", "0.3613 | \n", "0.08758 | \n", "0 | \n", "
3 | \n", "11.42 | \n", "20.38 | \n", "77.58 | \n", "386.1 | \n", "0.14250 | \n", "0.28390 | \n", "0.2414 | \n", "0.10520 | \n", "0.2597 | \n", "0.09744 | \n", "... | \n", "26.50 | \n", "98.87 | \n", "567.7 | \n", "0.2098 | \n", "0.8663 | \n", "0.6869 | \n", "0.2575 | \n", "0.6638 | \n", "0.17300 | \n", "0 | \n", "
4 | \n", "20.29 | \n", "14.34 | \n", "135.10 | \n", "1297.0 | \n", "0.10030 | \n", "0.13280 | \n", "0.1980 | \n", "0.10430 | \n", "0.1809 | \n", "0.05883 | \n", "... | \n", "16.67 | \n", "152.20 | \n", "1575.0 | \n", "0.1374 | \n", "0.2050 | \n", "0.4000 | \n", "0.1625 | \n", "0.2364 | \n", "0.07678 | \n", "0 | \n", "
5 rows × 31 columns
\n", "