seglearn
seglearn copied to clipboard
Dataframe of multiple multivariate time series
I have a z different time series with different lengths. For each time series, there are a different number of time points with timestamps and for each time point, there is an m different features and observed float outcome for this time point. My aim is modeling a regressor (given m features what is the outcome). I have trained a regressor by omitting the temporal dimension of a dataset (train on all data points using m features and predict the outcome), but it resulted in a poor result. (Multiple multivariate time series with different length and sampling frequency)
My aim is to add temporal dimension for each time point (like adding new features on rolling fashion, for each time point, mean of past values of features, std of past feature values etc). I could not find any example of adding new features to a data frame of Multiple multivariate time series with different length and sampling frequency. Can you help me?
I have been working on a update that will keep timestamps as part of the dataframe, which would enable the type of work you want to do. You would have to create a new transformer class to do this. Rolling averages have some significant limitations though. Hard to know best approach without knowing your application and the timescale of the dynamics. For activity recognition, you just need to make the window length long enough to observe the activity.
For problems where long term dynamics inform current prediction, different approach is needed. For instance:
Gerard Oleary has used exponential decaying features to capture this for seizure detection, though he didn't use the seglearn package: http://www.eecg.toronto.edu/~roman/professional/pubs/pdfs/jssc18_nurip.pdf
Good luck