Coder Social home page Coder Social logo

Comments (7)

afshinebtia avatar afshinebtia commented on May 20, 2024

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
)

from lag-llama.

turkalpmd avatar turkalpmd commented on May 20, 2024

for import ListDataset function;

from lag_llama.gluon.estimator import LagLlamaEstimator

from lag-llama.

turkalpmd avatar turkalpmd commented on May 20, 2024

Example full code here

from lag-llama.

ArchanaNarayanan0210 avatar ArchanaNarayanan0210 commented on May 20, 2024

Thanks

from lag-llama.

ashok-arjun avatar ashok-arjun commented on May 20, 2024

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!

from lag-llama.

ashok-arjun avatar ashok-arjun commented on May 20, 2024

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.

from lag-llama.

ashok-arjun avatar ashok-arjun commented on May 20, 2024

Closing this issue since it's stale. Feel free to open it if required.

Thanks,
Arjun

from lag-llama.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.