predict.BIM: predict.BIM

Description Usage Arguments Value References See Also Examples

View source: R/predict.BIM.R

Description

This function performs the predition for BIM algorithm (Boosted version of IMMIGRATE).

Usage

1
2
## S3 method for class 'BIM'
predict(object, xx, yy, newx, type = "both", ...)

Arguments

object

result of BIM algorithm

xx

model matrix of explanatory variables

yy

label vector

newx

new model matrix to be predicted

type

the form of final output

...

further arguments passed to or from other methods

Value

response

predicted probabilities for for new data (newx)

class

predicted class for for new data (newx)

References

Zhao, Ruzhang, Pengyu Hong, and Jun S. Liu. "IMMIGRATE: A Margin-based Feature Selection Method with Interaction Terms." Entropy 22.3 (2020): 291.

See Also

Please refer to https://www.mdpi.com/1099-4300/22/3/291/htm for more details.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(park)
xx<-park$xx
yy<-park$yy
index<-c(1:floor(nrow(xx)*0.3))
train_xx<-xx[-index,]
test_xx<-xx[index,]
train_yy<-yy[-index]
test_yy<-yy[index]
re<-BIM(train_xx,train_yy)
res<-predict(re,train_xx,train_yy,test_xx,type="class")
print(res)

RuzhangZhao/Immigrate documentation built on May 24, 2020, 5:38 a.m.