Notebook Styling: Please do not edit
1. Helper Functions
1.1 Confusion Matrix
Confusion matrices are an important toolkit in every data scientist's box. We have created a function for you that you can use to create visual confusion matrices and analyze your models.
1.2 Metrics Calculation
We are giving you a function that will calculate all the metrics you'll need in order to analyze your model
1.3 Kaggle Predictions
1.4 Top n% accuracy
2. Data Loading
2.1 Loading File Paths
We will first load file paths from normal and pneumonia folders in the train directory.
2.2 Loading Image Data
2.2.1 Training and Validation
2.2.2 Kaggle Testing Data
2.3 Data Splitting into Training and Validation
3. Deep Learning Models
We will use keras to create deep learning models. Since we are dealing with images, we will use convolutional layers. For more details, please visit: https://keras.io/layers/convolutional/
3.1 Parameterized Convolutional Neural Networks
We will first provide you with a simple function that takes in a few parameters and create a convolutional neural network model for you. This is the easiest way to create a CNN model.
3.2 More Nuanced Convolutional Neural Networks
In this section, we provide you with a function where you can edit tiny details of the model to see if it can give you a greater lift as compared to the parameterized model.
4. Model Training
4.1 Data Augmentation
Deep learning models require huge amounts of data for good performance. Since we only have around 5k examples, we will use what's called "Data Augmentation" to create more data. To read more on data augmentation, please visit: https://towardsdatascience.com/data-augmentation-for-deep-learning-4fe21d1a4eb9