0
$\begingroup$

Goal: Classify time series data from a wind turbine as being anomalous or non-anomalus in real time and from there predict what the anomaly is in a later, more refined, model.

I have a CSV file with 6 columns corresponding to 6 sensors at uniform measurement. I know I need to separate these into separate vectors to vectors/tensors to run them through a 6 input NN.

My question is how do I create an LSTM that classifies data instead of predicting a value? Using a sigmoid?

$\endgroup$
1
$\begingroup$

It is very simple.

Just add a Dense layer (Keras-wise) with one unit after your LSTM network, with sigmoid activation. If you don't use Keras, Dense layer is simply a fully-connected neuron with one unit (in your case), which you can easily implement in the deep learning framework of your preference.

Then you can train your network to directly classify the input sequence using soft-labeling, so that it outputs a probability from 0 to 1 that a sequence is anomalous. Needless to say, you can have an arbitrary number of inputs, not just one.

Bottom line: use a fully-connected layer with one unit (neuron) and sigmoid activation after the LSTM output

$\endgroup$

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.