Concepts this paper tests
Auto-generated summary from the source site. Handy as a checklist; the lessons above explain each idea from scratch.
Here’s a structured summary of core topics, concepts, principles, and equations for the Diploma-Level Machine Learning Techniques exam, along with Mermaid knowledge graphs to visualize relationships.
1. Core Topics & Key Concepts
A. Dimensionality Reduction (PCA)
Key Equation:
Variance=λ1+λ2+...+λd
B. Bayesian Estimation
α′=α+successes,β′=β+failures
Mean=α′+β′α′
Key Equation:
P(θ∣data)=Beta(α+successes,β+failures)
C. Naive Bayes Classifier
- Assumption: Features are conditionally independent given the class.
- Posterior Probability:
P(y∣x1,...,xn)∝P(y)i=1∏nP(xi∣y)
- Prediction: Choose class with highest posterior.
Key Equation:
y^=yargmaxP(y)i=1∏nP(xi∣y)
D. Gram Matrix & Kernel Methods
- Gram Matrix: K=XTX (symmetric and positive semi-definite).
Properties:
- Symmetry: K=KT.
- Positive Semi-Definite: vTKv≥0 for any v.
Key Check: For a matrix K to be a Gram matrix:
- K=KT.
- All eigenvalues ≥0.
E. Clustering (Lloyd’s Algorithm / K-Means)
- Objective: Minimize within-cluster sum of squares (WCSS).
Steps:
- Initialize centroids.
- Assign points to nearest centroid.
- Update centroids as mean of assigned points.
- Repeat until convergence.
- Decision Boundary: Voronoi diagram (points assigned to nearest centroid).
Key Insight: Points closer to existing cluster centroids (e.g., [0,0]T) are likely in the same cluster.
F. Regularization (Ridge vs. Lasso)
| Aspect | Ridge (L2) | Lasso (L1) |
|---|
| Penalty | λ∑wj2 | λ∑∣wj∣ |
| Effect | Shrinks weights | Shrinks + sets weights to 0 (sparse) |
| Use Case | Multicollinearity | Feature selection |
Key Equations:
Ridge: min∥y−Xw∥22+λ∥w∥22
Lasso: min∥y−Xw∥22+λ∥w∥1
G. Support Vector Machines (SVM)
w,b,ξmin21∥w∥2+C∑ξis.t.yi(wTxi+b)≥1−ξi,ξi≥0
αmax∑αi−21i,j∑αiαjyiyjxiTxjs.t.0≤αi≤C,∑αiyi=0
- Support Vectors: Points with αi>0.
- Kernel Trick: Replace xiTxj with K(xi,xj).
Key Insights:
If αi∗=0:
- Point is correctly classified with margin >1.
- No slack (ξi=0).
If 0<αi∗<C:
- Point is a support vector on the margin.
If αi∗=C:
- Point is misclassified or within the margin.
H. Random Forest
Key Trade-offs: | p (Features) | Correlation | Bias | Variance | |------------------------|----------------|----------|--------------| | Small | Low | High | Low | | Large | High | Low | High |
I. Linear Regression
- Model: y=wTx+ϵ.
- Ordinary Least Squares (OLS):
w=(XTX)−1XTy
Assumptions:
- Linear relationship.
- No multicollinearity.
- Homoscedasticity (constant variance of errors).
Key Equation:
w=wargmin∥y−Xw∥22
J. Perceptron Algorithm
- Update Rule: If yi(wTxi+b)≤0, update:
w←w+ηyixi,b←b+ηyi
- Convergence: Guaranteed if data is linearly separable.
Key Insight:
- If yi(wTxi+b)>0, no update is needed.
K. Optimization (Lagrangian)
- Primal Problem: minwf(w) s.t. g(w)≤0.
- Lagrangian:
L(w,α)=f(w)+αg(w)
- Dual Problem: maxα≥0minwL(w,α).
Key Equation:
α≥0maxL(w′,α)={f(w′)∞if g(w′)≤0otherwise
L. Decision Trees
IG=H(parent)−∑NNjH(childj)
where H is entropy:
H(S)=−∑pilog2pi
- Splitting Criterion: Maximize IG.
Key Equation:
IG(feature)=H(target)−H(target∣feature)
M. K-Nearest Neighbors (K-NN)
- Prediction: Majority vote (classification) or average (regression) of k nearest neighbors.
- Distance Metric: Typically Euclidean or Manhattan.
Sensitivity:
- Outliers: High k reduces impact.
- Scale: Features should be normalized.
Key Insight:
- Lazy learner (no training phase).
- Computationally expensive at test time.
N. Loss Functions
| Loss Function | Equation | Use Case |
|---|
| 0-1 Loss | I(y=y^) | Classification accuracy |
| Squared Loss | (y−y^)2 | Regression (e.g., MSE) |
| Cross-Entropy | −∑yilogy^i | Probabilistic classification |
Key Equations:
0-1 Loss=i=1∑nI(yi=y^i)
Squared Loss=i=1∑n(yi−y^i)2
O. Neural Networks
z(l)=W(l)a(l−1)+b(l),a(l)=σ(z(l))
where σ is the activation function (e.g., sigmoid, ReLU).
σ(z)=1+e−z1
Key Equation:
a(l)=σ(W(l)a(l−1)+b(l))
Graph 2: Dimensionality Reduction & Clustering
Graph 3: Optimization & Model Training
Graph 4: Bayesian vs. Frequentist
Graph 5: Ensemble Methods
3. Key Equations Summary
| Topic | Equation |
|---|
| PCA Variance | Variance=∑i=1dλi |
| Bayesian Posterior | α′=α+successes,β′=β+failures |
| Naive Bayes | y^=argmaxyP(y)∏P(xi∣y) |
| SVM Primal | min21∥w∥2+C∑ξi |
| SVM Dual | maxα∑αi−21∑αiαjyiyjxiTxj |
| Information Gain | IG=H(S)−∑∣S∣∣Sv∣H(Sv) |
| Perceptron Update | w←w+ηyixi if misclassified |
| Lagrangian | L(w,α)=f(w)+αg(w) |
| Linear Regression | w=(XTX)−1XTy |
| Ridge/Lasso | min∥y−Xw∥22+λ∥w∥1/22 |
| 0-1 Loss | ∑I(yi=y^i) |
| Squared Loss | ∑(yi−y^i)2 |
| Sigmoid | σ(z)=1+e−z1 |
4. Exam Tips
- PCA: Always check eigenvalues for variance and eigenvectors for principal components.
- Bayesian: Remember to add successes/failures to α/β.
- Naive Bayes: Multiply conditional probabilities (assume independence).
- SVM: αi=0 implies correct classification outside margin.
- Random Forest: Lower p reduces correlation but may underfit.
- Perceptron: Only update weights if misclassified.
- Decision Trees: Calculate entropy and information gain for splits.
- K-NN: Normalize features and choose k carefully (odd for binary classification).
- Loss Functions: 0-1 loss counts misclassifications; squared loss penalizes large errors.
- Neural Networks: Forward propagation is layer-by-layer activation.