Decision Tree Survival Modeling App With Interactive Pruning Controls
Decision trees are the most explainable models in machine learning, which makes them ideal for teaching — but only if learners can actually see the tree and watch it change. This project builds a web application around that idea using the classic Titanic passenger dataset, where every split has an interpretable story. The intern develops a Flask backend that trains a decision tree classifier with scikit-learn to predict passenger survival, served through a frontend built with HTML, CSS, and JavaScript. Users view a rendered visualization of the fitted tree, adjust pruning parameters such as maximum depth and minimum samples per split, and watch the tree restructure and its predictions change in real time — a direct demonstration of the overfitting-versus-generalization trade-off. Jupyter notebooks accompany the app to document data preparation and experimentation, and per-passenger predictions let users test scenarios interactively. The intern learns how tree construction, overfitting, and pruning interact — knowledge made durable by manipulating it directly — while gaining full-stack experience: serving a model with Flask, wiring a JavaScript frontend to a Python API, and packaging an educational tool others can learn from.
Related projects
You might also like