-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #482 from mbeps/updates
Added new university projects
- Loading branch information
Showing
10 changed files
with
299 additions
and
100 deletions.
There are no files selected for viewing
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
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,66 @@ | ||
## Network Architecture | ||
The network follows a progressive deepening structure, with each block increasing in complexity to learn more sophisticated features. | ||
|
||
### Block 1 | ||
- Two Conv2D layers (32 filters, 3×3 kernel) - Captures basic edges and shapes | ||
- BatchNormalisation after each Conv2D - Stabilises training | ||
- MaxPooling (2×2) - Reduces spatial dimensions and computational load | ||
- SpatialDropout2D (20%) - Prevents feature map co-adaptation | ||
|
||
### Block 2 | ||
- Two Conv2D layers (96 filters, 3×3 kernel) - Learns intermediate-level patterns | ||
- BatchNormalisation after each Conv2D - Maintains consistent feature scaling | ||
- MaxPooling (2×2) - Further dimension reduction | ||
- SpatialDropout2D (20%) - Continues regularisation | ||
|
||
### Block 3 | ||
- Two Conv2D layers (128 filters, 3×3 kernel, 'same' padding) - Identifies complex digit features | ||
- BatchNormalisation after each Conv2D - Normalises deeper features | ||
- MaxPooling (2×2) - Final spatial reduction | ||
- SpatialDropout2D (20%) - Ensures robust feature learning | ||
|
||
### Dense Layers | ||
- Flatten layer - Converts 2D features to 1D | ||
- Dense layer (1050 units) with L2 regularisation - Rich feature combination | ||
- BatchNormalisation - Stabilises deep network training | ||
- Dropout (50%) - Prevents overfitting | ||
- Output layer (10 units, softmax) - Produces digit probabilities | ||
|
||
## Data Augmentation | ||
|
||
### Static Augmentation (Albumentations) | ||
- ElasticTransform - Simulates natural handwriting deformations | ||
- GaussNoise - Adds resilience to image noise | ||
- CoarseDropout - Improves robustness to missing parts | ||
- RandomBrightnessContrast - Handles varying image qualities | ||
- Image Inversion - Adapts to different digit colours | ||
|
||
### Real-time Augmentation (ImageDataGenerator) | ||
- Rotation - Handles tilted handwriting | ||
- Width/Height shifts - Accounts for different digit positions | ||
- Zoom range - Manages varying digit sizes | ||
|
||
## Training Strategy | ||
|
||
### Optimisation | ||
- Adam optimiser with gradient clipping - Prevents explosive gradients | ||
- Initial learning rate: 1e-3 - Balanced between speed and stability | ||
- Batch size: 384 - Provides stable gradient estimates | ||
|
||
### Training Callbacks | ||
- Early Stopping - Prevents overfitting by monitoring validation loss | ||
- Model Checkpoint - Preserves best model during training | ||
- ReduceLROnPlateau - Adapts learning rate when progress plateaus | ||
|
||
### Regularisation Techniques | ||
- BatchNormalisation - Stabilises training throughout the network | ||
- SpatialDropout2D - Specifically designed for convolutional features | ||
- Standard Dropout - Prevents dense layer overfitting | ||
- L2 regularisation - Controls weight growth | ||
|
||
## Dataset Management | ||
- Multiple dataset combination - Increases training diversity | ||
- Image standardisation (28×28) - Ensures consistent input size | ||
- Value normalisation [0,1] - Stabilises network training | ||
- 90-10 split - Provides sufficient validation data | ||
- Fixed random seed - Ensures reproducible results |
Binary file added
BIN
+97.1 KB
public/projects/machine-learning-pacman-classifier-coursework/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions
35
public/projects/machine-learning-pacman-classifier-coursework/features.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,35 @@ | ||
## Core Classification Architecture | ||
- Feed-forward neural network with configurable hidden layers | ||
- ReLU activation functions for hidden layers | ||
- Softmax output layer for 4-class movement prediction | ||
- He initialisation for weights | ||
|
||
## Optimisation Techniques | ||
- Mini-batch gradient descent | ||
- Momentum-based updates with velocity tracking | ||
- Inverse scaling learning rate decay | ||
- L2 regularisation | ||
- Gradient clipping with norm thresholding | ||
|
||
## Regularisation Methods | ||
- Batch Normalisation | ||
- Running mean/variance tracking | ||
- Learnable scale (gamma) and shift (beta) parameters | ||
- Training/inference mode handling | ||
- Dropout | ||
- Inverted dropout scaling | ||
- Configurable dropout rate | ||
|
||
## Training Management | ||
- Early stopping with validation monitoring | ||
- Automatic hyperparameter optimisation via grid search | ||
- Train/validation/test split (80/10/10) | ||
- Best model checkpointing | ||
|
||
## Implementation Features | ||
- Type hints throughout codebase | ||
- Numerical stability safeguards | ||
- Comprehensive error handling | ||
- Memory efficient operations | ||
- Legal move validation and filtering | ||
- Fallback strategies for edge cases |
Oops, something went wrong.