Purbanchal University
Machine Learning (BIT421CO)
PU BIT · Semester 7 · 2025 Regular
Group A (10 Marks)
Derive the Cost Function for Linear Regression with Gradient Descent updates. Explain the Bias-Variance Tradeoff with learning curves.
Show solution
J(w,b) = 1/(2m) sum(y_hat - y)^2. High bias = underfitting (high train & val error); high variance = overfitting (large train/val gap).
Explain Support Vector Machines (SVM). How does the Kernel Trick (RBF / Polynomial) enable classification in non-linearly separable spaces?
Show solution
SVM maximizes the margin 2/||w||. Kernel functions K(x, z) = phi(x)^T phi(z) compute inner products in infinite-dimensional Hilbert spaces without explicit mapping.
Group B (5 Marks)
Differentiate between Bagging (Random Forest) and Boosting (AdaBoost / XGBoost). When is each preferred?
Show solution
Bagging trains parallel independent trees on bootstrap samples to reduce variance. Boosting trains sequential trees focusing on residual errors to reduce bias.