Skip to content

Commit

Permalink
Merge pull request #19 from ZenBurrito/Tamiru
Browse files Browse the repository at this point in the history
The very final notebook
  • Loading branch information
Tamiru3 authored Jan 7, 2022
2 parents b026b3b + 326a630 commit 545a993
Showing 1 changed file with 9 additions and 25 deletions.
34 changes: 9 additions & 25 deletions Final_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"# <span style=\"font-size:1.5em;\"> Diagnosing Pediatric Pneumonia\n",
"X-ray image classifcation with Convolutional Neural Networks\n",
"\n",
"Authors: Colin Pelzer, Tamiru Renka, Daniel Burdeno"
"Authors: Colin Pelzer, Tamiru Berhanu-Denka, Daniel Burdeno"
]
},
{
Expand Down Expand Up @@ -1007,7 +1007,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"> The first cnn model resulted in an accuracy and recall score of 76.92% and 98.97% respectively.We have highest recall score but the accuracy is lower. Therefore, with the objective of improving the accuarcy score, we decided to run the second cnn model."
"> The first cnn model resulted in an accuracy and recall score of 76.92% and 98.97% respectively. While we still have a high recall score, the accuracy score incresed only a little bit. Therefore, with the objective of improving the accuracy score, we decided to run the second cnn model by adding \"Dropout\" to reduce overfitting."
]
},
{
Expand Down Expand Up @@ -1263,7 +1263,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"> In the second model the accuracy score decreased a little bit where as the recall score showed a slight increase.This probably is because we added another layer \"Dropout\" to mitiagate overfitting."
"> In the second CNN model the accuracy score slightly increased to 77.56%. However, the recall score had a very slight decrease. Based on the above metrics, this model is still heavily overfit. Since we are not satisficed by the accuracy score, we still wanted to run another model while maintaining the recall score. Hence, we decided to add additional convolutional layers in order to regularize and capture more information. We also added associated \"Pooling\" and \"Dropout\" layers."
]
},
{
Expand Down Expand Up @@ -1528,7 +1528,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
">On the thrid cnn model , the accuracy score increased to 80.93 % from 75.96% on the secod model. Whereas, the recall score reminas the same on both second and thrid cnn model at 99.23%."
"> On the third CNN model, the accuracy score dropped to 74.36 % from 77.56% on the second model. Whereas, the recall score slightly increased to 99.49% from 98.72% on the second model. Based on the metric curves shown above, we are trying to narrow the gap between the train and validation sets. We still wanted to improve the accuracy score and decided to perform data augmentation to capture more information on the training data set so as to better classify our testing set. We also added additional \"Dropout\" to reduce overfitting."
]
},
{
Expand Down Expand Up @@ -1794,7 +1794,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
">In order to increase our accuracy score, we used augmentd data and run another CNN model. The accuracy score incrased to 85.9% compared to the score from the thrid model.However, the recall score showed a decrease to 90.26% from 99.23%, such a slight decrease in the recall score is expected while using augmented data."
"> The use of augmented data has drastically improved our accuracy score to 88.78%. We did however see a minor decrease in the recall score to 95.90%. As a final attempt to improve either accuracy or recall score, we decided to investigate a slightly different activation function for the next model.\n"
]
},
{
Expand Down Expand Up @@ -2075,6 +2075,8 @@
}
],
"source": [
"# Creating a grouped bar chart comparing the baseline accuracy and recall with the final moodel. \n",
"\n",
"x = np.arange(2)\n",
"acc_scores = [base_acc, cnn5_acc]\n",
"prec_scores = [base_recall, cnn5_recall]\n",
Expand All @@ -2090,13 +2092,6 @@
"plt.savefig('Images/Comparison.png');"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -2108,11 +2103,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Comparing all the accuracy and recall socres form the models, the socre form the fifith model was selected sicne it showed the highest recall score of 99.23%. Thus, we recommend the Radiological society of North America to leaverage this information in the day to day x-ray evaluation of pediatric pneumonia. Application of this tool helps pediatiricians and radoilogists to classify pneumonic chest xray accurately 80.38% of the time and 99.23% of the time the physician could mimize the flase negative error. Maximum reduction of false negative errors helps to critically identify and treat childern with penumonia. This inturn helps to prevent the spread of pneumona of infectious origin.\n",
"\n",
"\n",
" \n",
"\n"
"Comparing all the accuracy and recall scores form the models, the score form the fifth model was selected since it showed the highest recall score of 98% while maintaining a high accuracy score of 87%. Thus, we recommend the Radiological society of North America to leverage this information in the day to day x-ray evaluation of pediatric pneumonia. Application of this tool helps pediatricians and radiologists to classify pneumonic chest x-ray accurately 87% of the time and 98% of the time the physician could minimize the false negative error. The best trade off between accuracy and recall scores was used to address the issue of false negative rate. Maximum reduction of false negative errors is critical to eliminate misdiagnosing patients with pneumonia as being healthy, which would lead to the child not receiving treatment. This in turn helps to prevent the spread of pneumonia of infectious origin. We recommend this model to be used as a first diagnostic step in identification of pediatric pneumonia."
]
},
{
Expand All @@ -2126,15 +2117,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"While mainining the recall score from our model, it is beneficial to improve the accuracy socre. Our next step is to run multiple models to improve the accuracy score."
"Processing another model following certain adjustments on the data with the goal of improving the recall and accuracy scores are always important to correctly classify images. Therefore, our next step will be getting more data with a better quality x-ray images from multiple sources. We also wanted to identify pneumonia based on causal agents and be able to classify between them. Further adjustment of hyperparameters could potentially increase both accuracy and recall scores. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 545a993

Please sign in to comment.