As a noob on auto-encoders and deep learning, i struggle with the following. I am trying to use an auto-encoder to perform anormality detection, on a vibration dataset, starting out with a reference set from nasa
Each data set consists of individual files that are 1-second vibration signal snapshots recorded at specific intervals. Each file consists of 20,480 points with the sampling rate set at 20 kHz.
Therefore the set contains both data for new & intact bearings, as well as bearing with emerging damages.
I have used a Keras + Tensorflow example, with this recent IBM example, that builds a 11 layer autoencoder.
# design network
model = Sequential()
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True))
model.add(Dense(3))model.compile(loss='mae', optimizer='adam')
def train(data):
data.shape = (s_t, timesteps, dim)
model.fit(data, data, epochs=50, batch_size=72, validation_data=(data, data), verbose=0, shuffle=False,callbacks=[LossHistory()])
data.shape = (samples, dim)
def score(data):
data.shape = (s_t, timesteps, dim)
yhat = model.predict(data)
yhat.shape = (samples, dim)
return yhat
In the IBM article it's stated :
"LSTMs want their input to contain windows of times",
and after this, the example timeseries of 3 axis * 3000 samples, are divided into 3*10 blocks of 300 samples.
When trying the auto-encoder out on the actual nasa dataset, with either OK data, for an intact bearing or a file with actual faults on the bearings, i struggle to find out, how to:
To shape my 20,480 sample file, into bites, or batches, suitable for training the network
Decide on how many neurons should be in the first layer
Determine
epochs
andbatch_size
Find a good balance between the number of neurons, and the number of training runs, as a reasonable tradeoff, that allows experimentation, without taking hours pr iteration.
When experimenting with a couple of experimental chosen dimensions, i am able to improve the loss through the encoder, but perhaps hitting one or more local minimas, before trying to feed a set with actual defects detected.
I would perhaps guess that a dataset like the above could be treated like bites of audio, e.g. train the NN to recognise the contents of a certain vibration signature, and map against know classes, like a shazam for vibration signatures, but i'm not sure that the similarities are overlapping enough.
Typically bearing damages are identified, using FFT contents, but i cannot see an auto-encoder work on frequency-bins, since the LSTM is expected to be superior only on time-series data.
Any clues on how to progress on above, would be highly appreciated ;-)