The raw dataset provides 35 numeric features. Feature engineering expands this to 70 features by creating new variables that encode physical relationships the raw numbers alone cannot express. The goal is not to add noise but to give the model pre-computed signals — distance as a rate of danger, speed as a countdown clock, fire size as a fraction of proximity.
Two functions handle all engineering: engineer_features (core transformations, same across all model versions) and add_safe_features (two additional physics-based features validated separately). Engineering runs after imputation but before model training. A final replace([np.inf, -np.inf], np.nan).fillna(0) at the end of engineer_features ensures no division-by-zero or log-of-zero result enters the model.
Insights:
Engineering doubles the feature count from 35 to 70. Every new feature encodes a physical relationship that a gradient boosting split cannot easily reconstruct on its own from two raw columns simultaneously.
The largest group is Threat Composites (7 features) and Distance Transformations (7 features) — both rooted in dist_min_ci_0_5h, the single strongest raw predictor. Multiple views of the same signal let the model pick the view that produces the cleanest split at each tree node.
engineer_features is identical across all 7 GBSA configs and all 3 LGB horizons — the same 70 features go into every model. This ensures that blend weights compare apples to apples.
The "NEW" interaction features (8 in total) were added specifically for this submission and were CV-validated before inclusion. The comment in the notebook says dist_x_alignment gave +0.002 AUC at 12h. Nothing was added without evidence.
add_safe_features overwrites growth_pressure from engineer_features. The original was area_growth_rate * alignment_abs; the safe boost version is area_growth_rate * radial_growth_rate. The overwrite is intentional — both measure fire expansion pressure but the second combines two independent spread signals instead of one spread and one directional.
The single most important raw feature is dist_min_ci_0_5h — the minimum distance (in metres) between the fire perimeter and the nearest evacuation zone centroid. Seven transformations of this one number are created. Why so many? Because the relationship between distance and danger is not linear. A fire 500m away is not twice as dangerous as one at 1000m — it is many times more dangerous. Different transformations capture this non-linearity in different ways.
Insights:
inv_distance = 1 / (dist_km + 0.1) is the most predictive single feature in the dataset (confirmed by univariate ROC-AUC analysis). It expresses danger as a rate: a fire 0.5km away has inv_distance = 1/0.6 = 1.67 while a fire 5km away has 0.19 — a non-linear 8× difference for a 10× distance change. Raw distance cannot capture this.
dist_rank converts absolute distance into a percentile rank (0 to 1). WHY: this makes the feature scale-free. A fire at the 5th percentile of distance is in the top 5% most dangerous regardless of the actual kilometre value, which can vary year to year. Rank features are also robust to distribution shift between train and test.
log_distance compresses the long right tail of the raw distance distribution. The histogram above shows raw distance is heavily skewed; after log transform the distribution is near-symmetric, producing more uniform split thresholds in the tree.
inv_distance_sq amplifies extreme proximity. When a fire is very close, squaring the inverse makes the signal even stronger. This helps the model assign very high risk to fires already inside the critical zone.
dist_km_sq does the opposite — it amplifies large distances. Together with inv_distance_sq, the model has both ends of the distance spectrum represented with extra resolution.
How far away a fire is matters less than how fast it is closing. A fire 10km away moving at 2000 m/h arrives in 5 hours. A fire 2km away that is stationary may never arrive. The ETA group converts distance and closing speed into an estimated time of arrival, giving the model a direct countdown signal rather than forcing it to divide distance by speed internally.
Insights:
eta = dist / closing_speed gives hours until the fire front reaches the zone based on the current trajectory. When closing_speed ≤ 0.01 (fire stationary or retreating), ETA is set to 9999 — a sentinel value meaning "fire will not arrive under current conditions."
eta_effective = dist / (closing_speed + radial_growth_rate) is more realistic. It adds the fire's outward radial expansion to the closing speed. A fire that is barely moving toward the zone but growing rapidly in all directions can still reach the zone boundary. The scatter plot shows eta_effective < eta for all fires — effective ETA is always shorter or equal.
Both ETAs are log-transformed before use. Raw ETA spans 0 to 9999 — an enormous range that would dominate tree splits. log_eta compresses this to a manageable 0–9.2 range while preserving the ordering.
effective_closing (the sum closing_speed + radial_growth_rate) is itself stored as a feature column. WHY: the model may find this intermediate sum useful in combinations with other features, independent of its role in ETA computation.
WHY not just let the model learn dist / speed itself? Tree-based models cannot perform divisions — each split tests one feature against one threshold. Without pre-computing ETA, the model would need many splits across both distance and speed to approximate what ETA encodes in a single number.
Fire area at first observation (area_first_ha) tells you how large the fire already is. But a 500-hectare fire 50km away is very different from a 500-hectare fire 2km away. The geometry group creates features that express fire size as a fraction of distance — encoding how much of the horizon the fire occupies relative to the evacuation zone.
Insights:
fire_radius_km = sqrt(area × 10000 / π) / 1000 treats the fire as a circle and calculates its effective radius in km. This is a physics-based approximation — real fires are irregular, but this gives the model a meaningful scale reference for how large the threat is spatially.
radius_to_dist = fire_radius / dist is dimensionless — it asks "what fraction of the gap between fire and zone is the fire already filling?" A value of 0.8 means the fire's radius is 80% of the remaining distance, indicating near-contact.
log_area_dist = log(1 + area) − log(1 + dist) encodes the same relationship in log space. When this value is positive, the fire is large relative to its distance — high danger. When negative, the fire is small or far — lower immediate risk. The subtraction in log space is equivalent to the log of the ratio area/dist.
area_to_dist_ratio = area_first / (dist_km + 0.1) is the raw version of the same concept without log transform. The model receives both versions because trees may find different split thresholds more useful at different scales.
WHY compute fire radius from area rather than using area directly? Area in hectares grows with the square of radius. A fire doubling in radius quadruples its area. Using radius directly makes the scale linear with respect to the geographic threat, which is more interpretable as a distance-like quantity for the model.
Some features combine three or more raw signals into a single danger index. These are not arbitrary combinations — each composite has a physical interpretation grounded in how wildfires threaten evacuation zones. The threat composites group lets the model test a single compound condition ("this fire is fast AND close AND wind-aligned") rather than having to discover that relationship across multiple splits.
Insights:
threat_score = alignment_abs × closing_speed / log(dist) is the central composite feature. It combines three independent danger signals: how aligned the wind is with the fire-to-zone direction, how fast the fire is closing, and how close it already is. All three must be elevated simultaneously for threat_score to be high.
urgency_index = threat_score / (dist_km + 0.1) divides the threat score by distance again, making proximity even more decisive. WHY: in operational wildfire response, a fire that is slightly less threatening but very close is treated as more urgent than a more powerful fire that is far away. This feature encodes that operational priority.
has_movement = (num_perimeters_0_5h > 1).astype(float) is the only binary feature in the composite group. A fire with only one recorded perimeter in the first 5 hours either just started or has unreliable tracking — it may not be generating consistent speed and direction data. has_movement flags fires with confirmed multi-perimeter tracks as more reliably measured.
growth_pressure = area_growth_rate × alignment_abs appears twice in the notebook — once in engineer_features using alignment_abs, and once overwritten in add_safe_features using radial_growth_rate. The final version captures how much of the fire's expansion is physically spreading outward in metres per hour, multiplied by area growth rate — a pure fire intensity signal independent of closing direction.
threat_score_sq = threat_score² amplifies high-threat observations. For a fire with threat_score = 2, the squared version is 4. For a fire with threat_score = 0.1, it is 0.01. This compression makes the model more sensitive to fires that are genuinely extreme outliers on the threat scale
The final three groups are smaller but each encodes a qualitatively different type of signal. Zone flags convert continuous distance into categorical proximity bins matching real operational thresholds. Temporal features capture seasonal and diurnal fire behaviour patterns. Interaction features (all new in this submission) were each CV-validated before inclusion — none were added on intuition alone.
Insights:
zone_critical (dist < 5km), zone_warning (5–10km), zone_safe (>10km) convert continuous distance into hard operational bins. These thresholds match real wildfire emergency management categories. The model already has continuous distance — these binary flags add the ability to test "is this fire inside the critical zone?" as a single split rather than requiring the tree to re-discover that 5km is a meaningful threshold.
is_summer flags June, July, August — California and western US fire season. is_afternoon flags 12:00–20:00 — peak wind and temperature hours when fire spread rates are highest. Both are 0/1 binary features. WHY binary and not the raw month/hour numbers? Because the relationship is not monotonic — October is not "more dangerous" than August just because 10 > 8. Binary encoding captures the actual meaningful boundary.
will_reach_12h = (eta < 12), will_reach_24h = (eta < 24), will_reach_48h = (eta < 48) are binary flags derived from the pre-computed ETA. They directly answer the prediction question: at current speed, will this fire reach the zone before each horizon? WHY add these on top of log_eta? Because the model may learn different rules for fires that are "definitely arriving" vs "maybe arriving," and a hard binary flag expresses that boundary more cleanly than a continuous ETA value.
dist_x_alignment = dist_km × alignment_abs was CV-validated and gave +0.002 AUC at 12h per the notebook comment. It encodes the joint condition: the fire is both close AND wind-aligned toward the zone. Neither alone is as dangerous — a distant but perfectly aligned fire and a close but perpendicular fire are both less threatening than a close, aligned fire.
spread_speed_toward = centroid_speed_m_per_h × alignment_abs uses the centroid movement speed (how fast the fire's centre of mass moves) rather than the closing speed. This captures a different physical mechanism: a fire whose centre is moving quickly toward the zone in the wind direction is expanding its entire footprint toward the zone, not just its leading edge.