0
$\begingroup$

I am trying to classify the state of a machine using different features coming from a set of sensors.

I am treating the problem like a time series, so I windowed the stream of the sensors each X seconds so that every sample has size ( X * s_f ).

I am obtaining fairly good results using a CNN but I would like to increase performances using some kind of approach that understands the patterns between different states.

For example if going from state A to B is more frequent than A->C I want the algorithm to include this in the classification.

My idea is to classify each sample taking into account the classification of the previous sample. How can I do this?

$\endgroup$
1
$\begingroup$

The approach you describe is predicting base on the features of the current step and the previous states.
If you believe that there is information on the previous states, than i would try to approach this problem in the Time Series approach.

The algorithms in this approach basically do what you request for, they predict based on the features of the current step and based on the previous states. You can learn about the approach to understand it better in this cs231n video.

You can also look for tutorials on implementing models that fit the time-series problem.
The most popular model i know is caleld LSTM.
Here is a tutorial on implementing LSTM in keras.

I hope you will find it these helpful.
If you have any more questions or you would like more guidance, just let me know :)

$\endgroup$
  • $\begingroup$ I don't think you got my request because in my case, in the Test Set, the state is what I am searching for and each sample has a state. $\endgroup$ – Francesco Pegoraro Nov 24 '18 at 12:09
  • $\begingroup$ But with unseen data this doesn't work! Imagine the test is 20 seconds of measurement from the sensors. I window it at 5 seconds, so I have 4 sample and I want to classify the state the machine was in for every sample. I don't have the state the machine was in so I miss the feature state! My idea is more to classify the first sample, than classify the second with an additional feature, which is the state predicted at the previous sample. $\endgroup$ – Francesco Pegoraro Nov 24 '18 at 13:24
  • 1
    $\begingroup$ I've deleted my previous comment because i realized it doens't match your request yet. I'm writing a new comment not :) $\endgroup$ – Gal Avineri Nov 24 '18 at 13:27
  • $\begingroup$ My original idea was this: Say there is some probability dependency between the current state and the next state. If the features vector indicates on the current state, than there must be some probability dependency between the feature vectors as well. Therefore i would assume that a well trained lstm would require only the feature vectors, and it would take into consideration the current state and the dependency probability when predicting the next state. But i understand you would still prefer to explicitly insert the previous state as a feature. and you might be right, it might help. $\endgroup$ – Gal Avineri Nov 24 '18 at 13:33
  • $\begingroup$ ok this is a good point. The problem is I don't know if this apply to my case. Imagine having a testset like I described, how would you define this relationship between different samples? $\endgroup$ – Francesco Pegoraro Nov 24 '18 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.