You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refresh target stats on every fit_with_differentiable_input call
Address gemini-code-assist review on PR #923: the second fit
call previously skipped re-normalising y, leaving y_train_mean_,
y_train_std_, raw_space_bardist_ stuck on the first fit's stats —
silently miscaling predictions when the new target distribution
differed.
Split _initialize_for_differentiable_input into:
- _initialize_for_differentiable_input: first-call-only setup
(categorical check, feature schema, ensemble configs). Cached
in self.ensemble_configs_.
- _refresh_targets_for_differentiable_input: per-call setup
(validate_dataset_size, z-normalise y, rebuild raw_space_bardist_,
update n_train_samples_). Runs on every fit.
fit_with_differentiable_input's else branch now calls the per-call
helper so subsequent fits track the current target distribution
while still reusing the loaded model and ensemble configs.
Add test__fit_with_differentiable_input__second_call_refreshes_target_stats
that fits twice with very different y distributions and checks
y_train_mean_, y_train_std_, and raw_space_bardist_.borders all move.
0 commit comments