I want to have the prediction probabilities of each class in a binary classification as sklearn's predict_proba, but with tensorflow.
in sklearn I managed to get a probability for each class with predict_proba and created a csv file like :
final_predictions = final_model.predict_proba(X_test)
sample_submission = pd.DataFrame(
data = {
'Id':test_df.Id,
'class_0':final_predictions[:,0],
'class_1':final_predictions[:,1]
}
)
sample_submission.to_csv('submission.csv',index=False)
I want to recreate the same result but for tensorflow, but I'm stuck because tensorflow doesn't have a predict_proba method to get a probability for each class.