Styxis
Company
Knowledge

HGB errors on all-missing features: check observation semantics before filling with 0

Replacing unobserved values with arbitrary numbers to avoid a training failure changes the data's meaning.

HGB errors on all-missing features: check observation semantics before filling with 0

When an all-missing feature stops training, filling it with 0 may appear to be an easy way forward. Yet no observation and an observed value of 0 convey different information. Check support for an empty observation set and the reason for retaining the feature before an error workaround invents data. [1, 2, 3]

Scope of the source report

A public scikit-learn report diagnoses an IndexError in the HGB threshold path for all-missing support. It explicitly describes an isolated replay combining a current-main Python function with locally modified native modules, not a complete main installation test. Retain that boundary rather than implying verified behavior of an entire distribution. [1]

What to inspect in the input

Separate all-missing and ordinary features in a small input, preserving valid support counts and the original missingness mask. Consider supported missing-value handling or feature exclusion, then reconcile any observations inserted by the workaround. Preservation of the original observation meaning should be checked before treating training completion as success. [1, 3]

A small acceptance example

If all 20 values in an illustrative feature are unobserved, there is no basis to turn them into 20 observations of numeric 0. Under a missingness-preservation contract, an inserted-observation count of 0 passes and 20 fails. A domain explicitly defining absence as actual 0 requires a separate semantic policy. [1, 3]

The boundary passed to Truthound

Truthound Core's ExpressionValidator can check that a prepared inserted_observation_count is 0 under the missingness-preservation policy. The operator supplies the original mask and replacement history. This component does not repair HGB's empty-support error or turn the report's restricted replay into an independent reproduction of a particular installation. [1, 2, 3]

Application conditions

Calculate inserted-observation counts from the original missingness mask and replacement history, linking them to an approved preservation policy.

Alternatives

Explicitly review supported missing-value handling or feature exclusion, preserving the original mask.

Limitations

  • The check neither repairs HGB's empty-support error nor independently confirms failure in a particular distribution.

Evidence

Event checked
Subject checked
Modified