diff --git a/Diabetes_Prediction/Diabetes_Prediction.ipynb b/Diabetes_Prediction/Diabetes_Prediction.ipynb index a81a46a..dc2b1f7 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" ] }, { @@ -78,7 +97,7 @@ }, "outputs": [], "source": [ - "db = pd.read_csv(url)" + "db = pd.read_csv(filename)" ] }, { @@ -2150,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:-\t69.48051948051948 %\n", - "The Test Accuracy of Random Forest Classifier:-\t77.27272727272727 %\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 dfe5a29..8e4cdda 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:** 28/10/2023 # Diabetes Prediction Dataset @@ -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 @@ -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/) +