LSTMClassification

class LSTMClassification(units=400, dropout=0, num_epochs=10, verbose=0)[source][source]

Class for the LSTM decoder

Parameters:
  • units (integer, optional, default 400) – Number of hidden units in each layer

  • dropout (decimal, optional, default 0) – Proportion of units that get dropped out

  • num_epochs (integer, optional, default 10) – Number of epochs used for training

  • verbose (binary, optional, default 0) – Whether to show progress of the fit after each epoch

fit(X_train, y_train)[source][source]

Train LSTM Decoder

Parameters:
  • X_train (numpy 3d array of shape [n_samples,n_time_bins,n_neurons]) – This is the neural data. See example file for an example of how to format the neural data correctly

  • y_train (numpy 2d array of shape [n_samples, n_outputs]) – This is the outputs that are being predicted

predict(X_test)[source][source]

Predict outcomes using trained LSTM Decoder

Parameters:

X_test (numpy 3d array of shape [n_samples,n_time_bins,n_neurons]) – This is the neural data being used to predict outputs.

Returns:

y_test_predicted – The predicted outputs

Return type:

numpy 2d array of shape [n_samples,n_outputs]