powered by
ConfusionMatrix(y_true, y_pred)
data(cars) logreg <- glm(formula=vs~hp+wt, family=binomial(link = "logit"), mtcars) pred <- ifelse(logreg$fitted.values<0.5, 0, 1) ConfusionMatrix(y_true=mtcars$vs, y_pred=pred)
Run the code above in your browser using DataLab