# Time-series logistic regression

I'm trying to train a model with data that looks like this:

There are theoretical reasons to believe that the Y row can be predicted using the X rows, with a window of about 2 seconds. Note that this plot is just one example. There are around 100 time series like that in my dataset for training/validation.

I have a basic knowledge in ML, but never done anything with time series before, so I'm looking for some advice. I know that I can rearrange the data so that each sample will be a long vector containing window_size * features values, and pass it through a logistic regression, but I'm not sure that this is the best approach for a few reasons:

• The large feature vector (let's say ~200 values) might cause overfitting, isn't it?
• I saw examples that use LSTM and CRF for time series predictions. So there are probably reasons to use specialized algorithms for the tasks, but I don't know them properly to fully understand them. Will you suggest investing my time in these or stay with the a simpler logistic regression model for this type of data?
• Using logistic regression won't really take time into account. For example, trying to generate predictions for time series with different sampling period will be impossible without resampling. Are the models that are built specifically for time series take it into account automatically?

Also, this looks like a general problem to me, that probably have a general solution. So, hints to python libraries that are built to process such time series directly (without me having to rearrange the data first) will be great!

• The classic book on categorical time series regression is this – bdeonovic Jul 3 '17 at 12:16