2.4 branch backport
added negative tests to get tp/fn/fp/fn and accuracy
accuracy tests
cleanup
Merge commit '07934169302b00dfbd62c8ab32bb575a07777fe1' into 2.4
Merge commit '17674636b277787487e5a2fe14c0555692cb3753' into 2.4
Merge commit '307e991184778dee26f55b91782464d5ee66cac4' into 2.4