I have a dataframe like this, with one column being the label and the other columns being predictions
label pred1 pred2 pred3
0 Apple Apple Orange Apple
1 Orange Orange Orange Orange
I would like to extend this dataframe with the true positive rate (TP/TP+FN) for each row. This column should look like this:
Score
0 0.66
1 1.00
I am unsure on how to go on about this. Are there pandas functions that would help with this task?
Executable code: https://www.online-python.com/WP7wbgcqMS