R/generic_functions.R
get_predictions.Rd
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.
get_predictions(cl_obj, training_set, test_set)
The classifier object.
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).
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).
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.