Explore
2025–2026

Airbnb ML

Machine Learning Price Prediction Pipeline
TypeAcademic · COMP1861 Machine Learning
Year2025–2026
Problem

What was being investigated

Airbnb listing prices vary by neighbourhood, room type, availability, review recency, and dozens of other signals. The question: can a machine learning pipeline trained on 48,000+ New York City listings accurately predict price from features alone, and which model generalises better?

Approach

Methodology & tools

End-to-end pipeline on the AB_NYC_2019 dataset (48,895 NYC listings). EDA covering distribution plots, correlation heatmaps, and price-vs-categorical box plots. Missing value imputation for reviews_per_month and last_review; IQR-based outlier removal; feature engineering including days_since_last_review extraction from raw date strings. One-hot encoding of categorical features; StandardScaler applied to numerical features. Linear Regression as interpretable baseline and Random Forest Regressor for non-linear pattern capture, both trained on identical preprocessed feature sets. MAE chosen as primary evaluation metric for its direct interpretability in a pricing context.

Findings

Results & conclusions

Random Forest outperformed Linear Regression on MAE, capturing non-linear relationships between neighbourhood, room type, and price that a linear model cannot represent. However, Linear Regression remained more interpretable, coefficient values provided clear directional signals about which features drive price, making it more suitable for stakeholder explanation. Feature engineering (particularly days_since_last_review) contributed meaningfully above raw features alone. The most important lesson was the gap between model accuracy and model utility: a lower MAE doesn't automatically mean a better model, the interpretability vs. performance trade-off depends entirely on who uses the output and for what decision.

Visuals

Output & results

Price distribution
Correlation heatmap
Feature importance
Predicted vs actual
Stack

Methods & Tools

./airbnb ml · methods
LanguagePython
Librariespandas · NumPy · scikit-learn · Matplotlib · Seaborn
ModelsLinear Regression · Random Forest Regressor
DatasetAB_NYC_2019: 48,895 Airbnb listings, NYC
MetricMAE (Mean Absolute Error)
Reflection

What I'd do differently

One thing I'd change

I'd add cross-validation folds and a hyperparameter search, a single train/test split underestimates variance in sparse neighbourhood groups.