-
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1dfedb7
commit 40c8313
Showing
11 changed files
with
7,692 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
Critically Ill Patients Analysis and Prediction/Dataset/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Critically Ill Patients Dataset | ||
|
||
The Dataset used here is taken from the Kaggle database website. You can download the file from the link given here, [Critically Ill Patients Analysis and Prediction](https://www.kaggle.com/datasets/margaritakholostova/support-ii-dataset-with-critically-ill-patients) | ||
|
||
## About the dataset | ||
|
||
There are 2 types of datasets: | ||
|
||
- `columns_descriptions`: This dataset contains the description of all the features. | ||
- `support2`: This dataset contains 9105 entries with 47 different features. | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+887 KB
Critically Ill Patients Analysis and Prediction/Images/correlation_heatmap.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+55.1 KB
Critically Ill Patients Analysis and Prediction/Images/diabetes_plot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+57.6 KB
Critically Ill Patients Analysis and Prediction/Images/urine_plot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,586 changes: 7,586 additions & 0 deletions
7,586
...ients Analysis and Prediction/Model/critically_ill_patients_analysis_and_prediction.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<h1>Critically Ill Patients Analysis and Prediction</h1> | ||
|
||
**GOAL** | ||
|
||
To build a machine learning model for predicting the patient survival rate or probability. | ||
|
||
**DATASET** | ||
|
||
https://www.kaggle.com/datasets/margaritakholostova/support-ii-dataset-with-critically-ill-patients | ||
|
||
**DESCRIPTION** | ||
|
||
To analyze the dataset of Critically Ill Patients and build and train the model on the basis of different features and variables. | ||
|
||
There are 2 types of datasets: | ||
|
||
- `columns_descriptions`: This dataset contains the description of all the features. | ||
- `support2`: This dataset contains 9105 entries with 47 different features. | ||
|
||
|
||
### Visualization and EDA of different attributes: | ||
|
||
<img alt="heatmap" src="./Images/correlation_heatmap.jpg"> | ||
|
||
<img alt="graph" src="./Images/age_plot.jpg"> | ||
|
||
<img alt="graph" src="./Images/diabetes_plot.jpg"> | ||
|
||
<img alt="graph" src="./Images/dnr_plot.jpg"> | ||
|
||
<img alt="graph" src="./Images/edu_plot.jpg"> | ||
|
||
<img alt="graph" src="./Images/temp_plot.jpg"> | ||
|
||
<img alt="graph" src="./Images/urine_plot.jpg"> | ||
|
||
|
||
**MODELS USED** | ||
|
||
| Model | MSE_train | R2_train | MSE_test | R2_test | | ||
|---------------------------|-----------|----------|-----------|-----------| | ||
| Random Forest Regression | 9.52 | 0.88 | 66.02 | 0.14 | | ||
| XG Boost Regression | 12.08 | 0.82 | 72.75 | 0.08 | | ||
| Linear Regression | 76.54 | 0.07 | 74.91 | 0.06 | | ||
| Ridge Regression | 76.54 | 0.07 | 74.91 | 0.06 | | ||
| Elastic Net Regression | 77.70 | 0.03 | 75.98 | 0.03 | | ||
| Decision Tree Regression | 0.00 | 1.00 | 127.30 | -0.68 | | ||
| Deep NN | 211.83 | -2.24 | 201.13 | -2.35 | | ||
|
||
|
||
**WHAT I HAD DONE** | ||
|
||
* Load the dataset which contains 9105 entries in it and having 47 columns in it. | ||
* Checked for missing values and cleaned the data accordingly. | ||
* Analyzed the data, found insights and visualized them accordingly. | ||
* Plotting heatmap using correlation and checking the relation between different features. | ||
* Found detailed insights of different columns with target variable using plotting libraries. | ||
* Train the datasets by different models and saves their accuracies into a dataframe. | ||
|
||
|
||
**LIBRARIES NEEDED** | ||
|
||
1. Pandas | ||
2. Matplotlib | ||
3. Sklearn | ||
4. NumPy | ||
5. XGBoost | ||
6. Tensorflow | ||
7. Keras | ||
8. Sci-py | ||
9. Seaborn | ||
|
||
|
||
**CONCLUSION** | ||
|
||
- Random Forest and XG Boost Regression models show promising performance with lower MSE and higher R2 values. | ||
- Decision Tree Regression achieved perfect R2 on the training set but performed poorly on the test set, indicating overfitting. | ||
- Deep Neural Network (NN) has a high MSE and negative R2, suggesting poor performance on both training and test sets. | ||
|
||
|
||
**YOUR NAME** | ||
|
||
*Avdhesh Varshney* | ||
|
||
[![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/avdhesh-varshney-5314a4233/) [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/Avdhesh-Varshney) | ||
|
9 changes: 9 additions & 0 deletions
9
Critically Ill Patients Analysis and Prediction/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
numpy==1.19.2 | ||
pandas==1.4.3 | ||
matplotlib==3.7.1 | ||
scikit-learn~=1.0.2 | ||
scipy==1.5.0 | ||
seaborn==0.10.1 | ||
xgboost~=1.5.2 | ||
tensorflow==2.4.1 | ||
keras==2.4.0 |