{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "provenance": [] }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" } }, "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "id": "wemygSdWlXBD" }, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "import numpy as np\n", "from sklearn.preprocessing import StandardScaler\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.metrics import accuracy_score, confusion_matrix\n", "from sklearn.linear_model import LogisticRegression\n", "from sklearn.neighbors import KNeighborsClassifier\n", "from sklearn.svm import SVC\n", "from sklearn.tree import DecisionTreeClassifier\n", "from sklearn.ensemble import BaggingClassifier\n", "from sklearn import tree" ] }, { "cell_type": "code", "source": [ "#dataset = pd.read_csv('/content/drive/MyDrive/kaggle/parkinsons.data')\n", "dataset = pd.read_csv(\"/content/drive/MyDrive/kaggle/parkinsons.data\", sep=',', index_col='name')" ], "metadata": { "id": "v_iY6YHglfoH" }, "execution_count": 2, "outputs": [] }, { "cell_type": "code", "source": [ "dataset.head()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 287 }, "id": "5keQIbnZm_CA", "outputId": "21e4d4d4-ac54-4c9c-d744-42bf4ecc7fa3" }, "execution_count": 3, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " MDVP:Fo(Hz) MDVP:Fhi(Hz) MDVP:Flo(Hz) MDVP:Jitter(%) \\\n", "name \n", "phon_R01_S01_1 119.992 157.302 74.997 0.00784 \n", "phon_R01_S01_2 122.400 148.650 113.819 0.00968 \n", "phon_R01_S01_3 116.682 131.111 111.555 0.01050 \n", "phon_R01_S01_4 116.676 137.871 111.366 0.00997 \n", "phon_R01_S01_5 116.014 141.781 110.655 0.01284 \n", "\n", " MDVP:Jitter(Abs) MDVP:RAP MDVP:PPQ Jitter:DDP \\\n", "name \n", "phon_R01_S01_1 0.00007 0.00370 0.00554 0.01109 \n", "phon_R01_S01_2 0.00008 0.00465 0.00696 0.01394 \n", "phon_R01_S01_3 0.00009 0.00544 0.00781 0.01633 \n", "phon_R01_S01_4 0.00009 0.00502 0.00698 0.01505 \n", "phon_R01_S01_5 0.00011 0.00655 0.00908 0.01966 \n", "\n", " MDVP:Shimmer MDVP:Shimmer(dB) ... Shimmer:DDA NHR \\\n", "name ... \n", "phon_R01_S01_1 0.04374 0.426 ... 0.06545 0.02211 \n", "phon_R01_S01_2 0.06134 0.626 ... 0.09403 0.01929 \n", "phon_R01_S01_3 0.05233 0.482 ... 0.08270 0.01309 \n", "phon_R01_S01_4 0.05492 0.517 ... 0.08771 0.01353 \n", "phon_R01_S01_5 0.06425 0.584 ... 0.10470 0.01767 \n", "\n", " HNR status RPDE DFA spread1 spread2 \\\n", "name \n", "phon_R01_S01_1 21.033 1 0.414783 0.815285 -4.813031 0.266482 \n", "phon_R01_S01_2 19.085 1 0.458359 0.819521 -4.075192 0.335590 \n", "phon_R01_S01_3 20.651 1 0.429895 0.825288 -4.443179 0.311173 \n", "phon_R01_S01_4 20.644 1 0.434969 0.819235 -4.117501 0.334147 \n", "phon_R01_S01_5 19.649 1 0.417356 0.823484 -3.747787 0.234513 \n", "\n", " D2 PPE \n", "name \n", "phon_R01_S01_1 2.301442 0.284654 \n", "phon_R01_S01_2 2.486855 0.368674 \n", "phon_R01_S01_3 2.342259 0.332634 \n", "phon_R01_S01_4 2.405554 0.368975 \n", "phon_R01_S01_5 2.332180 0.410335 \n", "\n", "[5 rows x 23 columns]" ], "text/html": [ "\n", "
\n", " | MDVP:Fo(Hz) | \n", "MDVP:Fhi(Hz) | \n", "MDVP:Flo(Hz) | \n", "MDVP:Jitter(%) | \n", "MDVP:Jitter(Abs) | \n", "MDVP:RAP | \n", "MDVP:PPQ | \n", "Jitter:DDP | \n", "MDVP:Shimmer | \n", "MDVP:Shimmer(dB) | \n", "... | \n", "Shimmer:DDA | \n", "NHR | \n", "HNR | \n", "status | \n", "RPDE | \n", "DFA | \n", "spread1 | \n", "spread2 | \n", "D2 | \n", "PPE | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
phon_R01_S01_1 | \n", "119.992 | \n", "157.302 | \n", "74.997 | \n", "0.00784 | \n", "0.00007 | \n", "0.00370 | \n", "0.00554 | \n", "0.01109 | \n", "0.04374 | \n", "0.426 | \n", "... | \n", "0.06545 | \n", "0.02211 | \n", "21.033 | \n", "1 | \n", "0.414783 | \n", "0.815285 | \n", "-4.813031 | \n", "0.266482 | \n", "2.301442 | \n", "0.284654 | \n", "
phon_R01_S01_2 | \n", "122.400 | \n", "148.650 | \n", "113.819 | \n", "0.00968 | \n", "0.00008 | \n", "0.00465 | \n", "0.00696 | \n", "0.01394 | \n", "0.06134 | \n", "0.626 | \n", "... | \n", "0.09403 | \n", "0.01929 | \n", "19.085 | \n", "1 | \n", "0.458359 | \n", "0.819521 | \n", "-4.075192 | \n", "0.335590 | \n", "2.486855 | \n", "0.368674 | \n", "
phon_R01_S01_3 | \n", "116.682 | \n", "131.111 | \n", "111.555 | \n", "0.01050 | \n", "0.00009 | \n", "0.00544 | \n", "0.00781 | \n", "0.01633 | \n", "0.05233 | \n", "0.482 | \n", "... | \n", "0.08270 | \n", "0.01309 | \n", "20.651 | \n", "1 | \n", "0.429895 | \n", "0.825288 | \n", "-4.443179 | \n", "0.311173 | \n", "2.342259 | \n", "0.332634 | \n", "
phon_R01_S01_4 | \n", "116.676 | \n", "137.871 | \n", "111.366 | \n", "0.00997 | \n", "0.00009 | \n", "0.00502 | \n", "0.00698 | \n", "0.01505 | \n", "0.05492 | \n", "0.517 | \n", "... | \n", "0.08771 | \n", "0.01353 | \n", "20.644 | \n", "1 | \n", "0.434969 | \n", "0.819235 | \n", "-4.117501 | \n", "0.334147 | \n", "2.405554 | \n", "0.368975 | \n", "
phon_R01_S01_5 | \n", "116.014 | \n", "141.781 | \n", "110.655 | \n", "0.01284 | \n", "0.00011 | \n", "0.00655 | \n", "0.00908 | \n", "0.01966 | \n", "0.06425 | \n", "0.584 | \n", "... | \n", "0.10470 | \n", "0.01767 | \n", "19.649 | \n", "1 | \n", "0.417356 | \n", "0.823484 | \n", "-3.747787 | \n", "0.234513 | \n", "2.332180 | \n", "0.410335 | \n", "
5 rows × 23 columns
\n", "