Formula cheatsheet
Every key formula from the course, one table per lecture. Click a heading to open the full lecture.
Perceptron & linear separabilitySearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| MP sum | Fixed-weight sum before threshold | |
| AND threshold | AND fires only at sum two | |
| Supervised map | Learned map predicts output | |
| Single loss | Single prediction error signal | |
| Sigmoid | Graded activity between zero one | |
| Threshold form | Fire when sum reaches threshold | |
| Bias net | Bias replaces threshold, fire at zero | |
| Boundary forms | Same boundary in three guises | |
| Line form | Two-input boundary is line | |
| OR constraints | Four inequalities define OR | |
| PLA update | (miss); (false alarm) | Miss adds, false alarm subtracts |
| Separability | for every point in ; for every point in | All P positive, all N negative |
ANN building blocks & activation functionsSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Neuron sum | Weighted sum plus activation level | |
| Parameter step | Step against gradient scaled by rate | |
| Identity / step / sign | ; if else ; by sign of | Piecewise activation trio |
| Sigmoid / tanh | ; | Ranges (0,1) and (−1,1) |
| ReLU / SiLU | ; | Sparse rectifier and smooth version |
| Softmax | Exponentiate normalize to probabilities | |
| Slopes | ; ; ReLU slope or | Peak slopes govern vanishing flow |
| GeLU | Smooth NLP activation approximation |
Feedforward networks & gradient descentSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Hidden detector | One unit fires per pattern | |
| Output OR | OR over hidden winners | |
| Sigmoid neuron | Neuron output between zero one | |
| Squared error | Average squared prediction error | |
| Descent rule | Step opposite gradient downhill | |
| Taylor reason | Predict loss change from slope | |
| Gradient shape | Slope scalar versus vector gradient | |
| Sigmoid tweak | Per-sample tweak, average over points | |
| Binary loss | Punish confident wrong binary bets | |
| Multiclass loss | Only true class contributes | |
| Approximation | One hidden layer approximates any continuous to any | Universal approximation guarantee |
| Curse | Width explodes exponentially with dimension |
Backpropagation & empirical riskSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Forward pass | Forward sums then activations | |
| Sample loss | Mean squared gap to label | |
| Sigmoid slope | Slope needed for chain rule | |
| Output signal | Output error times slope, descend | |
| Hidden signal | Backprop splits error by weights | |
| Chain rule | Multiply local slopes for gradient | |
| Risk | Average training loss to minimize |
Regularization & deep networksSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Penalized objective | Fit plus complexity penalty | |
| Bias variance | , | Mean error versus spread |
| Sparse penalties | , | Squares shrink, absolutes sparsify |
| Dropout test | Scale test output by keep rate | |
| Batch norm | , , | Standardize batch to zero mean |
| Ensemble mean | Average models cancels faults | |
| Rate step | Learning rate scales gradient step |
Optimizers: momentum to AdamSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Base descent | Slope-scaled downhill step | |
| Momentum | , | Accumulate past gradients for speed |
| Lookahead | , , , | Peek ahead before leaping |
| Update counts | Batch ; SGD ; minibatch updates per epoch | One, N, N over B updates |
| Adagrad | , | Shrink rate for frequent gradients |
| RMSprop | , | Moving average keeps rates alive |
| Adam moments | , | Mean and variance trackers |
| Adam correction | , , | Debias early then adaptive step |
| Newton | Curvature-guided exact step |
Convolution & CNN architectureSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Addition | Pairwise sum, same length | |
| Full length | Flip slide, longer output | |
| NN size | Valid size from padding stride | |
| 1D slide | Slide dot product along vector | |
| 2D slide | Patch sum over rows columns | |
| Image size | Apply size rule twice | |
| RGB sum | Sum channels plus bias | |
| Sharing gain | Sharing cuts forty to four | |
| Pooling | Max keeps peak, average smooths |
LeNet, AlexNet & embeddingsSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Sigmoid | Squashes unit sum to 0-1 | |
| Output size | Tracks conv map height per layer | |
| ReLU | Keeps positives, zeroes negatives | |
| Param count | Counts kernels plus biases | |
| Euclidean distance | Ranks image similarity by distance |
RNN & backprop through timeSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| RNN hidden | , | Shared weights update state, predict output |
| Total loss | ; squared or cross-entropy per step | Adds step losses over sequence |
| BPTT sum | Sums shared gradients over time | |
| Gradient chain | Long product vanishes or explodes | |
| Gradient clipping | Caps exploding gradients, keeps direction | |
| Embedding lookup | Copies embedding row, skips sparse multiply | |
| Char prediction | Softmax next char, negative log loss |
LSTM, GRU & bidirectional RNNSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Forget gate | Erases stale cell memory selectively | |
| Cell update | , , | Adds gated candidate to gated memory |
| Output gate | , | Filters cell into hidden output |
| GRU update | , , , | Mixes past and candidate by update |
| Bi-LSTM merge | , | Concats forward-backward contexts, projects |
| Bi-RNN merges | Concat ; sum; average; element max | Concat doubles size, others keep size |
Probability & Bayesian networksSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Joint table | for each cell | Full table holds all information |
| Marginals | Sums joint cells along rows or columns | |
| Conditionals | Selects slice, normalizes to one | |
| Chain rule | Rebuilds joint from marginal plus conditional | |
| Independence test | Knowing other changes nothing | |
| Independent joint | Joint equals product when independent | |
| BN factorization | Each node conditions on parents only | |
| Loan profile | Five-variable default factorization example | |
| Bayes posterior | Posterior equals joint over symptom marginal | |
| Disease joint | Symptoms independent given disease | |
| Word sequence | Two-parent chain models review probability |
Markov chains & Gibbs samplingSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Markov property | Future depends only on present | |
| Transition matrix | Rows sum to one, same each step | |
| State count | Binary seats give power-of-two states | |
| Distribution update | Row vector times matrix evolves distribution | |
| Stationary distribution | Long-run distribution reproduces itself | |
| Cover bound | Proposal scaled covers target everywhere | |
| Accept chance | Keep candidate with ratio chance | |
| MCMC chain | Dependent draws converge to target | |
| Gibbs X | Sample X fixing Y, no normalizer | |
| Gibbs Y | Sample Y fixing X, alternate steps |
RBM & generative modelsSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Hidden activation | Weighted sum to firing probability | |
| Reconstruction error | Mean squared gap to minimum | |
| Energy | Low energy means high probability | |
| Joint distribution | Boltzmann distribution over all states | |
| Conditionals | Same weights both directions via sigmoid | |
| Sigmoid | Maps total input to probability | |
| CD update | Data association minus model association |
Autoencoders, VAE & GANSearch on YouTube
| Topic | Formula | Meaning |
|---|---|---|
| Autoencoder map | Encode to bottleneck, decode back | |
| MSE loss | Averages squared gaps for continuous values | |
| BCE loss | Averages log loss for binary outputs | |
| Latent prior | Learned Gaussian versus standard normal | |
| VAE loss | Reconstruction plus regularization toward prior | |
| KL term | Penalizes deviation from standard normal | |
| Reparameterization | Outside noise lets gradients flow through | |
| Bayes link | Links joint, conditional, data distributions | |
| GAN value | Discriminator maximizes, generator minimizes value | |
| BCE single | Single label log loss form | |
| Convergence | Fake distribution matches real distribution |