| .classify.and.predict {StabPerf} | R Documentation |
Trains a given classifier on the provided subset of the data, and predicting the outcome on another subset of the data
.classify.and.predict(train_indices, test_indices, selection, raw, classifier, predictor)
train_indices |
a set of indices, describing the subset of raw used for training |
test_indices |
a set of indices, describing the subset of raw used for predicting |
selection |
the set of features (=row-indices) not filtered out from raw |
raw |
the dataset used for training and predicting |
classifier |
an expression, that evaluates to a trained model for the test_indices of raw |
predictor |
an expression, that gives a prediction of the outcome for the train_indices of raw |
The expression-values are reduced to the spots/rows of selection and samples in train_indices. Labels are also reduced to train_indices, whereas raw$refseq, raw$genenames and raw$geneid are reduced to the ones indicated by selection. Then classifier is evaluated, providing the data in data. Afterwards the expression-values of test_indices are selected. Its outcome is predicted by evaluating predictor, again providing the data in data, the previously trained model in model. This must return a vector of labels.
labels |
vector of outcomes that is predicted for a training-set by the previously trained model |
compute.external, pipeline, .select
prediction <- .classify.and.predict(...)