XGBoostRegression

class XGBoostRegression(max_depth=3, num_round=300, eta=0.3, gpu=-1)[source][source]

Class for the XGBoost Decoder

Parameters:
  • max_depth (integer, optional, default 3) – the maximum depth of the trees

  • num_round (integer, optional, default 300) – the number of trees that are fit

  • eta (float, optional, default 0.3) – the learning rate

  • gpu (integer, optional, default -1) – if the gpu version of xgboost is installed, this can be used to select which gpu to use for negative values (default), the gpu is not used

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

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