Keras input for multivariate classification with LSTM using current features and previous timesteps features and y values I am working on a multivariate binary classification problem. What I want to do is to predict a binary classification given the features at the current timestep and the data (features+real classification) from past timesteps

Keras seems to have a problem with the shape of my inputs so I want to know what I am doing wrong:

X_train = (nb_samples, nb_timesteps, nb_features) 
y_train = (nb_samples, nb_timesteps, binary_result)

model = Sequential() 
model.add(LSTM(nb_units,
               input_shape = X_train.shape[1:]
              )) 
Dense(1,activation='softmax')  
model.compile(loss='categorical_crossentropy',optimizer='adam',metrics=['accuracy']) 

history = model.fit(X_train, y_train, epochs=ep, validation_data=(X_train, y_train), verbose=2, shuffle=False)
Since you want to get a classification/output per each time step, you should set return_sequences=True in you LSTM layer. 

Read more about return_sequences here in LSTM documentation.