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

Unified Diff: appengine/findit/crash/project_classifier.py

Issue 2649503002: [Predator] Switch from scorer-based classifier to loglinear classifier. (Closed)
Patch Set: Fix nits. Created 3 years, 10 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/predator.py ('k') | appengine/findit/crash/test/findit_for_chromecrash_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/project_classifier.py
diff --git a/appengine/findit/crash/project_classifier.py b/appengine/findit/crash/project_classifier.py
index 665a73426fa955e3709aabf76e106074d5e34c98..ecf09b0483101f8f99eec85392444267704e6dd8 100644
--- a/appengine/findit/crash/project_classifier.py
+++ b/appengine/findit/crash/project_classifier.py
@@ -47,15 +47,11 @@ class ProjectClassifier(object):
rank_function = None
if crash_stack.language_type == LanguageType.JAVA:
def RankFunctionForJava(occurrence):
- # TODO(wrengr): why are we weighting by the length, instead of
- # the negative length as we do in the DefaultOccurrenceRanging?
- weight = len(occurrence)
- project_name = occurrence.name
- if 'chromium' in project_name:
+ if 'chromium' in occurrence.name:
index = 0
else:
- index = self.non_chromium_project_rank_priority[project_name]
- return (weight, index)
+ index = self.non_chromium_project_rank_priority[occurrence.name]
+ return -len(occurrence), index
rank_function = RankFunctionForJava
« no previous file with comments | « appengine/findit/crash/predator.py ('k') | appengine/findit/crash/test/findit_for_chromecrash_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698