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 (
integerorvectorofintegers, optional, default400) – 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 arraydropout (
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_flat_train, y_train)[source][source]¶
Train DenseNN Decoder
- Parameters:
X_flat_train (
numpy 2d arrayofshape [n_samples,n_features]) – 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_flat_test)[source][source]¶
Predict outcomes using trained DenseNN Decoder
- Parameters:
X_flat_test (
numpy 2d arrayofshape [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 arrayofshape [n_samples,n_outputs]