
Forest CoverType with XGBoost
Seven-class XGBoost model trained on 581K records, achieving 95.54% held-out test accuracy.
Overview
A multiclass machine-learning project that predicts forest cover type from geographic and environmental attributes. Working with a dataset of more than 580,000 records across seven cover classes, the notebook develops a structured XGBoost workflow covering preprocessing, baseline modeling, hyperparameter search, and final held-out evaluation. Confusion matrices and feature-importance analysis help explain model behavior beyond a single accuracy score, while the trained pipeline can be saved for reuse. The existing portfolio reports approximately 95.5% held-out test accuracy, illustrating strong performance on a practical ecological classification task.
Technical details
The notebook trains on 581,012 observations with 54 predictive features across seven cover types, using stratified training, validation, and test splits. A RandomizedSearchCV sweep evaluates 20 XGBoost parameter combinations with threefold cross-validation (60 fits), selecting by macro F1. Tuning raised validation accuracy from 86.88% to 95.09% and macro F1 from 0.8520 to 0.9320. After refitting on the combined training and validation samples, the final model recorded 95.54% accuracy, 0.9371 macro F1, 0.9475 macro precision, and 0.9275 macro recall on 116,203 previously held-out records.

