[R] Confusion Table

reichm@@j m@iii@g oii sbcgiob@i@@et reichm@@j m@iii@g oii sbcgiob@i@@et
Thu Jan 17 01:31:15 CET 2019


R-Help

 

R-Help community is there an simple straight forward way  of changing my
confusion table output to list "Yes" before "No" rather than "No" before
"Yes" - R default.

 

# Making predictions on the test set.

tst_pred <- ifelse(predict(model_glm, newdata = default_tst, type =
"response") > 0.5, "Yes", "No")

tst_tab <- table(predicted = tst_pred, actual = default_tst$default)

tst_tab

 

##                    actual

## predicted   No  Yes

##          No  4817  113

##          Yes      18    52

 

Jeff


	[[alternative HTML version deleted]]



More information about the R-help mailing list