Collects the function to be used for making predictions and any associated parameters.
Creates a default PredictParams object. This assumes that the object returned by
the classifier has a list element named "class".
PredictParams(predictor, intermediate = character(0), getClasses, ...)
Creates a PredictParams object which stores the function which will do the
class prediction, if required, and parameters that the function will use. If the training
function also makes predictions, this must be set to
NULL or a function to make predictions with. If it is
a function, then the first argument must accept the classifier made in the training step.
The second argument must accept a
DataFrame of new data.
Character vector. Names of any variables created in prior stages in
runTest that need to be passed to the prediction function.
function to extract the vector of class predictions
from the result object created by
Other arguments that
predictor may use.
1 2 3 4 5
predictParams <- PredictParams(predictor = DLDApredictInterface, getClasses = function(result) result) # For prediction by trained object created by DLDA function. PredictParams(predictor = NULL, getClasses = function(result) result) # For when the training function also does prediction and directly returns the # predictions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.