CruxBit
Back to catalog
Mediumeducation

Polynomial Regression Notebook With Degree and Metric Comparisons

Added Jun 2025 3 design docs

Underfitting and overfitting are the twin failure modes every model must navigate, and polynomial regression is the cleanest laboratory for studying them: one knob — the degree — moves a model smoothly from too simple to too flexible. This project builds that laboratory as an interactive notebook. The intern creates a Jupyter-based tool where users fit polynomial regression models of varying degree, on synthetic datasets they generate or real ones they upload, using scikit-learn for modeling and pandas and NumPy for data handling. Each fit is plotted against the data so users watch curves straighten or contort as the degree changes, while MAE, MSE, and R-squared are computed for training and held-out data side by side — making the moment where test error turns upward, the signature of overfitting, plainly visible. Interactive widgets let users sweep across degrees and datasets quickly enough to build genuine intuition. The project builds deep understanding of the bias-variance trade-off, model capacity, and honest evaluation, and gives the intern experience designing notebook-based interactive teaching tools — an underrated skill for data scientists who must communicate model behavior to colleagues.

Related projects

You might also like