Time series classification - Preparing data

♀尐吖头ヾ 提交于 2020-06-13 10:46:06

问题


Looking for help on preparing input data for time series classification. The data is from a bunch of users who need to be classified. I want to Use LSTMs(plan to implement via Keras, with Tenserflow backend). I have data in two formats. Which is the right way to feed to RNNs for classification? Any help regrading the input shape would be of great help.

Format 1

UserID TimeStamp Duration Label
1 2020:03:01:00:00 10 0
1 2020:03:01:01:00 0 0
1 2020:03:01:02:00 100 0
1 2020:03:01:03:00 15 0
1 2020:03:01:04:00 150 0
2 2020:03:01:00:00 5 1
2 2020:03:01:01:00 2 1
2 2020:03:01:02:00 50 1
2 2020:03:01:03:00 125 1
2 2020:03:01:04:00 75 1

Format 2

UserID D1H0 D1H1 D1H2 D1H3 D1H4 Label
1 10 0 100 15 150 0
2 5 2 50 125 75 1

In Format 2 the D1H0 through D1H4 represents day 1 and hour 0 through day1 hour 4

Thanking you in advance.

来源:https://stackoverflow.com/questions/60984606/time-series-classification-preparing-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!