Lecture 14 · Wed, 11 Nov 2026

Neural networks

Introduction to neural networks as a bridge from classical ML

Neural Networks

This is a conceptual bridge lecture, not a deep learning course. We connect logistic regression to the single neuron, then build up to hidden layers and activation functions, and build a small network ourselves in a notebook. The lecture focuses on when neural networks add value (large data, structured inputs like images and text) and when classical ML remains the better choice (tabular data, small samples, interpretability requirements).

If you want the mathematical version of the bridge — a linear model drawn and trained as a one-neuron network — see the optional Lecture 4 supplement.

Notebook: a network with one hidden layer

We build a neural network with one hidden layer in plain JAX and use it to classify the two-moons data from Lectures 11 and 13. The notebook starts from logistic regression as a single neuron, adds a hidden layer, lets jax.grad compute the gradients and trains with gradient descent. It then looks at what the hidden neurons have learned and what happens when the width, the activation function, the learning rate or the seed is changed.

Download the notebook. It needs `jax`, `scikit-learn` and `matplotlib` (`pip install jax scikit-learn matplotlib`), and it also runs in Google Colab.

Optional: technical supplement

For students who want the chain rule on paper: backpropagation derived on a one-hidden-layer network small enough to write every term, why sigmoid’s ≤ ¼ derivative causes vanishing gradients while ReLU’s doesn’t, why alpha in MLPClassifier is exactly ridge’s penalty (weight decay), and a numerical gradient check that verifies all of it to 1e-10.

Open the supplementary slides ↗ — optional and self-contained; nothing in it is required for the project.

MST0052 Predictive Modelling with Machine Learning · Fall 2026 · BI Norwegian Business School