diff options
author | mpearson <mpearson@chromium.org> | 2015-11-30 22:38:50 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-01 06:39:52 +0000 |
commit | 868a3140a14eb47729b07120c3032951a092c7c9 (patch) | |
tree | 51f5cf39997f58e73191221829186730bc87dafc /components | |
parent | c3fe8d78d15de7f5729a0ad6ef08f2e7bd3a1775 (diff) | |
download | chromium_src-868a3140a14eb47729b07120c3032951a092c7c9.zip chromium_src-868a3140a14eb47729b07120c3032951a092c7c9.tar.gz chromium_src-868a3140a14eb47729b07120c3032951a092c7c9.tar.bz2 |
Omnibox: Revise Scoring to Examine Two Changes as Separate Experiments
Previously I bundled two changes ("bug fixes") into one experiment.
The results of that experiment are murky; it's likely that one
change or the other is working cross-purposes. i.e., one of those
things I called bugs might be good for users. This change separates
the bundled bug fix into two separate experiments to tease out their
individual effects.
Tested using --force-fieldtrial-params=
BUG=369989
Review URL: https://codereview.chromium.org/1485583003
Cr-Commit-Position: refs/heads/master@{#362361}
Diffstat (limited to 'components')
-rw-r--r-- | components/omnibox/browser/omnibox_field_trial.cc | 15 | ||||
-rw-r--r-- | components/omnibox/browser/omnibox_field_trial.h | 13 | ||||
-rw-r--r-- | components/omnibox/browser/scored_history_match.cc | 10 | ||||
-rw-r--r-- | components/omnibox/browser/scored_history_match.h | 3 |
4 files changed, 28 insertions, 13 deletions
diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc index b07ce44..2d03ad8 100644 --- a/components/omnibox/browser/omnibox_field_trial.cc +++ b/components/omnibox/browser/omnibox_field_trial.cc @@ -410,10 +410,16 @@ float OmniboxFieldTrial::HQPExperimentalTopicalityThreshold() { return static_cast<float>(topicality_threshold); } -bool OmniboxFieldTrial::HQPFixFrequencyScoringBugs() { +bool OmniboxFieldTrial::HQPFixTypedVisitBug() { return variations::GetVariationParamValue( kBundledExperimentFieldTrialName, - kHQPFixFrequencyScoringBugsRule) == "true"; + kHQPFixTypedVisitBugRule) == "true"; +} + +bool OmniboxFieldTrial::HQPFixFewVisitsBug() { + return variations::GetVariationParamValue( + kBundledExperimentFieldTrialName, + kHQPFixFewVisitsBugRule) == "true"; } size_t OmniboxFieldTrial::HQPNumTitleWordsToAllow() { @@ -491,8 +497,9 @@ OmniboxFieldTrial::kMeasureSuggestPollingDelayFromLastKeystrokeRule[] = "MeasureSuggestPollingDelayFromLastKeystroke"; const char OmniboxFieldTrial::kSuggestPollingDelayMsRule[] = "SuggestPollingDelayMs"; -const char OmniboxFieldTrial::kHQPFixFrequencyScoringBugsRule[] = - "HQPFixFrequencyScoringBugs"; +const char OmniboxFieldTrial::kHQPFixTypedVisitBugRule[] = + "HQPFixTypedVisitBug"; +const char OmniboxFieldTrial::kHQPFixFewVisitsBugRule[] = "HQPFixFewVisitsBug"; const char OmniboxFieldTrial::kHQPNumTitleWordsRule[] = "HQPNumTitleWords"; const char OmniboxFieldTrial::kHQPAlsoDoHUPLikeScoringRule[] = "HQPAlsoDoHUPLikeScoring"; diff --git a/components/omnibox/browser/omnibox_field_trial.h b/components/omnibox/browser/omnibox_field_trial.h index 674170f..566b89f 100644 --- a/components/omnibox/browser/omnibox_field_trial.h +++ b/components/omnibox/browser/omnibox_field_trial.h @@ -285,9 +285,13 @@ class OmniboxFieldTrial { // For the HQPFixFrequencyScoring experiment that's part of the // bundled omnibox field trial. - // Returns true if HQP should apply the bug fixes to the GetFrequency() - // function. - static bool HQPFixFrequencyScoringBugs(); + // Returns true if HQP should apply the bug fix for correctly identifying + // typed visits. + static bool HQPFixTypedVisitBug(); + + // Returns true if HQP should apply the bug fix to discount the visits to + // pages visited less than ten times. + static bool HQPFixFewVisitsBug(); // --------------------------------------------------------- // For the HQPNumTitleWords experiment that's part of the @@ -359,7 +363,8 @@ class OmniboxFieldTrial { static const char kDisableResultsCachingRule[]; static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[]; static const char kSuggestPollingDelayMsRule[]; - static const char kHQPFixFrequencyScoringBugsRule[]; + static const char kHQPFixTypedVisitBugRule[]; + static const char kHQPFixFewVisitsBugRule[]; static const char kHQPNumTitleWordsRule[]; static const char kHQPAlsoDoHUPLikeScoringRule[]; static const char kPreventUWYTDefaultForNonURLInputsRule[]; diff --git a/components/omnibox/browser/scored_history_match.cc b/components/omnibox/browser/scored_history_match.cc index 936d912..b7d1640 100644 --- a/components/omnibox/browser/scored_history_match.cc +++ b/components/omnibox/browser/scored_history_match.cc @@ -108,7 +108,8 @@ void InitDaysAgoToRecencyScoreArray() { const size_t ScoredHistoryMatch::kMaxVisitsToScore = 10; bool ScoredHistoryMatch::also_do_hup_like_scoring_ = false; int ScoredHistoryMatch::bookmark_value_ = 1; -bool ScoredHistoryMatch::fix_frequency_bugs_ = false; +bool ScoredHistoryMatch::fix_typed_visit_bug_ = false; +bool ScoredHistoryMatch::fix_few_visits_bug_ = false; bool ScoredHistoryMatch::allow_tld_matches_ = false; bool ScoredHistoryMatch::allow_scheme_matches_ = false; size_t ScoredHistoryMatch::num_title_words_to_allow_ = 10u; @@ -410,7 +411,8 @@ void ScoredHistoryMatch::Init() { initialized = true; also_do_hup_like_scoring_ = OmniboxFieldTrial::HQPAlsoDoHUPLikeScoring(); bookmark_value_ = OmniboxFieldTrial::HQPBookmarkValue(); - fix_frequency_bugs_ = OmniboxFieldTrial::HQPFixFrequencyScoringBugs(); + fix_typed_visit_bug_ = OmniboxFieldTrial::HQPFixTypedVisitBug(); + fix_few_visits_bug_ = OmniboxFieldTrial::HQPFixFewVisitsBug(); allow_tld_matches_ = OmniboxFieldTrial::HQPAllowMatchInTLDValue(); allow_scheme_matches_ = OmniboxFieldTrial::HQPAllowMatchInSchemeValue(); num_title_words_to_allow_ = OmniboxFieldTrial::HQPNumTitleWordsToAllow(); @@ -586,7 +588,7 @@ float ScoredHistoryMatch::GetFrequency(const base::Time& now, const size_t max_visit_to_score = std::min(visits.size(), ScoredHistoryMatch::kMaxVisitsToScore); for (size_t i = 0; i < max_visit_to_score; ++i) { - const ui::PageTransition page_transition = fix_frequency_bugs_ ? + const ui::PageTransition page_transition = fix_typed_visit_bug_ ? ui::PageTransitionStripQualifier(visits[i].second) : visits[i].second; int value_of_transition = (page_transition == ui::PAGE_TRANSITION_TYPED) ? 20 : 1; @@ -596,7 +598,7 @@ float ScoredHistoryMatch::GetFrequency(const base::Time& now, GetRecencyScore((now - visits[i].first).InDays()); summed_visit_points += (value_of_transition * bucket_weight); } - if (fix_frequency_bugs_) + if (fix_few_visits_bug_) return summed_visit_points / ScoredHistoryMatch::kMaxVisitsToScore; return visits.size() * summed_visit_points / ScoredHistoryMatch::kMaxVisitsToScore; diff --git a/components/omnibox/browser/scored_history_match.h b/components/omnibox/browser/scored_history_match.h index d1e275d..d6a3fb9 100644 --- a/components/omnibox/browser/scored_history_match.h +++ b/components/omnibox/browser/scored_history_match.h @@ -170,7 +170,8 @@ struct ScoredHistoryMatch : public history::HistoryMatch { static int bookmark_value_; // True if we should fix certain bugs in frequency scoring. - static bool fix_frequency_bugs_; + static bool fix_typed_visit_bug_; + static bool fix_few_visits_bug_; // If true, we allow input terms to match in the TLD (e.g., ".com"). static bool allow_tld_matches_; |