The 93% accuracy that meant nothing
My first model scored about 93%. A majority guess scored 77% and a plain logistic regression 91%. The target was a formula of the features.
A model can report high accuracy while learning nothing useful. I found that out on my own project.
The setup
The project uses a synthetic labour-market dataset of 5,000 rows, grounded in O*NET occupations. All person-level data is synthetic. I trained a few models, an XGBoost, a Random Forest and an MLP ensemble, and the first result looked great: roughly 93% accuracy.
The check that broke it
Before trusting the number, I did two cheap things.
- A majority-class baseline. Predict the most common label every time. That scored 77%.
- A plain logistic regression. No tuning. That scored 91%.
So a model that does nothing clever gets 77%, and a simple linear model gets 91%. The 93% was not impressive. It was only slightly better than the simplest model.
The real cause
Then I audited how the target was generated. The target was a formula of the features. The model was not discovering a pattern in the world. It was re-learning the formula it had been handed. That is called leakage, and here it was circular: the answer was built from the same columns the model reads.
The problem statement I wrote for the project is one sentence: a model can report high accuracy while learning nothing useful, when the target is built from the same columns the model reads.
What I do now
- Run baselines first. A majority guess and a simple model cost minutes and set the bar.
- Ask how the target was made. If I cannot explain where the label came from, I do not trust the score.
- Explain the model. I used SHAP to see which features drove predictions. If one feature explains almost everything, find out why.
- Write a model card. A short document with the data, the method, the results and the limits.
What it does not show
This project says nothing about real-world accuracy. The people are synthetic and the target is a formula. I want that sentence to be the first thing a reader finds, not the last.
The figures are on the project page of my portfolio, each with an evidence ID: 93%, 77% and 91%.