Swandip's Optimal Fertilizer Prediction Ensemble π±
π§ Overview
This repository contains a powerful Level-3 stacked ensemble model designed for optimal fertilizer prediction. The model architecture uses over 80 diverse base learners, multiple advanced ensemble strategies, and robust feature engineering techniques to achieve state-of-the-art log loss performance.
Best LogLoss:
1.86257
(Ridge Ensemble)
Hill Climbing LogLoss:1.86554
π Evaluation Metric
LogLoss
was used as the primary evaluation metric to assess model performance.
π§± Architecture
The model follows a 3-tier ensemble stacking structure:
Level 1 - Diverse Base Models
Includes over 80+ models from the following families:
- AutoGluon (27 models)
- MLP (x2)
- XGBoost (x20) β tuned with bagging and early stopping
- LGBM GBDT (x4) and LGBM GOSS
- TabTransformer (x3)
- Neural Networks (NNx15) β including deep tabular variants
- CatBoost (x2)
- HistGradientBoost (HGBx2)
- YDF (Yandex Decision Forest)
Feature Engineering Highlights:
- β Binned Features β Numerical columns transformed into bins to capture non-linear effects.
- β All Numerical β Categorical β Applied label encoding or one-hot encoding to convert features.
- β
Data Augmentation using
Train+Orig
blending.
Level 2 - Intermediate Ensembles
Various ensemble strategies were applied to Level-1 predictions:
- π Logistic Regression (LR)
- π§± Voting Classifier
- π― Stacking Classifier
- βοΈ Weighted Ensemble
- π Cluster Averaging
- π³οΈ Weighted Voting Classifier
Level 3 - Final Meta-Ensemble
- πΌ Hill Climbing
- π§ Ridge Ensemble (Best Performer)
π Performance Summary
Level | Description | Score (LogLoss) |
---|---|---|
1 | Base models | 1.94 β 1.88 |
2 | Intermediate ensembles | 1.88 β 1.87 |
3 | Ridge & Hill Climbing | 1.86257 (best) |
πΌοΈ Model Architecture
π Files Included Swandip_optimal_fertilizer_model.joblib β Trained ensemble model
README.md β This file
architecture.jpg β Visual representation of the architecture
π¨βπ¬ Author Swandip Singha π¬ Kaggle: @SwandipSingha
π License MIT License β You are free to use, modify, and distribute this work with proper credit.