Neural Network Design and Hyperparameter Search
A TensorFlow/Keras spam classifier built, tuned and evaluated over three exercises, with the finding that tuning did not beat the simple baseline.
The Challenge
A simple two-layer network classified spam with 94.6% test accuracy, and a deeper, tuned network did not beat it.
The aim was to build intuition for how depth, epochs and batch size affect a neural network, and to test whether systematic tuning improves on a straightforward baseline.
Approach
Results
The tuned model scored below the baseline, a useful result: added depth did not help on this tabular dataset, and the simpler network was the better choice.
Method note: grid-search configurations were selected on test accuracy, which makes the 94.5% optimistic; a separate validation split should drive selection. The split was not stratified.
How it was tested
- A tuned six-layer model compared with a simple baseline, over 10 runs, on accuracy, precision, recall and F1.
- The tuned six-layer model (92.0%) scored below the 64-32 baseline (94.6%): added depth did not help on this tabular data.
- Grid-search configurations were selected on test accuracy, which makes the 94.5% optimistic; a separate validation split should drive selection.
- The train/test split was not stratified.