NaiveBayesRegression¶
- class NaiveBayesRegression(encoding_model='quadratic', res=100)[source][source]¶
Class for the Naive Bayes Decoder
- Parameters:
encoding_model (
string, default'quadratic') – what encoding model is usedres (
int, default100) – resolution of predicted values This is the number of bins to divide the outputs into (going from minimum to maximum) larger values will make decoding slower
- fit(X_b_train, y_train)[source][source]¶
Train Naive Bayes Decoder
- Parameters:
X_b_train (
numpy 2d arrayofshape [n_samples,n_neurons]) – This is the neural training 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 (training data)
- predict(X_b_test, y_test)[source][source]¶
Predict outcomes using trained tuning curves
- Parameters:
X_b_test (
numpy 2d arrayofshape [n_samples,n_features]) – This is the neural data being used to predict outputs.y_test (
numpy 2d arrayofshape [n_samples,n_outputs]) – The actual outputs This parameter is necesary for the NaiveBayesDecoder (unlike most other decoders) because the first value is nececessary for initialization
- Returns:
y_test_predicted – The predicted outputs
- Return type:
numpy 2d arrayofshape [n_samples,n_outputs]