predict.BIM {Immigrate} | R Documentation |
predict.BIM
Description
This function performs the predition for BIM algorithm (Boosted version of IMMIGRATE).
Usage
## 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
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)
[Package Immigrate version 0.2.1 Index]