{
  "id": 614129,
  "title": "8th Place Solution",
  "content": "<p>Thanks to <a href=\"https://www.kaggle.com/ambrosm\" target=\"_blank\">@ambrosm</a> for this great baseline <a href=\"https://www.kaggle.com/code/ambrosm/red-explained-baseline\" target=\"_blank\">here</a></p>\n<h3>Overview</h3>\n<p>This solution blends a lightweight statistical ensemble approach with time-series logic and handcrafted stability mechanisms. Despite its simplicity (no neural nets or heavy feature engineering), it performed competitively — placing <strong>8th on the private leaderboard</strong>.</p>\n<hr>\n<h3>💡 Key Ideas</h3>\n<ol>\n<li><p><strong>Local Statistical Models</strong>\nEach sector’s monthly transaction volume is modeled using log-space weighted averages of recent months — a robust alternative to exponential smoothing.</p>\n<ul>\n<li>The last <code>t1</code> months are aggregated using custom weight patterns (linear decay, exponential decay, Gaussian, etc.).</li>\n<li>Predictions are adjusted with simple <strong>seasonality multipliers</strong> and a <strong>scaled city search index (CSI)</strong> trend factor.</li></ul></li>\n<li><p><strong>Diverse Model Pool</strong>\nA large grid search explored combinations of:</p>\n<ul>\n<li><code>t1 ∈ {1, 3, 6, 9}</code> (lookback window)</li>\n<li><code>t2 ∈ {1, 2, 3}</code> (minimum-activity threshold)</li>\n<li><code>CSI scale ∈ {0.8, 0.9, 1.0, 1.1}</code></li>\n<li>Multiple weighting schemes (equal, decayed, Gaussian, etc.)</li></ul>\n<p>Around <strong>80 candidate models</strong> were ranked using a <strong>custom competition metric</strong>, and a subset of <strong>20 strong + 22 diverse</strong> models was selected.\nDiversity was promoted via <strong>correlation-penalized ranking</strong>, ensuring complementary behavior across folds.</p></li>\n<li><p><strong>Time-Aware Cross-Validation</strong></p>\n<ul>\n<li>Used <code>TimeSeriesSplit</code> with 4 folds and 12-month test windows.</li>\n<li>All validation scores were computed using the exact competition scoring function.</li></ul></li>\n<li><p><strong>Horizon-Specific Ensemble Optimization</strong>\nFinal blending was done <strong>per forecast horizon</strong>:</p>\n<ul>\n<li>Short-term (1–4 months)</li>\n<li>Mid-term (5–8 months)</li>\n<li>Long-term (9–12 months)</li></ul>\n<p>For each bucket, <strong>SLSQP optimization</strong> was used to find non-negative weights summing to 1, maximizing out-of-fold score while lightly regularizing with L2 and correlation penalties.</p></li>\n<li><p><strong>Stable Inference</strong>\nEach model produced test predictions independently, then horizon-dependent ensemble weights were applied row-wise.\nThis avoided horizon leakage and improved stability on volatile sectors.</p></li>\n</ol>\n<hr>\n<h3>⚙️ Technical Notes</h3>\n<ul>\n<li><strong>Libraries</strong>: Pure Python + NumPy/Pandas/SciPy + scikit-learn (for CV).</li>\n<li><strong>No heavy ML models</strong>: Entire pipeline executes in under a minute.</li>\n<li><strong>Reproducibility</strong>: Randomness controlled via deterministic NumPy ops and fixed splits.</li>\n</ul>\n<hr>\n<h3>📈 Results</h3>\n<table>\n<thead>\n<tr>\n<th>Metric</th>\n<th>Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Public LB</td>\n<td>0.59331</td>\n</tr>\n<tr>\n<td>Private LB</td>\n<td>0.50689</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h3>What did not work</h3>\n<p>XGB, LGBM, NN Models with lag features did not outperform this simple approach.</p>\n<p>P.S. This was written with the help of ChatGPT</p>",
  "comments": [],
  "comment_count": 0,
  "messages": [
    {
      "id": 3309765,
      "postDate": "2025-11-01T10:47:20.960Z",
      "content": "<p>Thanks to <a href=\"https://www.kaggle.com/ambrosm\" target=\"_blank\">@ambrosm</a> for this great baseline <a href=\"https://www.kaggle.com/code/ambrosm/red-explained-baseline\" target=\"_blank\">here</a></p>\n<h3>Overview</h3>\n<p>This solution blends a lightweight statistical ensemble approach with time-series logic and handcrafted stability mechanisms. Despite its simplicity (no neural nets or heavy feature engineering), it performed competitively — placing <strong>8th on the private leaderboard</strong>.</p>\n<hr>\n<h3>💡 Key Ideas</h3>\n<ol>\n<li><p><strong>Local Statistical Models</strong>\nEach sector’s monthly transaction volume is modeled using log-space weighted averages of recent months — a robust alternative to exponential smoothing.</p>\n<ul>\n<li>The last <code>t1</code> months are aggregated using custom weight patterns (linear decay, exponential decay, Gaussian, etc.).</li>\n<li>Predictions are adjusted with simple <strong>seasonality multipliers</strong> and a <strong>scaled city search index (CSI)</strong> trend factor.</li></ul></li>\n<li><p><strong>Diverse Model Pool</strong>\nA large grid search explored combinations of:</p>\n<ul>\n<li><code>t1 ∈ {1, 3, 6, 9}</code> (lookback window)</li>\n<li><code>t2 ∈ {1, 2, 3}</code> (minimum-activity threshold)</li>\n<li><code>CSI scale ∈ {0.8, 0.9, 1.0, 1.1}</code></li>\n<li>Multiple weighting schemes (equal, decayed, Gaussian, etc.)</li></ul>\n<p>Around <strong>80 candidate models</strong> were ranked using a <strong>custom competition metric</strong>, and a subset of <strong>20 strong + 22 diverse</strong> models was selected.\nDiversity was promoted via <strong>correlation-penalized ranking</strong>, ensuring complementary behavior across folds.</p></li>\n<li><p><strong>Time-Aware Cross-Validation</strong></p>\n<ul>\n<li>Used <code>TimeSeriesSplit</code> with 4 folds and 12-month test windows.</li>\n<li>All validation scores were computed using the exact competition scoring function.</li></ul></li>\n<li><p><strong>Horizon-Specific Ensemble Optimization</strong>\nFinal blending was done <strong>per forecast horizon</strong>:</p>\n<ul>\n<li>Short-term (1–4 months)</li>\n<li>Mid-term (5–8 months)</li>\n<li>Long-term (9–12 months)</li></ul>\n<p>For each bucket, <strong>SLSQP optimization</strong> was used to find non-negative weights summing to 1, maximizing out-of-fold score while lightly regularizing with L2 and correlation penalties.</p></li>\n<li><p><strong>Stable Inference</strong>\nEach model produced test predictions independently, then horizon-dependent ensemble weights were applied row-wise.\nThis avoided horizon leakage and improved stability on volatile sectors.</p></li>\n</ol>\n<hr>\n<h3>⚙️ Technical Notes</h3>\n<ul>\n<li><strong>Libraries</strong>: Pure Python + NumPy/Pandas/SciPy + scikit-learn (for CV).</li>\n<li><strong>No heavy ML models</strong>: Entire pipeline executes in under a minute.</li>\n<li><strong>Reproducibility</strong>: Randomness controlled via deterministic NumPy ops and fixed splits.</li>\n</ul>\n<hr>\n<h3>📈 Results</h3>\n<table>\n<thead>\n<tr>\n<th>Metric</th>\n<th>Score</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Public LB</td>\n<td>0.59331</td>\n</tr>\n<tr>\n<td>Private LB</td>\n<td>0.50689</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h3>What did not work</h3>\n<p>XGB, LGBM, NN Models with lag features did not outperform this simple approach.</p>\n<p>P.S. This was written with the help of ChatGPT</p>",
      "rawMarkdown": "Thanks to @ambrosm for this great baseline [here](https://www.kaggle.com/code/ambrosm/red-explained-baseline)\n\n### Overview\n\nThis solution blends a lightweight statistical ensemble approach with time-series logic and handcrafted stability mechanisms. Despite its simplicity (no neural nets or heavy feature engineering), it performed competitively — placing **8th on the private leaderboard**.\n\n---\n\n### 💡 Key Ideas\n\n1. **Local Statistical Models**\n   Each sector’s monthly transaction volume is modeled using log-space weighted averages of recent months — a robust alternative to exponential smoothing.\n\n   * The last `t1` months are aggregated using custom weight patterns (linear decay, exponential decay, Gaussian, etc.).\n   * Predictions are adjusted with simple **seasonality multipliers** and a **scaled city search index (CSI)** trend factor.\n\n2. **Diverse Model Pool**\n   A large grid search explored combinations of:\n\n   * `t1 ∈ {1, 3, 6, 9}` (lookback window)\n   * `t2 ∈ {1, 2, 3}` (minimum-activity threshold)\n   * `CSI scale ∈ {0.8, 0.9, 1.0, 1.1}`\n   * Multiple weighting schemes (equal, decayed, Gaussian, etc.)\n\n   Around **80 candidate models** were ranked using a **custom competition metric**, and a subset of **20 strong + 22 diverse** models was selected.\n   Diversity was promoted via **correlation-penalized ranking**, ensuring complementary behavior across folds.\n\n3. **Time-Aware Cross-Validation**\n\n   * Used `TimeSeriesSplit` with 4 folds and 12-month test windows.\n   * All validation scores were computed using the exact competition scoring function.\n\n4. **Horizon-Specific Ensemble Optimization**\n   Final blending was done **per forecast horizon**:\n\n   * Short-term (1–4 months)\n   * Mid-term (5–8 months)\n   * Long-term (9–12 months)\n\n   For each bucket, **SLSQP optimization** was used to find non-negative weights summing to 1, maximizing out-of-fold score while lightly regularizing with L2 and correlation penalties.\n\n5. **Stable Inference**\n   Each model produced test predictions independently, then horizon-dependent ensemble weights were applied row-wise.\n   This avoided horizon leakage and improved stability on volatile sectors.\n\n---\n\n### ⚙️ Technical Notes\n\n* **Libraries**: Pure Python + NumPy/Pandas/SciPy + scikit-learn (for CV).\n* **No heavy ML models**: Entire pipeline executes in under a minute.\n* **Reproducibility**: Randomness controlled via deterministic NumPy ops and fixed splits.\n\n---\n\n### 📈 Results\n\n| Metric     | Score |\n| ---------- | ----- |\n| Public LB  | 0.59331 |\n| Private LB | 0.50689 |\n\n---\n\n### What did not work\nXGB, LGBM, NN Models with lag features did not outperform this simple approach.\n\nP.S. This was written with the help of ChatGPT\n",
      "votes": 5
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-20T00:52:29Z",
  "competition_id": 111876,
  "competition_slug": "china-real-estate-demand-prediction",
  "team_id": 14249175,
  "solution_url": "/competitions/china-real-estate-demand-prediction/writeups/8th-place-solution"
}