API for using LTSF-Linear easily.
https://github.com/cure-lab/LTSF-Linear
LTSF-Linear is the SOTA of the long-time series forecasting model.
And this is from the paper "Are Transformers Effective for Time Series Forecasting?"
- High accessibility
It is deep-learning model, but very efficient.
So, you can use this model without expensive GPU. - High Performance

(You can check this benchmark in this site)
It recorded the highest performance on time-series-prediction.
- Code
from function import *
import pandas as pd
from yahooquery import Ticker
raw=Ticker('AAPL').history(period='1y').xs('AAPL')
window_size,forecast_size=30,10
''' 1. preprocess raw data '''
date, data=split_data(raw,'adjclose')
''' 2. build dataloader '''
dataloader=build_dataLoader(data,
window_size=window_size,
forecast_size=forecast_size,
batch_size=4)
''' 3. train and evaluate '''
pred=trainer(data,
dataloader,
window_size=window_size,
forecast_size=forecast_size).implement()
''' 4. plot the result '''
figureplot(date,data,pred,window_size,forecast_size) - Code
from function import *
import pandas as pd
window_size, forecast_size = 24*7,24
raw=pd.read_csv('./data/서인천IC-부평IC 평균속도.csv',encoding='CP949').set_index('집계일시').drop('Unnamed: 0',axis=1)
plt.plot(raw)
plt.show()
''' 1. preprocess raw data '''
date, data=split_data(raw,0,index=True)
''' 2. build dataloader '''
dataloader=build_dataLoader(data,
window_size=window_size,
forecast_size=forecast_size,
batch_size=4)
''' 3. train and evaluate '''
pred=trainer(data,
dataloader,
window_size=window_size,
forecast_size=forecast_size).implement()
''' 4. plot the result '''
figureplot(date,data,pred,window_size,forecast_size) - Data
- Prediction



