Chromium Code Reviews| Index: chrome/browser/history/scored_history_match.h |
| diff --git a/chrome/browser/history/scored_history_match.h b/chrome/browser/history/scored_history_match.h |
| index 15a37e7bd73673dc4efe2ca93a5e29a06d3e8d59..52fac2db2a5188c24446caf9b3a6cdabb3827d37 100644 |
| --- a/chrome/browser/history/scored_history_match.h |
| +++ b/chrome/browser/history/scored_history_match.h |
| @@ -83,6 +83,7 @@ class ScoredHistoryMatch : public history::HistoryMatch { |
| private: |
| friend class ScoredHistoryMatchTest; |
| + FRIEND_TEST_ALL_PREFIXES(ScoredHistoryMatchTest, GetFinalRelevancyScore); |
| FRIEND_TEST_ALL_PREFIXES(ScoredHistoryMatchTest, ScoringBookmarks); |
| FRIEND_TEST_ALL_PREFIXES(ScoredHistoryMatchTest, ScoringDiscountFrecency); |
| FRIEND_TEST_ALL_PREFIXES(ScoredHistoryMatchTest, ScoringScheme); |
| @@ -128,9 +129,34 @@ class ScoredHistoryMatch : public history::HistoryMatch { |
| // Combines the two component scores into a final score that's |
| // an appropriate value to use as a relevancy score. |
|
Mark P
2015/02/11 21:57:29
This comment doesn't make sense attached to this t
Ashok vardhan
2015/02/12 19:56:31
Done.
|
| + typedef std::pair<double, int> ScoreMaxRelevance; |
| + |
| static float GetFinalRelevancyScore( |
| float topicality_score, |
| - float frequency_score); |
| + float frequency_score, |
| + std::vector<ScoreMaxRelevance>& hqp_relevance_buckets); |
|
Mark P
2015/02/11 21:57:30
const
Ashok vardhan
2015/02/12 19:56:31
Done.
|
| + |
| + // Initializes the HQP experimental params. |
| + // If the experimental scoring is enabled, it sets: |
| + // |
| + // 1. hqp_experimental to true. Default value is set to false. |
| + // |
| + // 2. It initializes the topicality_threshold_, and hqp_scoring from the |
| + // finch experiment params. |
| + // |
| + // 3. topicality_threshold_ is used to control the topicality scoring. |
| + // If topicality_threshold > 0, then URLs with topicality score < threshold, |
| + // are given score 0. It is initalized to -1; |
| + // |
| + // 4. hqp_relevance_buckets_, buckets that gives the mapping from |
| + // (topicality*frequency) to the final relevance scoring. |
| + // Please see GetFinalRelevancyScore() for more details and scoring method. |
| + bool hqp_experimental_scoring_enabled_; |
| + float topicality_threshold_; |
| + |
| + std::vector<ScoreMaxRelevance> hqp_relevance_buckets_; |
| + |
| + void InitializeHQPExperimentalParams(); |
| // Sets |also_do_hup_like_scoring_|, |
| // |max_assigned_score_for_non_inlineable_matches_|, |bookmark_value_|, |