What is the best way to measure the accuracy of function, which gives set of elements as output and we know the desired set of elements.

Suppose,

Actual expected output = {a1, a3}

Experimental output = {a1, a5, a6}

The accuracy measure should consider the number of correct elements and also the number of wrong elements.