Predicting Gold Recovery Efficiency.
Zyfra needed a ML model to predict gold depuration.
I did some data wrangling, EDA, developed and trained a model.
CLIENT:
Zyfra
DATE:
March 06, 2025
PROJECT:
Data Wrangling & Visualization
I started by comparing the multiple datasets provided (train, test, and full production data) and consolidated them into a single structure for cleaning and analysis. To prevent data leakage and overfitting, I removed 34 internal processing-stage features that represented intermediate material inflow values rather than stable process inputs.
A key step was imputing missing values in rougher recovery, where I applied a mask aligned with the official recovery formula to ensure scientifically consistent replacements.
I analyzed chemical concentration behavior throughout the process for gold (Au), silver (Ag), and lead (Pb), observing how each metal’s concentration increased from the raw feed to the final concentrate. I also checked particle size distributions in both train and test sets to confirm dataset alignment and avoid training bias.
To ensure consistent and realistic modeling behavior, I visualized and removed outliers in the rougher feed, rougher concentrate, and final concentrate phases. This helped stabilize training and reduce noise in the prediction stage.
Model Development
The modeling pipeline used a train/test split, combined with StandardScaler normalization inside a scikit-learn pipeline to prevent data leakage.
I trained and evaluated several models using K-Fold cross-validation, including:
- Linear Regression
- Decision Tree Regressor
- Random Forest Regressor
Performance was measured with Symmetric Mean Absolute Percentage Error (SMAPE), both at the rougher stage and final recovery stage.
The Random Forest Regressor produced the best overall SMAPE scores, demonstrating strong predictive performance and robust generalization across folds.
The final model achieved high accuracy in predicting final gold recovery, meaning it can now be deployed.



