XGBOD.fit replaces estimator_list=None with the resolved list on the instance
Author: owgreen-devCreated Sep 20, 2026Updated Sep 26, 2026
XGBOD._validate_estimator (pyod/models/xgbod.py:244-251) assigns the resolved detector and flag lists back to self.estimator_list / self.standardization_flag_list when they were None.
>>> clf = XGBOD(); clf.get_params(deep=False)["estimator_list"]
None
>>> clf.fit(X, y); len(clf.get_params(deep=False)["estimator_list"])
9So get_params() changes on fit, clone() of a fitted instance carries a materialised list, and a refit on data of a different width keeps detectors sized for the old one.
Fix: keep the arguments as given; store the resolved lists as estimator_list_ / standardization_flag_list_. Happy to open the PR.
Verified on v3.6.6; drafted with Claude Code assistance and checked by hand.
Source: yzhao062/pyod