The numpy arrays contain prediction probabilities which looks like this:
predict_prob1 =([[0.95602106, 0.04397894],
[0.93332366, 0.06667634],
[0.97311459, 0.02688541],
[0.97323962, 0.02676038]])
predict_prob2 =([[0.70425144, 0.29574856],
[0.69751251, 0.30248749],
[0.7072872 , 0.2927128 ],
[0.68683139, 0.31316861]])
predict_prob3 =([[0.56551921, 0.43448079],
[0.93321106, 0.06678894],
[0.92345399, 0.07654601],
[0.88396842, 0.11603158]])
I want to compare these three numpy.ndarray elementwise and find out which array has the maximum probability as a result. Three of the arrays are of the same length. I have tried to implement something like this which is not correct.
for i in range(len(predict_prob1)):
if(predict_prob1[i] > predict_prob2[i])
c = predict_prob1[i]
else
c = predict_prob2[i]
if(c > predict_prob3[i])
result = c
else
result = array[i]
Please help!!