Re: [R] misclassification matrix

2010-10-06 Thread Gregory Ryslik
Hi, Thanks for the help! The prop.table definitely will save some time but my question is how would you actually build the "mat" matrix. What I have now is 1000 matrices that are nx1 which have a predicted value for each of the n observations. I want to count then how many elements are really

Re: [R] misclassification matrix

2010-10-06 Thread Tom Fletcher
I think what you are looking for is ?table and/or ?prop.table So, let's say you have two matrices: ACTUAL and CLASS, you can ... table(ACTUAL, CLASS) Or, diag(1-prop.table(table(ACTUAL, CLASS), 1)) to get row percentages and take the diagonal. So, using your example: # table() as above w