Cheat sheets
Important formulas
The formulas worth remembering, with the lesson that derives each.
| Concept | Formula | Lesson |
|---|---|---|
| Dot product | Vectors | |
| Linear model | Linear regression | |
| MSE | Linear regression | |
| MSE gradients | , | Linear regression |
| Ridge / lasso penalty | / | Regularization |
| Sigmoid | Logistic regression | |
| Binary cross-entropy | Logistic regression | |
| Softmax with temperature | Decoding | |
| Precision, recall, F1 | , , | Metrics |
| Bayes' rule | Probability | |
| Euclidean distance | KNN | |
| Gini impurity / entropy | / | Decision trees |
| Boosting update | Ensembles | |
| K-means objective | K-means | |
| PCA | ; ratio | PCA |
| TF-IDF | Text to vectors | |
| Cosine similarity | Text to vectors | |
| Layer | Forward pass | |
| Gradient descent | Gradient descent | |
| Sigmoid + BCE error signal | Backpropagation | |
| Conv output size | CNNs | |
| Self-attention | Self-attention | |
| Perplexity | Tokenization | |
| LoRA | Adapting LLMs | |
| nDCG | LLM evaluation | |
| Little's law | Production architecture |