v2.4.0 | Report Errata
docs development docs development

Each feature computation must have unit tests verifying four properties. First, the feature’s output must match the specification in the feature registry; if the registry declares that a feature is computed as a ratio of two source columns, the test verifies that the computation produces the documented ratio. Second, the computation must be deterministic: the same input must produce the same output across repeated executions and across training and serving environments.

Third, the feature must handle missing input values according to the documented imputation strategy. If the feature registry specifies median imputation for a given feature, the test verifies that null inputs are replaced with the training-set median, not the test-set median or zero. Fourth, the feature’s output range must fall within the expected bounds documented in the registry. A feature expected to produce values between 0 and 1 that occasionally produces 1.001 due to floating-point arithmetic may cause downstream issues.

These tests serve a dual purpose. They verify the correctness of the feature engineering code, and they verify that the feature engineering code is consistent with the feature registry documentation. A mismatch between the two, where the code does one thing and the registry documents another, is a traceability gap.

Key outputs

  • Registry-match tests verifying code against feature registry specifications
  • Determinism tests across repeated executions and environments
  • Imputation strategy tests per documented imputation method
  • Output range validation tests
On This Page