Skip to content

Instantly share code, notes, and snippets.

@sanity
Created July 1, 2009 16:57
Show Gist options
  • Select an option

  • Save sanity/138912 to your computer and use it in GitHub Desktop.

Select an option

Save sanity/138912 to your computer and use it in GitHub Desktop.
for (final ValidationTransaction vt : results) {
transCount++;
if (vt.actual == 1.0) {
chargebackCount++;
}
if (transCount > (totalResults * 0.3) && chargebackCount / (double) transCount > 0.01) {
log.info("Threshold: " + vt.predicted);
chargebackCount--;
transCount--;
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment