2026Live
Ad Conversion Prediction
- Python
- scikit-learn
- pandas
- NumPy
- JavaScript
- SVG
- pytest
- Vercel
Overview
A web app that predicts how likely someone who sees an ad is to buy, from their age and salary. The decision map of five classifiers is drawn in halftone dots, and precision, recall and the ROC curve update as you move the threshold.
01 · Problem
A classifier that is "90% accurate" can hide a lot on imbalanced data, and deciding who sees an ad is a matter of the threshold, not the model. The first version scored on a single split, put accuracy first, tuned KNN on the data it scored and stored the personal details people entered.
02 · Solution
I built a Python pipeline that validates the data and compares five models (logistic regression, logistic regression with degree 2 features, nested-tuned KNN, SVM, Random Forest) and a baseline on 50 repeated stratified splits. Each model's probability is exported to a 101 × 101 grid; the browser draws the map from it and computes the threshold panel from out-of-fold predictions. Shared tests check the JavaScript against scikit-learn.
03 · Outcome
Logistic regression with degree 2 features reached a ROC AUC of 0.956, matching Random Forest and SVM: the map shows that a curved boundary does not need a complex model. Gender was left out because it added nothing and raises a fairness question; the site is in Turkish and English, serverless and collects no data.