ibm-granite / granite-tsfm

Foundation Models for Time Series
Apache License 2.0
288 stars 152 forks source link

Too low loss and Too poor prediction #73

Open oglee815 opened 2 weeks ago

oglee815 commented 2 weeks ago

Hi, I am trying to train TTM from scratch on some stock price dataset(more than 200K samples, without almost no code modification except dataset load part) But it is strange.

Training loss is started with relatively very low value, like 0.000xx, and quickly converged. And when I plot the prediction values with test set, it looks very very flat linear line. It seems not trained at all.

Any suggestion to make modification to fit on some new dataset? 😢

wgifford commented 2 weeks ago

Hi @oglee815 is there a working example that you can share on a sample of your data?

oglee815 commented 1 week ago

My data looks like this:

date opening_price high_price low_price trade_price
2017-09-25 12:00:00 4201000.0 4220000.0 4195000.0 4216000.0
2017-09-25 12:16:00 4222000.0 4244000.0 4210000.0 4229000.0
2017-09-25 12:32:00 4219000.0 4225000.0 4204000.0 4204000.0
2017-09-25 12:50:00 4215000.0 4215000.0 4206000.0 4206000.0
2017-09-25 12:01:00 4213000.0 4222000.0 4204000.0 4204000.0

the values approximately have mean of 2.911540e+07, std of 2.309221e+07 total size = 348133, first epoch train loss = 0.000900 first epoch validation loss = 0.000482

But, when I use single target column and small size of training data, train loss becomes more reasonable (0.xx). I don't know why.