sktime
sktime copied to clipboard
[ENH] A base template for DL esimators
Is your feature request related to a problem? Please describe. As discussed in dev-days-2022, adding a base template for DL estimators to ease users to add them.
Related to that (As we discussed during your talk - thanks btw!): It seems necessary to extend the fit method of the base class (sktime/classification/deep_learning/base.py). We should introduce a dict to pass arguments to keras. I am happy to work on that after finishing my first dl classifier port (inceptiontime) from sktime-dl.
Hm, design-wise, I would avoid adding additional arguments to fit
where possible.
The deep learning algorithms should comply with BaseForecaster
, BaseClassifier
, and so on, and to comply with the "strategy pattern", the public functions always must have the same signature.
Otherwise estimators of the same type are not easily exchangeable.
The "usual" way would be to add them to the constructor, and patch them through.
Examples of that can be found in the models from statsmodels
and pmdarima
that we have interfaced.
Which fit
arguments are you considering to add?
Hey @tobiasweede , So @fkiraly and I had a small discussion related to this during the daily standup and:
- I am assuming that you want to introduce a way to specify various different parameters that keras.fit takes into the dl classes
- Franz suggested that instead of having a dict of arguments in
fit
function, we could specify it in the__init__
of the DL class, so as to avoid having to change different class structures. I also agree with the idea, and think that we could ask for an arguments called, say.fit_args
in the__init__
function, which we can use in thefit
and pass it askwargs
of keras.fit
@tobiasweede, I've assigned this to you and put it on the deep learning project board for tracking. Talk to you later!
Hey @tobiasweede , any update on this?
Note: I am excepting in tests the CNNNetwork
from test_inheritance
until this issue is resolved.
Then, we should either register it as a base class or add a rule in the test for concrete classes that inherit directly from BaseObject
(the latter is currently not allowed).