Academic machine-learning study · June 2025
Wildfire PySpark
A model can look accurate while missing the fires that matter most. I explored that problem across 1.88 million wildfire records.
University project, done solo: preprocessing, features, training and evaluation.
- Class G recall
- 0 → 0.7518
- Weighted class G precision
- 0.0099
- Weighted overall accuracy
- 32%
Recorded random-forest results · class weighting finds more rare fires, with many more false positives.
1.88 million records, seven very uneven classes
The 1.88 million-record dataset made Spark appropriate, while the seven wildfire-size classes created a much harder evaluation problem than overall accuracy suggested.
Removing the leakage
Containment date and final fire size were removed because they would not be known at discovery. Temporal and geographic features were engineered before the shared Spark ML pipeline.
The model comparison
Random forest, decision tree, logistic regression, and gradient-boosted trees were compared. Scaling reduced one random-forest training run from 52.55 to 27.14 seconds, while PCA reduced one GBT run from 154.69 to 47.09 seconds with near-equivalent reported accuracy.
Where it fell over
The baseline random forest had zero recall for classes C through G. Weighting raised class G recall to 0.7518, but precision fell to 0.0099 and overall accuracy to 32%.
The trade-off does not work
A study in distributed experimentation, not a wildfire predictor anyone should deploy. Raising recall on a rare class is worth nothing if the false positives bury you.
Outcome
Class weighting raised rarest-class recall from 0 to 0.7518, but overall accuracy fell to 32% and rarest-class precision to 0.0099.