Learn R Programming

lmap (version 0.2.4)

predict.mlr: The function predict.mlr makes predictions for a test/validation set based on a fitted mlr model

Description

The function predict.mlr makes predictions for a test/validation set based on a fitted mlr model

Usage

# S3 method for mlr
predict(object, newX, ...)

Value

This function returns an object of the class p.mlr with components:

Ghat

Predicted values (probabilities) for the test set

Arguments

object

An mlr object

newX

An N by P matrix with predictor variables for a test/validation set

...

additional arguments to be passed.

Examples

Run this code
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