I have trained a normal CNN to recognize patients with a disease or not. I print the predicted values for the test set, and get the probability of the various images of belonging to a class rather than the other one... But there are two main problems. How do I know which class is '0' and which is '1'? And is there a function to quickly display if the results predicted within a certain probability are correct or wrong? like an array with 1s if the result predicted for that image is correct and 0 if not. The code is this:
pred = model.predict(test, steps=len(test))
predSeq = [] # if probability is higher than 0.5 assign 1, otherwise 0
for i in range(0,624):
if pred[i] >= 0.5:
predSeq.append(1)
else:
predSeq.append(0)
print(predSeq)