Description Usage Arguments Value Examples
conf.matrix is a function which is used to generate a confusion matrix.
1  | conf.matrix(p, x, tarvar = tarvar)
 | 
p | 
 the probability which is the threshold of the pred.If pred exceeds,it will be assigned to 1.otherwise,it will be assigned to 0.  | 
x | 
 the vector of the prediction of the xgboost model.  | 
tarvar | 
 the target variable which is compared to the prediction.  | 
a confusion matrix
1  | conf.matrix(0.5,x=c(0:1),tarvar=c(0:1))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.