XGBoostClassification¶
- class XGBoostClassification(max_depth=3, num_round=300, eta=0.3, gpu=-1)[source][source]¶
Class for the XGBoost Decoder
- Parameters:
max_depth (
integer, optional, default3) – the maximum depth of the treesnum_round (
integer, optional, default300) – the number of trees that are fiteta (
float, optional, default0.3) – the learning rategpu (
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 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 1d arrayofshape (n_samples),with integers) –- representing classes or 2d array of shape [n_samples, n_outputs] in
1-hot form. 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 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 1d array with integers as classes