04

Optimal Model Fitting

PythonXGBoostOOPPipeline designJupyter

Overview

Extension of the previous module on the same imbalanced binary classification problem (98% negative class). Upgrades the model family from linear to non-linear and frames evaluation around a central business question: does the added complexity justify the operational cost over a simpler baseline?

Models Evaluated

  • arrow_forwardRandom Forest (few trees): val AP 0.16, underperformed Logistic Regression, likely due to high variance and noisy features
  • arrow_forwardGradient Boosting: iteratively corrects residuals of prior trees, proved better suited to the problem. Hyperparameters tuned via Random Search
  • arrow_forwardKNN: discarded early due to inference cost at dataset scale

Key Takeaways

  • arrow_forwardLogistic Regression and Gradient Boosting were the two finalists
  • arrow_forwardFinal operating point selected on the PR curve, prioritising models that retain precision as recall increases
  • arrow_forwardCalibration covered as a closing exercise: aligning predicted probabilities to true event frequencies, relevant when scores are used as probability estimates rather than just rankings

PDF Resources