powered by
The function predict.mlr makes predictions for a test/validation set based on a fitted mlr model
# S3 method for mlr predict(object, newX, ...)
This function returns an object of the class p.mlr with components:
p.mlr
Predicted values (probabilities) for the test set
An mlr object
mlr
An N by P matrix with predictor variables for a test/validation set
additional arguments to be passed.
if (FALSE) { data(dataExample_mru) y = as.matrix(dataExample_mru[ , 1]) X = as.matrix(dataExample_mru[ , 2:6]) output = mlr(y = y, X = X, base = 1) preds = predict(output, newX = X[1:4, ]) }
Run the code above in your browser using DataLab