Machine learning multiple regression with overlapping feature vectors

150 Views Asked by At

I'm trying to do some multiple regression analysis / machine learning. I wonder if the following is going to be sound from a mathematical point of view.

Suppose I'm trying to fit weather states, and I have the following sequence of events [sunny, sunny, windy,sunny, cloudy]. Can I construct overlapping feature vectors like this, starting from the second state. If it's not clear enough, I'm looking at each state and padding it with its two flanking neighbors.

[sunny, sunny, windy]
[sunny, windy,sunny]
[windy,sunny, cloudy]
1

There are 1 best solutions below

0
On

It looks like you are doing sequence prediction. In that case, I recommend an HMM model trained using EM algorithm or a LSTM recurrent neural network for sequence learning.

Constructing an overlapping feature vectors as described is equivalent to having a moving window of size 3 sliding along the state sequence. You can certainly do that as long as you generate your training signal for each window accordingly.