predict.mlr: The function predict.mlr makes predictions for a...

View source: R/predict.mlr.R

predict.mlrR Documentation

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 class 'mlr'
predict(object, newX, ...)

Arguments

object

An mlr object

newX

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

...

additional arguments to be passed.

Value

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

Ghat

Predicted values (probabilities) for the test set

Examples

## Not run: 
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, ])

## End(Not run)



lmap documentation built on April 3, 2025, 5:47 p.m.

Related to predict.mlr in lmap...