why I am getting TP and FP in confusion matrix is 0, how to get it right? why I am getting TP and FP in confusion matrix is 0, how to get it right?
tp = 0,fp = 0,tn = 9847,fn = 18

The confusion Matrix looks like this:

Now, since you have only values popping for True Negative and False Negative, this would mean that in your TARGET feature, you mostly have One class values present in majority.
For example:

If in the above image you have only results popping for Non-Cancer, this could be because of the below reasons:

*

*Class - Imbalance : If so, try to even out the classes using sampling technique from sklearn.

*Overfitting : It is very much possible that due to imbalance, the model fails to learn pattern of one class and gets biased towards another class.

References: https://en.wikipedia.org/wiki/Confusion_matrix
Let me know if this helps.
