From ccada07ef8c7ce1d1b3e9e387a742c35217c50c7 Mon Sep 17 00:00:00 2001 From: Sachin Khote Date: Wed, 25 Oct 2023 19:47:02 +0530 Subject: [PATCH 1/4] Updated Diabetes_Prediction.ipynb and README.md --- Diabetes_Prediction/Diabetes_Prediction.ipynb | 31 +++++++++++++++---- Diabetes_Prediction/README.md | 2 +- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Diabetes_Prediction/Diabetes_Prediction.ipynb b/Diabetes_Prediction/Diabetes_Prediction.ipynb index a81a46a..c7ca041 100644 --- a/Diabetes_Prediction/Diabetes_Prediction.ipynb +++ b/Diabetes_Prediction/Diabetes_Prediction.ipynb @@ -45,8 +45,7 @@ "from sklearn.svm import SVC\n", "from sklearn.tree import DecisionTreeClassifier\n", "from sklearn.ensemble import RandomForestClassifier\n", - "from sklearn.ensemble import GradientBoostingClassifier\n", - "\n" + "from sklearn.ensemble import GradientBoostingClassifier" ] }, { @@ -65,9 +64,29 @@ "metadata": { "id": "oEUnWDaR71dL" }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "File 'downloaded_file.csv' has been downloaded.\n" + ] + } + ], "source": [ - "url='https://github.com/sachinkhote/Public_Dataset/raw/main/Diabetes%20Prediction.csv'" + "import requests\n", + "url='https://github.com/sachinkhote/Public_Dataset/raw/main/Diabetes%20Prediction.csv'\n", + "filename = 'downloaded_file.csv'\n", + "\n", + "response = requests.get(url)\n", + "\n", + "# Check if the request was successful\n", + "if response.status_code == 200:\n", + " with open(filename, 'wb') as file:\n", + " file.write(response.content)\n", + " print(f\"File '{filename}' has been downloaded.\")\n", + "else:\n", + " print(f\"Failed to download the file. Status code: {response.status_code}\")\n" ] }, { @@ -2150,8 +2169,8 @@ "The Test Accuracy of Logistic Regression:-\t76.62337662337663 %\n", "The Test Accuracy of KNeighbors Classifier:-\t76.62337662337663 %\n", "The Test Accuracy of SVC:-\t73.37662337662337 %\n", - "The Test Accuracy of Decision Tree Classifier:-\t69.48051948051948 %\n", - "The Test Accuracy of Random Forest Classifier:-\t77.27272727272727 %\n", + "The Test Accuracy of Decision Tree Classifier:-\t73.37662337662337 %\n", + "The Test Accuracy of Random Forest Classifier:-\t81.16883116883116 %\n", "The Test Accuracy of Gradient Boosting Classifier:-\t76.62337662337663 %\n" ] } diff --git a/Diabetes_Prediction/README.md b/Diabetes_Prediction/README.md index dfe5a29..7304f25 100644 --- a/Diabetes_Prediction/README.md +++ b/Diabetes_Prediction/README.md @@ -3,7 +3,7 @@ - **Author:** [Sachin Khote](https://github.com/sachinkhote) - **Example:** Diabetes Prediction - **Data Created:** 14/10/2023 -- **Last Modified:** 15/10/2023 +- **Last Modified:** 24/10/2023 # Diabetes Prediction Dataset From 29ffa7386a340151d58a8b37ecf30addde2245bc Mon Sep 17 00:00:00 2001 From: Sachin Khote Date: Wed, 25 Oct 2023 19:57:59 +0530 Subject: [PATCH 2/4] updated source link --- Diabetes_Prediction/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Diabetes_Prediction/README.md b/Diabetes_Prediction/README.md index 7304f25..2e61f7d 100644 --- a/Diabetes_Prediction/README.md +++ b/Diabetes_Prediction/README.md @@ -13,7 +13,7 @@ This dataset is designed for predicting diabetes based on various health paramet ## Dataset Information -- **Source**: [Diabetes Prediction Dataset](https://github.com/sachinkhote/Public_Dataset/raw/main/Diabetes%20Prediction.csv) +- **Source**: [Diabetes Prediction Dataset](https://github.com/sachinkhote/Public_Dataset/blob/main/Diabetes%20Prediction.csv) - **Format**: CSV - **Columns**: 1. **Pregnancies**: Number of times pregnant From 90296c7c1daf9da630bd414e4e3b21bcc4b99c3e Mon Sep 17 00:00:00 2001 From: Sachin Khote Date: Sat, 28 Oct 2023 12:57:00 +0530 Subject: [PATCH 3/4] changed filename in read_csv funtion --- Diabetes_Prediction/Diabetes_Prediction.ipynb | 8 ++++---- Diabetes_Prediction/README.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Diabetes_Prediction/Diabetes_Prediction.ipynb b/Diabetes_Prediction/Diabetes_Prediction.ipynb index c7ca041..dc2b1f7 100644 --- a/Diabetes_Prediction/Diabetes_Prediction.ipynb +++ b/Diabetes_Prediction/Diabetes_Prediction.ipynb @@ -97,7 +97,7 @@ }, "outputs": [], "source": [ - "db = pd.read_csv(url)" + "db = pd.read_csv(filename)" ] }, { @@ -2169,9 +2169,9 @@ "The Test Accuracy of Logistic Regression:-\t76.62337662337663 %\n", "The Test Accuracy of KNeighbors Classifier:-\t76.62337662337663 %\n", "The Test Accuracy of SVC:-\t73.37662337662337 %\n", - "The Test Accuracy of Decision Tree Classifier:-\t73.37662337662337 %\n", - "The Test Accuracy of Random Forest Classifier:-\t81.16883116883116 %\n", - "The Test Accuracy of Gradient Boosting Classifier:-\t76.62337662337663 %\n" + "The Test Accuracy of Decision Tree Classifier:-\t72.07792207792207 %\n", + "The Test Accuracy of Random Forest Classifier:-\t79.22077922077922 %\n", + "The Test Accuracy of Gradient Boosting Classifier:-\t75.97402597402598 %\n" ] } ], diff --git a/Diabetes_Prediction/README.md b/Diabetes_Prediction/README.md index 2e61f7d..88e4f43 100644 --- a/Diabetes_Prediction/README.md +++ b/Diabetes_Prediction/README.md @@ -3,7 +3,7 @@ - **Author:** [Sachin Khote](https://github.com/sachinkhote) - **Example:** Diabetes Prediction - **Data Created:** 14/10/2023 -- **Last Modified:** 24/10/2023 +- **Last Modified:** 28/10/2023 # Diabetes Prediction Dataset From 8ba192d370b09472d1f53c2f4ba3ba2313dc0141 Mon Sep 17 00:00:00 2001 From: Sachin Khote Date: Sat, 28 Oct 2023 13:00:40 +0530 Subject: [PATCH 4/4] Date updated --- Diabetes_Prediction/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Diabetes_Prediction/README.md b/Diabetes_Prediction/README.md index 88e4f43..8e4cdda 100644 --- a/Diabetes_Prediction/README.md +++ b/Diabetes_Prediction/README.md @@ -64,3 +64,4 @@ For general inquiries, you can contact us at: - **Email:** [Sachin khote](sachinkhote451@gmail.com) - **Linkedin:** [profile](https://www.linkedin.com/in/sachin-khote-195570277/) +