Skip to content

Undocumented prediction_length threshold #27

@febner

Description

@febner

Thanks for you work, really enjoying it 🤩

One thing I was wondering though, if I turn up the prediction_length to > 2048,
the prediction drops to something close to 0.

MRE:

import pandas as pd
import numpy as np
from tirex import load_model
from tirex.util import plot_forecast

# load a TiRex model (automatically fetching the weights from HuggingFace)
model = load_model("NX-AI/TiRex")

# load example data and split into context (to be learnt from) and future values
data_base_url = "https://raw.githubusercontent.com/NX-AI/tirex/refs/heads/main/tests/data/"

# short horizon example: air passengers per month
ctx_s, future_s = np.split(pd.read_csv(f"{data_base_url}/loop_seattle_5T.csv").values.reshape(-1), [-59])

prediction_length = 2500

quantiles_s, mean_s = model.forecast(ctx_s, prediction_length=prediction_length)

print(f"Short series (number of air passengers per month): {prediction_length}")
plot_forecast(context=ctx_s, ground_truth=future_s, forecasts=quantiles_s[0])
Image

Guess it's an edgy benchmark case after all - just couldn't find any docs about that behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions