SVRegression

class SVRegression(max_iter=-1, C=3.0)[source][source]

Class for the Support Vector Regression (SVR) Decoder This simply leverages the scikit-learn SVR

Parameters:
  • C (float, default 3.0) – Penalty parameter of the error term

  • max_iter (integer, default -1) – the maximum number of iteraations to run (to save time) max_iter=-1 means no limit Typically in the 1000s takes a short amount of time on a laptop

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

Train SVR 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 SVR 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]