Reputation: 3
I am using TensorFlow to implement object recognition. I followed this tutorial but use my own dataset. https://www.tensorflow.org/versions/r0.8/tutorials/mnist/pros/index.html#deep-mnist-for-experts
I used 212 positive samples and 120 negative samples to train. The test set contains 100 positive and 20 negative samples. The training precision is only 32.15%, but the test precision is 83.19%
I am wondering what makes the test precision is higher than training precision, is my data set not large enough? The data doesn't show any statistical meaning? Or it is a general thing, because I saw some people said the training precision doesn't make any sense. But why is that?
Upvotes: 0
Views: 1938
Reputation: 66795
There are two problems here.
First, precision is not a very good measure of performance when classes are unbalanced.
Second, and more important you have bad ratio of negative to positive in test set. Your test set should come from the same process as the training one, but in your case negatives are ~40% of the training set but only ~17% of the test set. Not very suprisingly - classifier which simply answers "true" for every single input, will get 83% precision on your test set (as positives are 83% of the whole data).
Thus it is not a matter of number of test samples, it is a matter of incorrect construction of training/test datasets. I can also imagine, that there are more issues with this split, probably there is a completely different structure in train and in test.
Upvotes: 2