Should effects implement get_params() behavior so that their parameters can be set with set_params()?
@fkiraly:
That is not required by the API but I would see it as a good practice suggestion, or users will not have access to tuning and automl related to these in a more granular way than the entire hyperparameter (not the nested ones)
If the objects have a fixed set of parameters, or is a list, you can inherit from various scikit-base classes to give the API a nice sklearn-like flavour with get/set-params.
Concretely, what you could do in this case:
have AbstractEffect inherit from skbaseBaseObject - that will give it set_params, get_params and a couple other things. You can test conformance with sktimecheck_estimator, too.
idea: probably skbase should have a check_object too, which checks the minimal skbase API - but you can do via sktime atm.
For "list of AbstractEffect". you can inherit from BaseMetaObject. If you want lists of abstract effects to also be abstract effects, you can inherit BaseMetaObjectMixin and AbstractEffect.
would be keen to hear about the developer experience here, if you are going to try.
Design issue related to modularization of effects objects.
Transplanting some discussion from
sktime
here in relation to modularization of effects, from https://github.com/sktime/sktime/issues/6639#issuecomment-2178527551@felipeangelimvieira:
@fkiraly:
That is not required by the API but I would see it as a good practice suggestion, or users will not have access to tuning and automl related to these in a more granular way than the entire hyperparameter (not the nested ones)
If the objects have a fixed set of parameters, or is a list, you can inherit from various
scikit-base
classes to give the API a nicesklearn
-like flavour with get/set-params.Concretely, what you could do in this case:
AbstractEffect
inherit fromskbase
BaseObject
- that will give itset_params
,get_params
and a couple other things. You can test conformance withsktime
check_estimator
, too.skbase
should have acheck_object
too, which checks the minimal skbase API - but you can do viasktime
atm.AbstractEffect
". you can inherit fromBaseMetaObject
. If you want lists of abstract effects to also be abstract effects, you can inheritBaseMetaObjectMixin
andAbstractEffect
.