TransWikia.com

Convert time series data to supervised learning problem

Data Science Asked by bws on May 23, 2021

I have a similar dataset like the one below. Each row represents a person and there are 3 different variables m1,m2,m3 with 3 measurements each.
I am trying to frame this time series problem as a supervised learning problem so i can train an SVM and/or random forest.

id Age gender m1_1 m2_1 m3_1 m1_2 m2_2 m3_2 m1_3 m2_3 m3_3 label
1 20 M 12.4 34 12 13 324 34 34 232 12 0
2 30 M 123.4 324 2 32 32 4 3 2 2 1

My idea would be to reshape the data like this: Note that I only did for the first row on the dataset above

id Age gender m1 m2 m3 Label
1 20 M 12.4 34 12 0
1 20 M 13 324 34 0
1 20 M 34 232 12 0

Basically, if there are 3 measurements per variable, I’d have 3 rows to reflect this information.

Am I going in the right direction with this approach? If not, could you point me to the right direction?

Thank you for taking your time in advance.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP