Hi MLforecast/Nixtla team, great great work with a...
# mlforecast
Hi MLforecast/Nixtla team, great great work with all the Nixtla python packages, thanks in advance for your patience with my question. • I found a really good tutorial for MLforecasts including target transforms that are nicely done in a plug and play manner. https://github.com/Nixtla/mlforecast/blob/main/nbs/docs/end_to_end_walkthrough.ipynb I found the following interface:
Copy code
class BaseTargetTransform(abc.ABC):
    def set_column_names(self, id_col: str, time_col: str, target_col: str):
        self.id_col = id_col
        self.time_col = time_col
        self.target_col = target_col
    def fit_transform(self, df: 'pd.DataFrame') -> 'pd.DataFrame':
        raise NotImplementedError
    def inverse_transform(self, df: 'pd.DataFrame') -> 'pd.DataFrame':
        raise NotImplementedError
Q: How would I go about coding my own MSTL decomposition target transform ?
I am asking because MSTL is part of statsforecast library already so I wonder if there is something built in. Thanks :)
Hey, thanks for the kind words. There's no built-in way at the moment but we've thought of supporting target transforms that take statsforecast models. Would your use case involve fitting the MSTL, subtracting its prediction from the current target and passing that to mlforecast?
yes something along those lines or perhaps have MSTL in the tsfeatures to generate seasonal component that can then be used as lagged feature, etc.