How to calculate mAP for multi-label classification using output predictions?

I have a model which predicts the actions happening in a video clip. Once I get these predictions, I use some rules(set of if-else conditions) to come up with composite labels for eg. action1_before_action2, action4_during_action5 etc.

I also have the ground truth for these composite labels. How do I calculate the mAP score using my composite predictions?

Notice, that for my composite predictions, I do not have sigmoid values.

More details

I have an action classification model that outputs the sigmoid values corresponding to a multi-label action dataset.

For eg. let the sigmoid output be:

[0.1 0.7 0.8 0.9]

For the above sigmoid outputs, I can easily calculate the mAP score. But there's manual processing involved using these outputs.

I set a threshold of 0.5 for a label to be considered true positive(TP). Based on this let's say I get the following output predictions:

[0 1 1 1]

I will get similar output predictions for multiple clips from a video. I will use these predictions to come up with composite labels.

Now I will have something like this for composite labels:

preds:  [0 1 0 1 0 1 0 1 1 0 1]
labels: [0 0 0 1 0 1 0 1 1 0 0]

For these sets of preds and labels how do I calculate the mAP score?

Topic model-evaluations evaluation

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.