GRURegression¶
- class GRURegression(units=400, dropout=0, num_epochs=10, verbose=0)[source][source]¶
Class for the gated recurrent unit (GRU) decoder
- Parameters:
units (
integer, optional, default400) – Number of hidden units in each layerdropout (
decimal, optional, default0) – Proportion of units that get dropped outnum_epochs (
integer, optional, default10) – Number of epochs used for trainingverbose (
binary, optional, default0) – Whether to show progress of the fit after each epoch
- fit(X_train, y_train)[source][source]¶
Train GRU Decoder
- Parameters:
X_train (
numpy 3d arrayofshape [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 correctlyy_train (
numpy 2d arrayofshape [n_samples,n_outputs]) – This is the outputs that are being predicted
- predict(X_test)[source][source]¶
Predict outcomes using trained GRU Decoder
- Parameters:
X_test (
numpy 3d arrayofshape [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 arrayofshape [n_samples,n_outputs]