Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/344553 )
Change subject: Stats: Invert "false" thresholds so they're correct ...................................................................... Stats: Invert "false" thresholds so they're correct Bug: T161250 Change-Id: I4efbdfaec44d24caf20e2548d05bb3d7c2490a1e --- M includes/Stats.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/53/344553/1 diff --git a/includes/Stats.php b/includes/Stats.php index 1c08a92..8dc2774 100644 --- a/includes/Stats.php +++ b/includes/Stats.php @@ -162,7 +162,10 @@ $stat = $config[ 'stat' ]; $outcome = $config[ 'outcome' ]; if ( isset( $statsData[ $stat ][ $outcome ][ 'threshold' ] ) ) { - return $statsData[ $stat ][ $outcome ][ 'threshold' ]; + $threshold = $statsData[ $stat ][ $outcome ][ 'threshold' ]; + // Thresholds reported for "false" outcomes apply to "false" scores, but we always + // apply thresholds against "true" scores, so we need to invert "false" thresholds here. + return $outcome === 'false' ? 1 - $threshold : $threshold; } $this->logger->warning( -- To view, visit https://gerrit.wikimedia.org/r/344553 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4efbdfaec44d24caf20e2548d05bb3d7c2490a1e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Catrope <r...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits