Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#755·pyod

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.

python
>>> clf = XGBOD(); clf.get_params(deep=False)["estimator_list"]
None
>>> clf.fit(X, y); len(clf.get_params(deep=False)["estimator_list"])
9

So 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

View original on GitHubView discussion on GitHub