Kaggle / September 2026

Predicting Electric Vehicle Purchases

Binary classification of electric-vehicle purchase intent using source-derived features, gradient boosting, and rank-based prediction ensembles.

Completed

Final rank
506
ROC AUC
0.94542

Finished on 1 Oct 2026 View leaderboard ↗

Final leaderboard

The challenge

Predict the probability that a customer will buy an electric vehicle in Kaggle Playground Series S6E9. The competition uses mixed numeric and categorical features and evaluates discrimination with ROC AUC.

My approach

Solution notes — reviewed 23 October 2026. Methods, local experiments, and competition standings are identified separately.

Pipeline schematic: Customer features → Source recipe + models → Rank-space combination → Purchase probability

Open pipeline diagram at full size

Problem and evaluation

The target is Will_Buy_EV, a binary label in Kaggle Playground Series S6E9. The recorded training set contains 668,000 rows and combines numeric customer attributes with categorical purchase conditions. ROC AUC rewards useful ordering of purchase probabilities, so two models with different probability scales can still contribute similar rankings.

Recovering a useful feature direction

train_recipe_feature.py turns a published analysis of the source-data recipe into one continuous feature. Its fixed expression combines annual income, environmental concern, subsidy availability, and penalties for medium or high range anxiety. The coefficients are written into the feature function rather than fitted from competition labels. This helps a tree model represent an oblique decision direction that would otherwise require many axis-aligned splits. It is a source-informed engineered feature, not a discovery of the competition’s hidden labels.

A stable comparison framework

The recipe experiment uses StratifiedKFold with five shuffled folds and random_state=42, saves out-of-fold probabilities, and reports fold and pooled AUC. Holding the split fixed makes candidate comparisons interpretable. The project also tests alternative feature representations, stacking, and boosting models. These experiments should be compared on their saved validation evidence before any leaderboard result is used to choose a model.

Rank-space combinations and credit

The blending code converts each prediction vector to percentile ranks before mixing it. This removes differences in calibration scale and exposes the practical issue that many candidate vectors are almost identical. train_v09_mega_blend.py explicitly includes public prediction sources credited to Ravi Ramakrishnan, Megayak, and Nina2025, alongside another feature-view ensemble. These public components are part of the project’s lineage and must not be represented as independently trained original models. The README records a later final 50/50 rank blend; that recorded finalist is distinct from the earlier v09 experiment.

Public improvement versus final performance

The recorded public result is rank 353 with ROC AUC 0.94657. The completed private leaderboard gives rank 506 and 0.94542. The 153-place drop matters: public-split selection rewarded some choices that transferred less well to the hidden private portion. The scores are not interchangeable, and the private result is the final standing shown on the portfolio.

What did not transfer

The experiment record rejects several low-value directions, including highly correlated all-boosting blends, pseudo-label variants, and some external-data and mixture-model features. The lesson is to seek independent predictive information rather than a larger list of model names. Better model selection would give more weight to fixed-fold evidence and the provenance of every prediction vector, and less weight to repeated public-leaderboard tuning.

Sources and provenance

Results & evidence

Final private rank: 506, ROC AUC 0.94542. The public board recorded rank 353 and 0.94657. The final result was verified on Kaggle on 23 October 2026. The private rank was 153 places below the public rank.

What I learned

Small public-score gains can hide weak generalization. Public-split tuning improved the visible score but lost ground on the private board. Consistent out-of-fold comparisons and model diversity matter more than repeatedly blending nearly identical predictions.