Skip to content

test: end-to-end and FittedImputer tests for adaptive MICE #162

@DEVunderdog

Description

@DEVunderdog

Parent

#91

What to build

Add integration and serialisation tests that verify the fully adaptive MICE path end-to-end, after all four behaviour slices (#158, #159, #160, #161) are merged.

test_imputation_end_to_end.py — one new case:
Dataset with multiple MAR-suspect columns where at least one column has a non-linear relationship with the others. Assert:

  • Final imputed output contains no nulls
  • Every MICE column's ColumnImputationRecord.signals contains an estimator entry
  • Every MICE column's ColumnImputationRecord.signals contains a convergence-status entry (either the warning or confirmation of convergence)

test_fitted_imputer.py — two new cases:

  • transform() on a MICE-backed FittedImputer produces no nulls in the output (covering the new estimator variants — RandomForestRegressor, GradientBoostingRegressor)
  • to_dict() / from_dict() round-trip preserves the fitted IterativeImputer correctly for each new estimator variant (same contract as the existing MICE serialisation test, extended)

Acceptance criteria

  • End-to-end test with a non-linear MAR-suspect dataset passes: no nulls in output
  • All MICE column records in that test have a non-empty estimator signal
  • All MICE column records in that test have a convergence-status signal
  • transform() no-null test passes for RandomForestRegressor-backed MICE
  • transform() no-null test passes for GradientBoostingRegressor-backed MICE
  • to_dict() / from_dict() round-trip test passes for both estimator variants

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions