Skip to content

Model struggles with cumulative count data #158

Answered by lostella
nsgoneape asked this question in Q&A
Discussion options

You must be logged in to vote

@nsgoneape the issue with your first series, is that its variance is rather small compared to its mean. This makes the model run into some loss of precision issues (see Sec. 5.7 in the paper, especially Fig. 16(b)).

Simply shifting the series down by it's minimum value, and applying the opposite shift to the resulting forecasts, recovers the intended behaviour in this case. See my updated snippet:

import numpy as np
import pandas as pd
import torch
from chronos import ChronosPipeline
import matplotlib.pyplot as plt

# Load the ChronosPipeline
pipeline = ChronosPipeline.from_pretrained(
    "amazon/chronos-t5-tiny",  # using tiny model for local testing
    # device_map="cuda",
    # torch…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nsgoneape
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@nsgoneape
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants