Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1685)

Unified Diff: appengine/findit/crash/scorers/aggregator.py

Issue 2157433002: [Findit] Pass changed files info to Fracas, 2 face design. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nits. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/findit/crash/scorers/aggregated_scorer.py ('k') | appengine/findit/crash/scorers/aggregators.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/scorers/aggregator.py
diff --git a/appengine/findit/crash/scorers/aggregator.py b/appengine/findit/crash/scorers/aggregator.py
deleted file mode 100644
index 8798a502bff7977211a95886b3ef8b73b054bda7..0000000000000000000000000000000000000000
--- a/appengine/findit/crash/scorers/aggregator.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Aggregator aggregates all the scorers passed in.
-
-Multiplies scores together and combines reasons and summaries the result.
-"""
-
-
-class Aggregator(object):
-
- def __init__(self, scorers):
- self.scorers = scorers
-
- def ScoreAndReason(self, result):
- """Sets result.confidence and result.reason."""
-
- score = 1.0
- reason = ''
- for i, scorer in enumerate(self.scorers):
- current_score, current_reason = scorer(result)
- # TODO(katesonia): Compare this mutiply aggregator with a vector of scores
- # aggregator later.
- score *= current_score
- reason += '(%d) %s\n' % (i + 1, current_reason)
-
- reason += '\n%s' % str(result)
-
- result.confidence = score
- result.reason = reason
« no previous file with comments | « appengine/findit/crash/scorers/aggregated_scorer.py ('k') | appengine/findit/crash/scorers/aggregators.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698