Last Updated: 06/09/24
Outstanding Tasks
- None
Index
- Analysis Goal
- Modeling
- Simple feed-forward neural network
- Feed-forward neural network with data augmentation
- Convolutional neural network with data augmentation
Classify handwritten digits from the MNIST database
98.44% Accuracy
A fully connected neural network, taking a 28x28 greyscale image input, flattening, passing it through three hidden dense layers with ReLU activation, outputing a probability distribution over 10 classes using softmax activation:
Model Architecture
- Input: (28, 28, 1)
- Flatten: (784)
- Dense: (784) to (512), ReLU
- Dense: (512) to (256), ReLU
- Dense: (256) to (128), ReLU
- Output Dense: (128) to (10), softmax
The model was compiled with Adam optimizer, categorical cross-entropy loss, and accuracy as the evaluation metric. The model was trained for 20 epochs.
98.71% Accuracy
Using the same neural network described above, data augmentation is applied to improve the model's generalizability:
Data Augmentation
- Rotation: Randomly rotate up to 10 degrees
- Zoom: Randomly zoom in up to 10%
- Width shift: Randomly shift horizontally up to 10% of width
- Height shift: Randomly shift vertically up to 10% of height
The model was compiled with Adam optimizer, categorical cross-entropy loss, and accuracy as the evaluation metric. The model was trained for 20 epochs.
99.43% Accuracy
A convolutional neural network (CNN), taking a 28x28 grayscale image input, processing it through several convolutional and pooling layers, followed by dense layers, and outputing a probability distribution over 10 classes using softmax activation. Data augmentation is applied to the training data to improve the model's generalization. The same data augmentation applied to the feed-forward neural network was used to improve the model's generalizability:
Model Architecture
- Input: (28, 28, 1), Conv2D with 32 filters, kernel size (3, 3), ReLU
- MaxPooling2D: Pool size (2, 2)
- Conv2D: 64 filters, kernel size (3, 3), ReLU
- MaxPooling2D: Pool size (2, 2)
- Conv2D: 64 filters, kernel size (3, 3), ReLU
- Flatten: (None, 64)
- Dense: (64) to (128), ReLU
- Droupout Layer: Regularization rate 0.50
- Output Dense: (128) to (10), softmax
The model was compiled with Adam optimizer, categorical cross-entropy loss, and accuracy as the evaluation metric. The model was trained for 20 epochs.