Progressive Machine Learning and NLP pipeline analyzing food price pressure in Tunisia: tabular models, PCA, tuned MLP, fine-tuned CamemBERT, and interactive geospatial mapping.
# Tunisia Food Prices — ML, NLP & Geospatial Analysis
## Project Date
**May 2026**
## Overview
This project analyzes citizen comments about food markets and prices in Tunisia, combining tabular Machine Learning, Deep Learning, NLP and geospatial visualization. It follows a controlled, progressive modeling pipeline across four levels of complexity, plus a geospatial bonus section.
The project was completed as an individual Machine Learning & NLP assignment.
## Project Context
Food price pressure is a socially and economically important signal, especially when derived from citizen-reported comments rather than official statistics alone. Combining structured (tabular) data with unstructured text opens the door to richer, more nuanced predictions.
This project investigates the following question:
> Can we predict food price pressure in Tunisia more accurately by moving from simple tabular models to NLP-based text understanding, and can the results be meaningfully visualized geographically?
## Dataset
The dataset (`ex12_prix_alimentaires.csv`) combines:
* Numerical and categorical tabular features (14 numerical variables, geographic coordinates, service load indicators, etc.)
* Free-text citizen comments (`text_fr`) describing market conditions
* Two target variables:
* `target_stage1_tabular_score` — used for tabular modeling (Parts A, B, C)
* `text_price_pressure_score` — used for the NLP model (Part D)
No missing values were detected in the dataset.
## Methodology
The project follows a controlled progression across 5 stages, each building on the previous one.
### Part A — Baseline Tabular Models
Random Forest and XGBoost were trained on the tabular features as reference baselines (with anti-leakage feature exclusion).
### Part B — Light Improvement via PCA
Principal Component Analysis was applied to the standardized numerical variables, testing multiple numbers of components to find the best trade-off, then retraining the best baseline model on the …