I thought I'd seen documentation at some point on ...
# mlforecast
b
I thought I'd seen documentation at some point on how to implement models not already included in MLForecast. I'd like to try the EBM model. Am I recalling that correctly? Can anyone point me to the documentation if so? I've looked and just cannot find it if it does exist.
t
yeah there is a quick example here: https://nixtlaverse.nixtla.io/mlforecast/docs/getting-started/end_to_end_walkthrough.html
Copy code
from sklearn.base import BaseEstimator

class Naive(BaseEstimator):
    def fit(self, X, y):
        return self

    def predict(self, X):
        return X['lag1']
Copy code
fcst = MLForecast(
    models=[Naive()],
    freq=1,
    lags=[1],
    target_transforms=[LocalStandardScaler()]
)
fcst.fit(df)
preds = fcst.predict(1)
preds
it can use anything that follows a sklearn fit/predict pattern
b
Thanks, @Tyler Blume. I'll give this a try soon. Much appreciated!