IOAI ML Notes Neural NetworksDeep Learning

Neural Networks: Perceptron and Training Basics

Perceptron fundamentals, optimisation, backpropagation, activations, and loss functions.

Syllabus Map


Overview


Neural Networks & Perceptron Basics

Core Idea

z=wx+bz = w \cdot x + b y^=f(z)\hat{y} = f(z)

Key Components

Decision Boundary Intuition

Practical Notes

Foundations


Gradient Descent

Core Idea

Practical Notes

Optimization Dynamics

Update Rule

wt+1=wtηwL(wt)w_{t+1} = w_t - \eta \nabla_w L(w_t)

Types of Gradient Descent

Full-Batch Gradient Descent

Stochastic Gradient Descent (SGD)

Mini-Batch Gradient Descent

Linear Regression Form

Model

y^=Xw+b,XRn×d, wRd\hat{y} = Xw + b,\quad X \in \mathbb{R}^{n \times d},\ w \in \mathbb{R}^{d}

MSE loss

L(w,b)=1nXw+b1y2L(w, b) = \frac{1}{n}\|Xw + b\mathbf{1} - y\|^2

Gradients

wL=2nX(Xw+b1y),bL=2n1(Xw+b1y)\nabla_w L = \frac{2}{n} X^\top (Xw + b\mathbf{1} - y),\quad \nabla_b L = \frac{2}{n} \mathbf{1}^\top (Xw + b\mathbf{1} - y)

Updates

wt+1=wtηwLbt+1=btηbLw_{t+1} = w_t - \eta \nabla_w L \\ b_{t+1} = b_t - \eta \nabla_b L

Backpropagation

Core Idea

Practical Notes

Backpropagation

Example Neural Network

Backprop Flow (Key Gradients)


Activation Functions

Core Idea

Practical Notes

Activation Choice

ReLU

Sigmoid

Tanh


Loss Functions

Core Idea

Practical Notes

Loss Selection

Regression

Classification

← Back to Blog