def closenessScores(self, expValues, actValues, **kwargs):
ratio = <NUM_LIT:1.0><EOL>esum = int(expValues.sum())<EOL>asum = int(actValues.sum())<EOL>if asum > esum:<EOL><INDENT>diff = asum - esum<EOL>if diff < esum:<EOL><INDENT>ratio = <NUM_LIT:1> - diff/float(esum)<EOL><DEDENT>else:<EOL><INDENT>ratio = <NUM_LIT:1>/float(diff)<EOL><DEDENT><DEDENT>olap = expValues & actValues<EOL>osum = int(olap.sum())<EOL>if esum == <NUM_LIT:0>:<EOL><INDENT>r = <NUM_LIT:0.0><EOL><DEDENT>else:<EOL><INDENT>r = osum/float(esum)<EOL><DEDENT>r = r * ratio<EOL>return numpy.array([r])<EOL>
Does a bitwise compare of the two bitmaps and returns a fractonal
value between 0 and 1 of how similar they are.

- ``1`` => identical
- ``0`` => no overlaping bits

``kwargs`` will have the keyword "fractional", which is assumed by this
encoder.