{
  "id": 579944,
  "title": "#1 Private Leaderboard – Beyond Visible Spectrum: AI for Agriculture 2025",
  "url": "/competitions/beyond-visible-spectrum-ai-for-agriculture-2025/discussion/579944",
  "author_name": "",
  "post_date": "2025-05-21T10:15:41.732930900Z",
  "votes": 8,
  "comment_count": 2,
  "views": 0,
  "content": "<p><strong>Author:</strong> Govindaram Sriram<br><br>\n<strong>Competition:</strong> AI for Agriculture 2025<br><br>\n<strong>Model Type:</strong> XGBoost Regressor<br><br>\n<strong>Final Score:</strong> ~815 (Private Leaderboard) | ~832(Public Leaderboard)</p>\n<h2>🧠 Problem Summary</h2>\n<p>The competition challenged participants to predict the percentage of crop disease using hyperspectral image patches (128×128×125). The task was a <strong>regression</strong> problem, and accuracy was measured via MAE or SMAPE.</p>\n<h2>🧪 Experimental Approaches</h2>\n<p>Over the course of the competition, I tested the following model families:</p>\n<ul>\n<li><strong>3D CNNs (TensorFlow)</strong>: Used multiple convolutional and pooling layers for spatial-spectral learning. However, it was computationally expensive and did not outperform tree models in validation.</li>\n<li><strong>Transformer-based Architectures</strong>: Explored ViT-style input with channel flattening. Performance was unstable without substantial fine-tuning and augmentation.</li>\n<li><strong>XGBoost (Winner)</strong>: Provided excellent performance with lightweight computation by using mean reflectance features. Fast to train, easy to interpret, and very competitive.</li>\n</ul>\n<h2>🧾 Final Feature Engineering Strategy</h2>\n<p>Instead of using the entire 3D cube, I flattened each (128×128×125) hyperspectral patch and computed <strong>band-wise mean reflectance</strong>, resulting in a <strong>125-dimensional vector</strong> per sample.</p>\n<p>This dramatically reduced input dimensionality and focused on spectral variability, which worked very well for XGBoost.</p>\n<h2>🔧 Final XGBoost Model Parameters</h2>\n<pre><code>xgb_model = xgb.XGBRegressor(\n    n_estimators=,\n    learning_rate=,\n    max_depth=,\n    subsample=,\n    colsample_bytree=,\n    random_state=,\n    tree_method=\n)\n</code></pre>\n<p>Early stopping was used with <code>eval_metric='mae'</code> and <code>early_stopping_rounds=20</code>. Validation MAE stabilized quickly, showing strong generalization.</p>\n<h2>📊 Optimization Strategy</h2>\n<ul>\n<li>All <code>.npy</code> files were validated and padded/truncated to standard shape.</li>\n<li>Hyperparameter tuning was done manually via validation performance (test size 10%).</li>\n<li>GPU acceleration (<code>tree_method='gpu_hist'</code>) significantly reduced training time.</li>\n<li>Predictions were clipped and rounded to range [1, 100] as per domain constraints.</li>\n</ul>\n<p>📓 <strong>Notebook:</strong> <a href=\"https://www.kaggle.com/code/govindaramsriram/1-in-privatelb-beyond-visible-spectrum2025-1\" target=\"_blank\">1st Place – Beyond Visible Spectrum 2025</a><br>\n<br></p>\n<h2>🏆 Final Thoughts</h2>\n<p>This solution balanced <strong>performance</strong>, <strong>simplicity</strong>, and <strong>efficiency</strong>. Despite testing deep learning approaches, the classic XGBoost model with domain-aware features gave the best results.</p>\n<p>Thank you for Organizing Team hosting this excellent competition. Looking forward to future challenges!</p>",
  "messages": [
    {
      "id": "3206446",
      "postDate": "05/21/2025 10:15:41",
      "content": "<p><strong>Author:</strong> Govindaram Sriram<br><br>\n<strong>Competition:</strong> AI for Agriculture 2025<br><br>\n<strong>Model Type:</strong> XGBoost Regressor<br><br>\n<strong>Final Score:</strong> ~815 (Private Leaderboard) | ~832(Public Leaderboard)</p>\n<h2>🧠 Problem Summary</h2>\n<p>The competition challenged participants to predict the percentage of crop disease using hyperspectral image patches (128×128×125). The task was a <strong>regression</strong> problem, and accuracy was measured via MAE or SMAPE.</p>\n<h2>🧪 Experimental Approaches</h2>\n<p>Over the course of the competition, I tested the following model families:</p>\n<ul>\n<li><strong>3D CNNs (TensorFlow)</strong>: Used multiple convolutional and pooling layers for spatial-spectral learning. However, it was computationally expensive and did not outperform tree models in validation.</li>\n<li><strong>Transformer-based Architectures</strong>: Explored ViT-style input with channel flattening. Performance was unstable without substantial fine-tuning and augmentation.</li>\n<li><strong>XGBoost (Winner)</strong>: Provided excellent performance with lightweight computation by using mean reflectance features. Fast to train, easy to interpret, and very competitive.</li>\n</ul>\n<h2>🧾 Final Feature Engineering Strategy</h2>\n<p>Instead of using the entire 3D cube, I flattened each (128×128×125) hyperspectral patch and computed <strong>band-wise mean reflectance</strong>, resulting in a <strong>125-dimensional vector</strong> per sample.</p>\n<p>This dramatically reduced input dimensionality and focused on spectral variability, which worked very well for XGBoost.</p>\n<h2>🔧 Final XGBoost Model Parameters</h2>\n<pre><code>xgb_model = xgb.XGBRegressor(\n    n_estimators=,\n    learning_rate=,\n    max_depth=,\n    subsample=,\n    colsample_bytree=,\n    random_state=,\n    tree_method=\n)\n</code></pre>\n<p>Early stopping was used with <code>eval_metric='mae'</code> and <code>early_stopping_rounds=20</code>. Validation MAE stabilized quickly, showing strong generalization.</p>\n<h2>📊 Optimization Strategy</h2>\n<ul>\n<li>All <code>.npy</code> files were validated and padded/truncated to standard shape.</li>\n<li>Hyperparameter tuning was done manually via validation performance (test size 10%).</li>\n<li>GPU acceleration (<code>tree_method='gpu_hist'</code>) significantly reduced training time.</li>\n<li>Predictions were clipped and rounded to range [1, 100] as per domain constraints.</li>\n</ul>\n<p>📓 <strong>Notebook:</strong> <a href=\"https://www.kaggle.com/code/govindaramsriram/1-in-privatelb-beyond-visible-spectrum2025-1\" target=\"_blank\">1st Place – Beyond Visible Spectrum 2025</a><br>\n<br></p>\n<h2>🏆 Final Thoughts</h2>\n<p>This solution balanced <strong>performance</strong>, <strong>simplicity</strong>, and <strong>efficiency</strong>. Despite testing deep learning approaches, the classic XGBoost model with domain-aware features gave the best results.</p>\n<p>Thank you for Organizing Team hosting this excellent competition. Looking forward to future challenges!</p>",
      "rawMarkdown": "**Author:** Govindaram Sriram<br>\n**Competition:** AI for Agriculture 2025<br>\n**Model Type:** XGBoost Regressor<br>\n**Final Score:** ~815 (Private Leaderboard) | ~832(Public Leaderboard)\n\n\n\n## 🧠 Problem Summary\n\nThe competition challenged participants to predict the percentage of crop disease using hyperspectral image patches (128×128×125). The task was a **regression** problem, and accuracy was measured via MAE or SMAPE.\n\n## 🧪 Experimental Approaches\n\nOver the course of the competition, I tested the following model families:\n\n* **3D CNNs (TensorFlow)**: Used multiple convolutional and pooling layers for spatial-spectral learning. However, it was computationally expensive and did not outperform tree models in validation.\n* **Transformer-based Architectures**: Explored ViT-style input with channel flattening. Performance was unstable without substantial fine-tuning and augmentation.\n* **XGBoost (Winner)**: Provided excellent performance with lightweight computation by using mean reflectance features. Fast to train, easy to interpret, and very competitive.\n\n\n\n## 🧾 Final Feature Engineering Strategy\n\nInstead of using the entire 3D cube, I flattened each (128×128×125) hyperspectral patch and computed **band-wise mean reflectance**, resulting in a **125-dimensional vector** per sample.\n\nThis dramatically reduced input dimensionality and focused on spectral variability, which worked very well for XGBoost.\n\n\n\n## 🔧 Final XGBoost Model Parameters\n\n```python\nxgb_model = xgb.XGBRegressor(\n    n_estimators=800,\n    learning_rate=0.08,\n    max_depth=8,\n    subsample=0.8,\n    colsample_bytree=0.8,\n    random_state=42,\n    tree_method='gpu_hist'\n)\n```\n\nEarly stopping was used with `eval_metric='mae'` and `early_stopping_rounds=20`. Validation MAE stabilized quickly, showing strong generalization.\n\n\n\n## 📊 Optimization Strategy\n\n* All `.npy` files were validated and padded/truncated to standard shape.\n* Hyperparameter tuning was done manually via validation performance (test size 10%).\n* GPU acceleration (`tree_method='gpu_hist'`) significantly reduced training time.\n* Predictions were clipped and rounded to range \\[1, 100] as per domain constraints.\n\n📓 **Notebook:** [1st Place – Beyond Visible Spectrum 2025](https://www.kaggle.com/code/govindaramsriram/1-in-privatelb-beyond-visible-spectrum2025-1)\n<br>\n## 🏆 Final Thoughts\n\nThis solution balanced **performance**, **simplicity**, and **efficiency**. Despite testing deep learning approaches, the classic XGBoost model with domain-aware features gave the best results.\n\nThank you for Organizing Team hosting this excellent competition. Looking forward to future challenges!",
      "votes": null
    },
    {
      "id": "3206604",
      "postDate": "05/21/2025 14:42:36",
      "content": "<p>First of all, huge , Govind, on securing the 1st position 🎉👏– truly well deserved! I also experimented with various model variants like ViT, SSATNet, ResNet models, and even custom 3D CNNs, but I couldn’t achieve stable or improved performance. I hadn’t considered using XGBoost, and your solution was a real eye-opener. I learned a lot from your approach – thank you for sharing it!</p>",
      "rawMarkdown": "First of all, huge , Govind, on securing the 1st position 🎉👏– truly well deserved! I also experimented with various model variants like ViT, SSATNet, ResNet models, and even custom 3D CNNs, but I couldn’t achieve stable or improved performance. I hadn’t considered using XGBoost, and your solution was a real eye-opener. I learned a lot from your approach – thank you for sharing it!",
      "votes": null
    },
    {
      "id": "3207745",
      "postDate": "05/23/2025 07:25:27",
      "content": "<p>Congrats for winning it. It is interesting to see classical XGboost outperformed CNNs&amp; ViTs. The key strategy of flattening and the reflectance engineered feature did the trick. Thanks for sharing it.</p>\n<blockquote>\n  <p>I flattened each (128×128×125) hyperspectral patch and computed band-wise mean reflectance</p>\n</blockquote>",
      "rawMarkdown": "Congrats for winning it. It is interesting to see classical XGboost outperformed CNNs& ViTs. The key strategy of flattening and the reflectance engineered feature did the trick. Thanks for sharing it.\n\n> I flattened each (128×128×125) hyperspectral patch and computed band-wise mean reflectance",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3206604,
      "author_name": "sarthak24910",
      "author_url": "",
      "post_date": "05/21/2025 14:42:36",
      "content": "<p>First of all, huge , Govind, on securing the 1st position 🎉👏– truly well deserved! I also experimented with various model variants like ViT, SSATNet, ResNet models, and even custom 3D CNNs, but I couldn’t achieve stable or improved performance. I hadn’t considered using XGBoost, and your solution was a real eye-opener. I learned a lot from your approach – thank you for sharing it!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3207745,
      "author_name": "waqasali51",
      "author_url": "",
      "post_date": "05/23/2025 07:25:27",
      "content": "<p>Congrats for winning it. It is interesting to see classical XGboost outperformed CNNs&amp; ViTs. The key strategy of flattening and the reflectance engineered feature did the trick. Thanks for sharing it.</p>\n<blockquote>\n  <p>I flattened each (128×128×125) hyperspectral patch and computed band-wise mean reflectance</p>\n</blockquote>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3206446": "**Author:** Govindaram Sriram<br>\n**Competition:** AI for Agriculture 2025<br>\n**Model Type:** XGBoost Regressor<br>\n**Final Score:** ~815 (Private Leaderboard) | ~832(Public Leaderboard)\n\n\n\n## 🧠 Problem Summary\n\nThe competition challenged participants to predict the percentage of crop disease using hyperspectral image patches (128×128×125). The task was a **regression** problem, and accuracy was measured via MAE or SMAPE.\n\n## 🧪 Experimental Approaches\n\nOver the course of the competition, I tested the following model families:\n\n* **3D CNNs (TensorFlow)**: Used multiple convolutional and pooling layers for spatial-spectral learning. However, it was computationally expensive and did not outperform tree models in validation.\n* **Transformer-based Architectures**: Explored ViT-style input with channel flattening. Performance was unstable without substantial fine-tuning and augmentation.\n* **XGBoost (Winner)**: Provided excellent performance with lightweight computation by using mean reflectance features. Fast to train, easy to interpret, and very competitive.\n\n\n\n## 🧾 Final Feature Engineering Strategy\n\nInstead of using the entire 3D cube, I flattened each (128×128×125) hyperspectral patch and computed **band-wise mean reflectance**, resulting in a **125-dimensional vector** per sample.\n\nThis dramatically reduced input dimensionality and focused on spectral variability, which worked very well for XGBoost.\n\n\n\n## 🔧 Final XGBoost Model Parameters\n\n```python\nxgb_model = xgb.XGBRegressor(\n    n_estimators=800,\n    learning_rate=0.08,\n    max_depth=8,\n    subsample=0.8,\n    colsample_bytree=0.8,\n    random_state=42,\n    tree_method='gpu_hist'\n)\n```\n\nEarly stopping was used with `eval_metric='mae'` and `early_stopping_rounds=20`. Validation MAE stabilized quickly, showing strong generalization.\n\n\n\n## 📊 Optimization Strategy\n\n* All `.npy` files were validated and padded/truncated to standard shape.\n* Hyperparameter tuning was done manually via validation performance (test size 10%).\n* GPU acceleration (`tree_method='gpu_hist'`) significantly reduced training time.\n* Predictions were clipped and rounded to range \\[1, 100] as per domain constraints.\n\n📓 **Notebook:** [1st Place – Beyond Visible Spectrum 2025](https://www.kaggle.com/code/govindaramsriram/1-in-privatelb-beyond-visible-spectrum2025-1)\n<br>\n## 🏆 Final Thoughts\n\nThis solution balanced **performance**, **simplicity**, and **efficiency**. Despite testing deep learning approaches, the classic XGBoost model with domain-aware features gave the best results.\n\nThank you for Organizing Team hosting this excellent competition. Looking forward to future challenges!",
    "3206604": "First of all, huge , Govind, on securing the 1st position 🎉👏– truly well deserved! I also experimented with various model variants like ViT, SSATNet, ResNet models, and even custom 3D CNNs, but I couldn’t achieve stable or improved performance. I hadn’t considered using XGBoost, and your solution was a real eye-opener. I learned a lot from your approach – thank you for sharing it!",
    "3207745": "Congrats for winning it. It is interesting to see classical XGboost outperformed CNNs& ViTs. The key strategy of flattening and the reflectance engineered feature did the trick. Thanks for sharing it.\n\n> I flattened each (128×128×125) hyperspectral patch and computed band-wise mean reflectance"
  },
  "source": "meta"
}