This section covers everything from model architecture through hyperparameter configurations, cross-validation strategy, IPCW weight computation, power calibration, ensemble blending, and final monotonicity enforcement. Two fundamentally different model families are trained in parallel — one designed for survival ranking, one for calibrated probability estimation — and their outputs are blended per horizon before being cleaned and submitted.
The competition metric is a hybrid: 30% C-index (ranking quality — does the model rank high-risk fires above low-risk ones?) and 70% calibration (are the probability values numerically accurate?). No single model architecture excels at both. GradientBoostingSurvivalAnalysis (GBSA) from scikit-survival is native to survival data and produces strong C-index scores because it is designed to model the relative ordering of event times. LightGBM trained as a binary classifier per horizon produces better-calibrated probabilities at specific time windows. The solution trains both and blends them, assigning higher weight to whichever family excels at each horizon.
Insights:
Total models trained: 525 (GBSA) + 225 (LGB) = 750. Every prediction in the submission is the average of 750 model outputs, not a single model. This is not brute force — each of the 750 contributes a slightly different view due to different configs, seeds, and fold assignments.
GBSA is a survival model: it receives (time, event) pairs where event=0 means censored. It does not know or need a specific time horizon to train. It outputs a survival function S(t) across all time, which is then evaluated at 12/24/48/72h. LGB cannot do this — it requires a hard binary label per horizon, which is why it is trained separately for each of the 3 horizons.
The 70% calibration weight in the metric explains why LGB is included at all. GBSA ranks well (C-index) but can overestimate or underestimate absolute probabilities. LGB with IPCW weights is explicitly optimized for probability accuracy at each horizon window.
prob_72h is hardcoded to 1.0 for all test samples — no model is trained for 72h at all. The reasoning from the notebook's predecessor (Sub_6): at 72 hours, nearly all fires in the training set have either hit or been censored, making the 72h probability reliably close to 1.0. This is a design choice, not a shortcut.
The pipeline is sequential, not parallel: GBSA finishes, then LGB runs, then calibration, then blend, then monotonicity. Each step's output feeds the next.
Seven distinct GBSA hyperparameter configurations are trained. The goal is not to find the single best config — it is to produce 7 configs that are good but disagree: each makes slightly different errors on different samples. Averaging over disagreeing models reduces variance. Configs 1–4 are inherited from Sub_6 (previously proven). Configs 5–7 are new: one uses shallower trees (depth=2) targeting 12h short-horizon prediction, one uses slower learning with more trees for higher regularisation, and one is an intermediate blend.
Insights:
Every config uses max_depth=3 except Config 5 which uses depth=2. A depth-2 tree makes at most 4 leaf splits — far shallower and less prone to overfitting on the 221-sample dataset. Config 5 was specifically added for the 12h horizon where the event rate is lowest (22.79%) and overfitting risk is highest.
min_samples_leaf ranges from 12 to 20 across configs. This is the primary regularisation knob for GBSA — it requires each leaf node to contain at least N training samples before a split is accepted. Higher values mean less aggressive splits, fewer memorized patterns. With only 221 training samples, min_samples_leaf=20 means a single leaf covers ~9% of the training data.
Config 6 uses learning_rate=0.003 and n_estimators=2500 — the most conservative config. Slow learning + many trees is a standard regularisation strategy: each individual tree contributes very little, so the model has to build up signal gradually. This config disagrees with faster-learning configs most at extreme predictions.
subsample (row subsampling fraction) ranges from 0.70 to 0.85. Each tree in GBSA only sees 70–85% of training rows, chosen randomly. This stochasticity means each tree in each config sees a slightly different dataset view. Combined with the 15-seed outer loop, each config sees hundreds of different dataset perspectives.
Configs 1–4 are identical to Sub_6 — they were not re-tuned because they were proven on a previous submission. Adding new configs (5–7) without removing the proven ones ensures backward compatibility: if the new configs hurt, their contribution is diluted by the existing 4.
LightGBM cannot work with censored survival data natively. The solution converts the survival problem into three binary classification tasks — one per horizon. For each horizon H, a training label is set to 1 if the fire hit within H hours (and event=1), and 0 otherwise. But censored samples near the horizon boundary are ambiguous: a fire censored at 20h with horizon 24h could have hit at 22h — we just don't know. IPCW (Inverse Probability of Censoring Weighting) handles this by computing how likely censoring was at each time point and upweighting the samples that survived it.
Insights:
The binary label conversion: for horizon H, y=1 if event==1 AND time <= H. But not all samples are used — the mask ~((event == 0) & (time < H)) removes ambiguous censored samples whose censoring time falls before the horizon. These samples cannot be given a label without knowing the true outcome.
IPCW weights are computed using a Kaplan-Meier-style censoring survival estimate G(t). Each uncensored event at time t is upweighted by 1/G(t) — the inverse probability that censoring had not yet occurred at that time. This corrects for the fact that censored samples over-represent shorter observation windows, which would bias the classifier toward predicting lower probabilities.
The 48h model has the least regularisation: reg_alpha=0.1, reg_lambda=1.0, min_child_samples=5. WHY: at 48h the event rate is 39.76% — more balanced data means the model can afford to be more expressive. The 12h model has the heaviest regularisation (alpha=1.0, lambda=3.0, min_child=10) because its positive rate is only 22.79%.
All three LGB configs use num_leaves of 4 or 7 — very small trees by LightGBM standards (default is 31). This matches the training set size: 221 samples. With num_leaves=4 and min_child_samples=10, each tree can produce at most 4 leaves, each backed by at least 10 samples. There is no room for memorisation.
WHY cv_lgb = StratifiedKFold(..., random_state=seed) instead of a fixed seed as in GBSA? For LGB, the fold split itself varies per seed. This means different seeds not only see different model initializations but also different fold assignments — more genuine diversity across the 15 seeds, producing stronger variance reduction when averaged.
Both model families use 15 seeds from a fixed list: [42, 123, 456, 789, 777, 1511, 2025, 2026, 279, 239, 314, 271, 100, 999, 555]. The first 10 were carried over from Sub_6 and are proven. The last 5 were added in this submission. For each seed, a full 5-fold cross-validation is run and averaged for the test predictions. The final test prediction for any single GBSA config is the mean over 75 model outputs (15 seeds × 5 folds).
Insights:
The stratification key in StratifiedKFold is the event column — each fold contains approximately the same proportion of event=1 (69/221 = 31.2%) samples. With only 69 positive events, an unstratified split could produce a fold with very few positives, making that fold's OOF predictions unreliable. Stratification prevents this.
GBSA CV uses random_state=42 always — the fold assignments are fixed. Only the model's internal random state changes with each seed. This means 15 seeds × 5 folds = 75 models, but they all train on the exact same folds. This isolates the seed's effect to model variance only, not fold variance.
For LGB the fold split uses random_state=seed — fold assignments change per seed. This gives 15 genuinely different cross-validation experiments per horizon. The trade-off is that OOF scores across seeds are not perfectly comparable, but test predictions benefit from fold-level diversity too.
The averaging formula is strictly hierarchical: within a seed, average over folds → within a config, average over seeds → across configs, average uniformly. No seed or fold gets extra weight. This makes the ensemble robust: no single model can dominate the prediction.
Total compute: 525 GBSA + 225 LGB = 750 model fits. Each GBSA model trains up to 2500 estimators. This is a computationally expensive submission — it was run on Google Colab with the full runtime.
After GBSA produces its test predictions, one post-processing step is applied before blending: the 24h column is raised to the power 1.1. This is called power calibration. POWER_CAL_24 = 1.1 — only the 24h column, only GBSA output, only before the blend. The value 1.1 was inherited from Sub_6 where it was determined empirically. No calibration is applied to 12h, 48h, or 72h.
Insights:
Raising a probability to a power > 1 always reduces it (for values in 0–1). 0.8^1.1 = 0.774, 0.5^1.1 = 0.467, 0.2^1.1 = 0.179. The correction is small but nonlinear — larger values get pushed down more than smaller values. This specifically targets the high end of GBSA's 24h distribution where overconfidence manifests.
WHY only 24h? GBSA's survival function is most unreliable at intermediate horizons. At 12h (short) and 72h (long), the survival function's extremes are more stable. At 24h, GBSA tends to assign probabilities that are higher than observed event rates — the calibration corrects this overestimation.
Power calibration is applied to GBSA predictions before blending, not after. This ensures the 95% GBSA weight at 24h contributes a calibrated value, not a raw overconfident one. Applying calibration after blending would dilute its effect since LGB's 5% contribution is already calibrated.
POWER_CAL_24 = 1.1 is defined as a named constant at the top of the notebook and guarded: if POWER_CAL_24 and POWER_CAL_24 != 1.0. This means setting POWER_CAL_24 = 1.0 turns off calibration — intentional design for ablation testing.
The 24h mean prediction after calibration: test_gbsa_cal[:, 1] has a lower mean than test_gbsa[:, 1]. This reduces the 24h prediction's contribution to the hybrid score's Brier component (Brier@24h weight = 0.3), improving calibration at a small cost to any ranking signal.
After calibration, the two model families are blended per horizon using fixed weights. The weights were determined in Sub_6 via LCB (Lower Confidence Bound) grid search and are not re-tuned here — the notebook comment explicitly says "DO NOT change these, they are tuned." The key pattern: GBSA dominates at 12h and 24h (survival ranking is most useful early), LGB takes over at 48h (calibration matters most at the peak Brier-weight window), and 72h is hardcoded entirely.
Insights:
The 48h flip is the most consequential blending decision. At 12h and 24h, GBSA contributes 95–97%. At 48h, LGB takes 55%. WHY the flip? The competition's Brier score weight is highest at 48h (0.4 vs 0.3 at 24h and 72h). At the highest-weight horizon, calibration accuracy matters most, and LGB IPCW is the calibration-focused model.
prob_72h = 1.0 for every test sample — this is not a model prediction, it is a hard decision. The rationale: the training data shows that by 72h, events are either confirmed or the observation window closes. The probability of a fire threatening an evacuation zone by 72 hours approaches certainty for any fire that is already active and tracked.
The blend is computed as a weighted sum, not a model stacking. There is no meta-learner. This is a design choice: with only 221 training samples, training a meta-learner on OOF predictions would overfit the meta-level. Fixed, hand-tuned weights are more robust on small datasets.
LGB is not trained for 72h at all. The dictionary lgb_cfgs only contains keys {12, 24, 48}. Training a binary classifier for 72h would require all training samples to have event=1 (since at 72h nearly all events have resolved), which would produce a degenerate classifier.
The blend formula in code: final[:, 0] = W_GBSA_12 * test_gbsa_cal[:, 0] + W_LGB_12 * lgb_test[12]. Each column of final is populated independently, which is important: the 24h column uses calibrated GBSA (test_gbsa_cal), not raw. This is the only column that receives the power transform before blending.
After blending, a single function enforces the physical constraint that fire probability must be non-decreasing over time: prob_12h ≤ prob_24h ≤ prob_48h ≤ prob_72h. A longer time window can only include more outcomes, never fewer. If a blended prediction violates this (e.g., prob_24h < prob_12h) due to model disagreement, np.maximum corrects it by setting the later horizon to the earlier value. The submission then passes 5 assertion checks before saving.
Insights:
enforce_monotonicity uses np.maximum(arr[:, i], arr[:, i-1]) — a pure element-wise operation. It does not average, smooth, or interpolate. If prob_24h < prob_12h for any sample, prob_24h is set exactly to prob_12h. No probability is ever reduced — only violations are raised to the previous horizon's value.
Violations arise because GBSA and LGB are blended independently per horizon. The 12h prediction uses 97% GBSA and 3% LGB; the 24h prediction uses 95% GBSA and 5% LGB — different mixing ratios for different models. A case where LGB@24h predicts lower than GBSA@12h can produce a blended violation.
prob_72h = np.ones(len(X_test)) is set before enforce_monotonicity runs. This guarantees prob_72h = 1.0 for every sample after the final clip. The monotonicity function then also ensures prob_48h ≤ 1.0 since all values are clipped to [0,1] first.
The notebook runs 5 hard assertions after submission is saved — if any fail, the notebook crashes. The assertions check: probs ≥ 0, probs ≤ 1, and all three monotonicity conditions (p24 ≥ p12, p48 ≥ p24, p72 ≥ p48). The output confirms: "All checks passed!" — the submission is guaranteed valid before upload.
The mean final predictions are: 12h=0.2116, 24h=0.2811, 48h=0.3002, 72h=1.0000. The progression is monotonic in the averages too — not just enforced sample-by-sample, but naturally so. This suggests the blend is physically consistent, not just patched.