// handle special cases Estimator and Model, just use their parameters.
if hasattr(self, "get_params"):
res.update(self.get_params())
// remember if it has been estimated.
res["_estimated"] = self._estimated
try:
After Change
inc = self._get_state_of_serializeable_fields(klass)
// get estimation parameter for all classes in the hierarchy too.
if issubclass(klass, BaseEstimator):
up = {k: getattr(self, k, None) for k in klass._get_param_names()}
inc.update(up)
res.update(inc)