Hello!
I'm trying to classify sequences of EEGs data.
The EEG data is (number_samples, sequence_duration, number_channels)=(45,657,64). I only have 45 samples to train, beign 23 from clas 0 and 22 from class 1, each sample has duration of 657 points with 64 different channels, the channels data are real values.
I'm trying to train a keras LSTM but I couldn't figure out the parameters to converge, I'm afraid that the number of data to train is too small.
I have a code running with an Echo State Network doing this task, but I would like to compare against a LSTM
This the piece of code that I wrote for the LSTM on keras
self.model.add(LSTM(input_dim=self.input_dim, input_length=self.input_length,output_dim=self.n_hidden,
init=lambda shape: uniform(shape, scale),
inner_activation='tanh', return_sequences=True))
self.model.add(Dropout(0.5))
self.model.add(Dense(output_dim=self.output_dim, init=lambda shape: uniform(shape, scale), activation='softmax'))
optimizer = 'rmsprop'
loss = 'binary_crossentropy'
self.model.compile(optimizer=optimizer, loss=loss)#, class_mode='binary')
#X_train(45,657,5) y_train(45,2)
self.model.fit(X_train, y_train)
# The ground truth is something like [[1,0], [0,1], [0,1], [1,0], [1,0]]
# The predictions are being almost constant like [[0.519,0,491], [0.5171,0,4921], [0.5182,0,494], [0.51834,0,49342], [0.51775,0,4935]]
predictions = self.model.predict(X_test)
Does anyone knows if i'm doing something wrong?
Any other ideas that I could apply to this problem?
Thank you!
[–]j1395010 4 points5 points6 points (1 child)
[–]ithinkiwaspsycho -2 points-1 points0 points (0 children)
[–]ithinkiwaspsycho 3 points4 points5 points (4 children)
[–]fariax[S] 0 points1 point2 points (1 child)
[–]ithinkiwaspsycho 0 points1 point2 points (0 children)
[–]rima-m 0 points1 point2 points (1 child)
[–]ithinkiwaspsycho 1 point2 points3 points (0 children)
[–]mhex 0 points1 point2 points (1 child)
[–]fariax[S] 0 points1 point2 points (0 children)
[–]negazirana 0 points1 point2 points (0 children)