← Projects

Salary regression

A dashboard and model comparison using historical Glassdoor salary estimates.

Dashboard and model evaluation
Data Science / Applied Machine Learning project, NYU Abu Dhabi

I built a Streamlit dashboard to compare salary estimates from historical Glassdoor job postings. It fits a mean baseline, linear regression, and XGBoost using whether a posting mentions Python, company size, revenue, state, and ownership.

The postings come from the PlayingNumbers teaching dataset.

Preparing the comparison

I removed duplicate postings and kept related employer, title, and location groups together when splitting the data. I also excluded hourly listings rather than converting them to annual salaries using an assumed number of working hours.

That left 457 annual-salary postings: 365 for training and 92 for evaluation. All three models use the same split, and XGBoost uses fixed settings.

Model Holdout R² MAE ($1,000) RMSE ($1,000)
Mean baseline -0.0007 26.93 33.85
Linear regression 0.1268 24.49 31.61
XGBoost 0.1872 23.80 30.50

XGBoost had the lowest error on this holdout, with a modest improvement over the mean baseline.

The target is the midpoint of each listing’s estimated salary range. This is a comparison on one small historical holdout, rather than a forecast of current compensation. The dashboard also uses permutation importance to explore which inputs the fitted model relies on.