Closed ArchanaNarayanan843 closed 3 months ago
Can we use this model for forecasting on our custom data as of now?
Yes! You can follow the following example to convert your CSV file (here the CSV file has 2 columns; the first column is "time" which includes time stamps, and the second column is "value" which includes the values of the target variable):
context_length = 32
prediction_length = 48
freq = "1H"
# Read the CSV file
df = pd.read_csv('.\Test.csv', parse_dates=['time'], index_col='time')
df.index = df.index.to_period(freq)
time_series = df['value'].values
# Assuming a single time series for simplicity; for multiple series, adjust accordingly
start = df.index[0]
train_ds = ListDataset(
[{'target': time_series[:-prediction_length], 'start': start}],
freq=freq
)
test_ds = ListDataset(
[{'target': time_series, 'start': start}],
freq=freq
)
for import ListDataset function;
from lag_llama.gluon.estimator import LagLlamaEstimator
Thanks
Hi! Thank you for the issue, and thank you @turkalpmd for the efforts! We'll be adding a tutorial soon with options to load datasets in several formats (such as CSV). We appreciate your patience; thanks!
Hi @ArchanaNarayanan0210 @ArchanaNarayanan843 , we uploaded a new Colab demo with a tutorial to use a CSV dataset.
Please check it and let us know if your dataset fits into one of the categories explained there.
Closing this issue since it's stale. Feel free to open it if required.
Thanks, Arjun
Can we use this model for forecasting on our custom data as of now?