lstm for predict

I have a data set that wants to predict s2 column by LSTM?
how can do it?

r     date       time        c   s1      s2
1   2020-06-01	00:00:00	42	74.5	73.0
2	2020-06-01	00:15:00	46	73.0	74.0
3	2020-06-01	00:30:00	50	75.5	76.0
4	2020-06-01	00:45:00	34	77.0	80.0
5	2020-06-01	01:00:00	29	81.0	80.0
6	2020-06-01	01:15:00	18	76.5	78.0
7	2020-06-01	01:30:00	22	79.5	77.5
8	2020-06-01	01:45:00	26	71.0	75.0
9	2020-06-01	02:00:00	16	76.5	81.5
10	2020-06-01	02:15:00	18	83.5	76.0
11	2020-06-01	02:30:00	8	71.0	74.0
12	2020-06-01	02:45:00	7	80.0	79.0
13	2020-06-01	03:00:00	11	71.0	74.0
14	2020-06-01	03:15:00	12	76.5	76.0
15	2020-06-01	03:30:00	9	70.0	75.0
16	2020-06-01	03:45:00	6	79.5	77.5
17	2020-06-01	04:00:00	8	77.5	80.0
18	2020-06-01	04:15:00	8	82.5	79.0
19	2020-06-01	04:30:00	13	76.0	81.0
20	2020-06-01	04:45:00	12	82.5	83.5
21	2020-06-01	05:00:00	12	86.0	82.5
22	2020-06-01	05:15:00	6	75.0	82.0
23	2020-06-01	05:30:00	25	84.0	82.0
24	2020-06-01	05:45:00	30	81.5	81.0
25	2020-06-01	06:00:00	38	81.0	78.0
26	2020-06-01	06:15:00	65	77.0	74.0
27	2020-06-01	06:30:00	65	73.0	72.0
28	2020-06-01	06:45:00	106	72.0	72.0
29	2020-06-01	07:00:00	96	71.0	72.0
30	2020-06-01	07:15:00	103	73.0	73.0
31	2020-06-01	07:30:00	111	73.0	72.0
32	2020-06-01	07:45:00	89	70.0	71.0
33	2020-06-01	08:00:00	150	71.0	70.0
34	2020-06-01	08:15:00	125	69.0	68.0
35	2020-06-01	08:30:00	171	67.0	69.0
36	2020-06-01	08:45:00	125	72.0	70.0
37	2020-06-01	09:00:00	121	67.0	66.0
38	2020-06-01	09:15:00	154	65.0	66.0
39	2020-06-01	09:30:00	149	67.0	68.0
40	2020-06-01	09:45:00	158	69.0	68.0
41	2020-06-01	10:00:00	167	67.0	68.0
42	2020-06-01	10:15:00	141	68.0	65.0
43	2020-06-01	10:30:00	138	62.5	65.0
44	2020-06-01	10:45:00	142	69.0	68.0
45	2020-06-01	11:00:00	120	67.0	68.0
46	2020-06-01	11:15:00	127	69.0	69.0
47	2020-06-01	11:30:00	160	69.0	69.0
48	2020-06-01	11:45:00	155	70.0	67.0
49	2020-06-01	12:00:00	133	66.0	68.0
50	2020-06-01	12:15:00	134	70.0	70.0

Rob Hyndman has a free ebook that you may find helpful:

Forecasting: Principles and Practice
https://otexts.com/fpp3/

See Chapter 7 for TSLM examples.

Why would you suggest this ebook, since this chapter you referred to doesnt include examples for his actual question?

imo the best ressources to learn keras R are:

https://blogs.rstudio.com/ai/#Time_Series

Sorry, due to a combination of bad eyes and methodological bias I confused LSTM with TSLM.

Thanks for the link, looks like an interesting technique where a more unsupervised approach is required.

Thanks
What is best way for modeling and predict this dataset? Time series or LSTM?

I am by far not an expert for modeling, but for your dataset it may not need such a complex model. It seems that s1 column is slightly decreasing as time goes on and c initially decreases as well to a certain time point and then increases. The date column is irrelevant since its not changing at all. With a simple linear model and time, c and s1 as your independent variables, you should get good predictions.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.