`so_gaal_new.SO_GAAL` cannot be cloned: `criterion_name` is not stored, so `clone()` re-constructs with `criterion_name=None`
>>> from sklearn.base import clone
>>> from pyod.models.so_gaal_new import SO_GAAL
>>> clone(SO_GAAL())
ValueError: Invalid criterion name.SO_GAAL.__init__ (so_gaal_new.py:101-115) exposes criterion_name and forwards it to BaseDeepLearningDetector.__init__, which resolves it into self.criterion (base_dl.py:139-154) but never stores self.criterion_name. get_params() therefore reports criterion_name=None, and clone() passes that back into the constructor, which rejects it.
Why it matters: clone() is used by GridSearchCV, cross_val_score, Pipeline refits and PyOD's own test_model_clone pattern; this detector cannot go through any of them. The older so_gaal.SO_GAAL clones fine. (Any other subclass that exposes criterion_name, loss_func or criterion in its own signature would hit the same thing.)
Proposed fix: have BaseDeepLearningDetector.__init__ store loss_func, criterion, and criterion_name as given (it already stores criterion_params), keeping the resolved callable in self.criterion_ or resolving it in fit. Test: clone(SO_GAAL()).get_params()["criterion_name"] == "bce". Happy to PR.
Verified on v3.6.6; drafted with Claude Code assistance and checked by hand.
Source: yzhao062/pyod