0
votes

I am doing ANN binary classification in Keras and model has sigmoid layer at the end. Do samples get classes assigned (using predict_classes) using sigmoid function based probabilities (generated by model_predict )? I mean, when probability < 0.5, class 0 is assigned and class 1 for probability > 0.5?

1

1 Answers

2
votes

You are predicting a probability in binary classification. By default, the threshold is 0.5, which is mean, that propabilities below 0.5 belong to 0 class and others belong to 1.

But sometimes data scientists increase or decrease the threshold. For example, if you want to find malicious tumors, it is better to make the mistake that there is a tumor.

You can read about presicion and recall.