hi users I have a data frame in with there are two colomns real values and predicted ones (for a dichotomic response). How can i obtain a confusion matrix (miscalssification rat and errors)? The costs are egal. Thanks -- View this message in context: http://r.789695.n4.nabble.com/confusion-matrix-tp3787363p3787363.html Sent from the R help mailing list archive at Nabble.com.
Try the table() function. ?table For example, df <- data.frame(real=sample(0:1, 20, replace=T), pred=sample(0:1, 20, replace=T)) table(df) pred real 0 1 0 3 7 1 4 6 Jean Doussa wrote on 09/02/2011 08:46:42 PM:> > hi users > I have a data frame in with there are two colomns real values andpredicted> ones (for a dichotomic response). > How can i obtain a confusion matrix (miscalssification rat and errors)? > The costs are egal. > > Thanks[[alternative HTML version deleted]]