CheXNet-Keras icon indicating copy to clipboard operation
CheXNet-Keras copied to clipboard

Predictions very low (p<< 0.5)

Open gmarceca opened this issue 4 years ago • 5 comments

Hello, After running python test.py I found reasonable <AUROC> result (~0.80) but all the predictions are very low (<< 0.5). Why is this happening?. I would have expected predictions to be below or above p ~ 0.5, since each task is binary classification... The ROC curves look fine but after choosing very low thresholds...

Here are some outputs examples:

predictions: [[2.1949896e-04 2.5974975e-10 3.2518754e-05 2.2396650e-03 1.0748411e-06 5.3286135e-06 2.3767587e-08 1.8565892e-07 2.9599332e-06 6.0097425e-09 2.2628668e-09 5.6686780e-09 1.7793096e-07 2.8444550e-16]] process image: 00014716_007.png

predictions: [[1.7701820e-04 9.9891839e-10 1.2038935e-04 2.1879091e-03 2.9724788e-06 4.3491709e-06 1.5626190e-08 8.1510120e-07 4.9612390e-06 5.9254237e-09 3.1557206e-09 7.8512441e-09 3.9710633e-07 5.7806499e-16]] process image: 00029817_009.png

predictions: [[1.3384523e-04 1.7685409e-10 2.9474650e-05 5.9209261e-03 9.6525923e-07 3.6600391e-06 4.1517431e-08 2.1312287e-07 8.2614024e-06 5.4943364e-08 1.8906021e-09 2.7751146e-09 1.3156065e-07 8.6311956e-17]] process image: 00014687_001.png

predictions: [[5.5539206e-04 5.5167826e-10 1.7801076e-04 2.8877158e-03 1.1419656e-06 2.0136347e-06 1.9730347e-08 6.7405063e-07 1.5730091e-05 4.5662714e-09 1.4418623e-09 2.6214038e-09 4.0143416e-07 2.9864267e-16]] process image: 00017877_001.png

gmarceca avatar Jul 29 '19 19:07 gmarceca

I have same issue. Also, it seems to make same predictions for me.

I made a model with train.py and exported the model. Arrays below are 5 predictions for 5 another images: [[1.0278821e-04 0.0000000e+00 1.0794401e-04 5.3415537e-02 4.7683716e-07 1.2218952e-06 0.0000000e+00 3.5762787e-07 3.5762787e-07 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.2431727e-07 0.0000000e+00]]

[[1.1217594e-04 0.0000000e+00 9.9003315e-05 5.9618354e-02 3.2782555e-07 9.2387199e-07 0.0000000e+00 3.5762787e-07 3.5762787e-07 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0360918e-07 0.0000000e+00]]

[[1.1008978e-04 0.0000000e+00 8.2045794e-05 5.2121758e-02 4.1723251e-07 1.2814999e-06 0.0000000e+00 2.9802322e-07 3.2782555e-07 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.2353841e-07 0.0000000e+00]]

[[1.0111928e-04 0.0000000e+00 9.0301037e-05 4.6933353e-02 5.3644180e-07 1.7881393e-06 0.0000000e+00 4.1723251e-07 3.5762787e-07 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.3132224e-07 0.0000000e+00]]

[[9.0539455e-05 0.0000000e+00 1.2430549e-04 5.2667677e-02 6.2584877e-07 1.8477440e-06 0.0000000e+00 5.0663948e-07 3.5762787e-07 0.0000000e+00 0.0000000e+00 0.0000000e+00 2.0546827e-07 0.0000000e+00]]

Talkwarrior avatar Mar 30 '20 07:03 Talkwarrior

Hi @gmarceca, @Talkwarrior, did you find any fix for the problem?

koriavinash1 avatar Jun 25 '20 14:06 koriavinash1

Nope, I couldn't find out.

Talkwarrior avatar Jul 27 '20 10:07 Talkwarrior

Same here, any ideas why this is the case? How to choose the classification label based on this output?

artembelopolsky avatar Feb 19 '21 14:02 artembelopolsky

@gmarceca I observed you get high probability for 4th class for every image , did you resolved that

swapnil666 avatar Sep 05 '22 12:09 swapnil666