facebookresearch / Kats

Kats, a kit to analyze time series data, a lightweight, easy-to-use, generalizable, and extendable framework to perform time series analysis, from understanding the key statistics and characteristics, detecting change points and anomalies, to forecasting future trends.
MIT License
4.85k stars 530 forks source link

kats.models.LSTM not working!! #292

Open nebiyebulan opened 1 year ago

nebiyebulan commented 1 year ago

When I run kats' lstm model with bo code, it freezes and does not output. `df = pd.read_csv('uni_session_neww.csv', sep=';') df.columns = ['time', 'value']

print(df.head())

ts=TimeSeriesData(df)

ts.plot(cols=['value'])

plt.show()

logging.basicConfig(level=logging.DEBUG) params = LSTMParams( hidden_size=5, # number of hidden layers time_window=6, num_epochs=30 )

m = LSTMModel(ts, params) m.fit(verbose=1) fcst = m.predict(steps=720) print(fcst.head())

m.plot() plt.title('LSTM') plt.show()`

LSTM