Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions Diabetes_Prediction/Diabetes_Prediction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand All @@ -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"
]
},
{
Expand All @@ -78,7 +97,7 @@
},
"outputs": [],
"source": [
"db = pd.read_csv(url)"
"db = pd.read_csv(filename)"
]
},
{
Expand Down Expand Up @@ -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"
]
}
],
Expand Down
5 changes: 3 additions & 2 deletions Diabetes_Prediction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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/)