conf.matrix: conf.matrix

Description Usage Arguments Value Examples

View source: R/conf_matrix.R

Description

conf.matrix is a function which is used to generate a confusion matrix.

Usage

1
conf.matrix(p, x, tarvar = tarvar)

Arguments

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.

Value

a confusion matrix

Examples

1
conf.matrix(0.5,x=c(0:1),tarvar=c(0:1))

zhangyuqiangarchie/XGBparsel2 documentation built on Dec. 23, 2021, 9:18 p.m.