predict.MTL: Predict the outcomes of new individuals

View source: R/MTL.R

predict.MTLR Documentation

Predict the outcomes of new individuals

Description

Predict the outcomes of new individuals. For classification, the probability of the individual being assigned to positive label P(y==1) is estimated, and for regression, the prediction score is estimated

Usage

## S3 method for class 'MTL'
predict(object, newX = NULL, ...)

Arguments

object

A trained MTL model

newX

The feature matrices of new individuals

...

Other parameters

Value

The predictive outcome

Examples

#Create data
data<-Create_simulated_data(Regularization="L21", type="Regression")
#Train
model<-MTL(data$X, data$Y, type="Regression", Regularization="L21",
    Lam1=0.1, Lam2=0, opts=list(init=0,  tol=10^-6, maxIter=1500)) 
predict(model, newX=data$tX)


RMTL documentation built on May 2, 2022, 5:06 p.m.