DenseNNClassification

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

Class for the dense (fully-connected) neural network decoder

Parameters:
  • units (integer or vector of integers, optional, default 400) – This is the number of hidden units in each layer If you want a single layer, input an integer (e.g. units=400 will give you a single hidden layer with 400 units). If you want multiple layers, input a vector (e.g. units=[400,200]) will give you 2 hidden layers with 400 and 200 units, repsectively. The vector can either be a list or an array

  • 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_flat_train, y_train)[source][source]

Train DenseNN Decoder

Parameters:
  • X_flat_train (numpy 2d array of shape [n_samples,n_features]) – 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_flat_test)[source][source]

Predict outcomes using trained DenseNN Decoder

Parameters:

X_flat_test (numpy 2d array of shape [n_samples,n_features]) – 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]