Dear I am working on KNN method where a is a resultant classified matrix lets a=[1:1:1:3:1:1:10:3:1:1]. Now I want to write a program that calculates the accuracy of how many 1(ones) are in a. If you do not know KNN method then take it as a simple problem of finding the percentage or weight-age of 1(one) in whole column matrix a. Please any one help me.

Regards.

## Best Answer