when i plot roc im expecting straight line to top left (point(0,1) and then to top right(1,1) as mine confusion matrix was 100%
why im getting staright line as below
expected
Best Answer
Why do you think you'd get any more points on the ROC curve than 1 from a single confusion matrix? You won't. One confusion matrix will give you one point on the curve. This is because the sum of the columns in a row (not including the column on the diagonal) of your confusion matrix gives you exactly one false positive rate, not a whole bunch of them even though you analyzed a whole bunch of images to get that confusion matrix. So you get one point on the ROC curve. Then you have to change your algorithm parameters and run the test again and get another point, presumably with different false positive rate this time. Then, to build up the curve by getting a bunch of points on it, you need to repeat that (changing your parameters) until you get as many points along the curve as you want.
Your false positive rate is always 0 and you have just one point on it. If you want, you can add (0,0) and (1,1) to make the L shaped curve, but there's no requirement that your experiment will ever have those points. It's possible that with the given data, no matter what you do you'll never get 100% true positives, though you did here in what is probably a very noise-free, synthetic example, not a real world, noisy data set.
Since you haven't provided the dataset on which you are wokring it is difficult to say that you model has been overfitted or not. Generally overfitting takes place when we have limited data for training or when we train the model for more epochs than required, in order to reduce the training error over a small dataset or for more number of epochs the model tends to learn the details of the dataset and not the general trend. Try giving different number of epochs and check the graph for loss at each epoch, the point at which the loss stops decreasing is generally the point of epochs at which you should stop the training process.
Buy a monitor with higher resolution, or use a dual-monitor setup.
Note: "displaying at 67%" means that every 2 pixels of display will represent 3 pixels of the original image. The whole image is going to be displayed, just squeezed to fit. It doesnot mean that only the first 2/3 of the image are displayed.
Best Answer