get_predictions.cl_poisson_naive_bayes: A classifier (CL) method to train the CL and return...

View source: R/cl_poisson_naive_bayes.R

get_predictions.cl_poisson_naive_bayesR Documentation

A classifier (CL) method to train the CL and return predictions

Description

get_predictions takes a training set and a test set of data. It trains the CL object on the training set and returns the predictions of the on the test set. This is a generic function that must be implemented by all CL objects. This method should not be called directly but instead it is used internally by the cross-validator (CV) object.

Usage

## S3 method for class 'cl_poisson_naive_bayes'
get_predictions(cl_obj, training_set, test_set)

Arguments

cl_obj

The classifier object.

training_set

The training set data from one time bin. This is a data frame where the rows correspond to data from a given trial. There must be a column called train_labels that has the labels of what occurred on each trial. The rest of the columns correspond to the neural activity of a particular site on each trial (and typically have names like site_0001, site_0002, etc).

test_set

The test set data from all times. This is a data frame where the rows correspond to data from a given trial. There must be a column called time_bin that contains a label indicating the time point that a row (test point) came from. The rest of the columns correspond to the neural activity of a particular site on each test trial (and typically have names like site_0001, site_0002, etc).

Value

This method returns a data frame where each row corresponds to a prediction for one of the test points. The columns in this data frame are:

  • test_time: The time bin a test point came from.

  • actual_labels: The actual labels for what happened on a trial.

  • predicted_labels: The predictions that classifier made.

  • decision_vals.___: A set of columns with the decision values for each class.

See Also

cl_max_correlation(), cl_poisson_naive_bayes(), cl_svm()


emeyers/NeuroDecodeR documentation built on March 17, 2024, 6:05 p.m.