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

Issue 2346263002: Extending the UserClassifier to actually support classification. (Closed)

Created:
4 years, 3 months ago by jkrcal
Modified:
4 years, 3 months ago
CC:
chromium-reviews, arv+watch_chromium.org, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Extending the UserClassifier to actually support classification. This CL adds actual classification to the UserClassifier. So far, only simple classification thresholds are implemented. The CL also includes a new snippets-internals section and a bit of refactoring. In a follow-up CLs, all the parameters will become configurable by variations. BUG=648252 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/8048f8d8d5153a0e530529e883c78582853d0b15 Cr-Commit-Position: refs/heads/master@{#420022}

Patch Set 1 #

Total comments: 33

Patch Set 2 : Marc's comments #

Total comments: 4

Patch Set 3 : Minor rebase & larger refactoring #

Total comments: 33

Patch Set 4 : Comments of Tim and Marc #

Total comments: 17

Patch Set 5 : Marc's comments #

Total comments: 2

Patch Set 6 : Removing unnecessary static_casts #

Total comments: 8

Patch Set 7 : Bernhard's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+376 lines, -120 lines) Patch
M chrome/browser/android/ntp/ntp_snippets_bridge.cc View 1 2 3 4 4 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/resources/snippets_internals.html View 1 2 3 4 5 6 4 chunks +38 lines, -14 lines 0 comments Download
M chrome/browser/resources/snippets_internals.js View 3 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/snippets_internals_message_handler.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/snippets_internals_message_handler.cc View 1 2 3 4 7 chunks +35 lines, -1 line 0 comments Download
M components/ntp_snippets/user_classifier.h View 1 2 3 4 3 chunks +63 lines, -23 lines 0 comments Download
M components/ntp_snippets/user_classifier.cc View 1 2 3 4 5 6 3 chunks +214 lines, -77 lines 0 comments Download

Messages

Total messages: 26 (10 generated)
jkrcal
Marc, could you PTAL?
4 years, 3 months ago (2016-09-19 14:42:15 UTC) #3
Marc Treib
Wow, math is hard :D https://codereview.chromium.org/2346263002/diff/1/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc (right): https://codereview.chromium.org/2346263002/diff/1/components/ntp_snippets/user_classifier.cc#newcode40 components/ntp_snippets/user_classifier.cc:40: // Default frequency values ...
4 years, 3 months ago (2016-09-19 15:20:16 UTC) #4
jkrcal
Thanks! PTAL, again! https://codereview.chromium.org/2346263002/diff/1/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc (right): https://codereview.chromium.org/2346263002/diff/1/components/ntp_snippets/user_classifier.cc#newcode40 components/ntp_snippets/user_classifier.cc:40: // Default frequency values for new ...
4 years, 3 months ago (2016-09-19 18:45:26 UTC) #5
jkrcal
Marc, I did not like the code repetition for the 3 different metrics. So I ...
4 years, 3 months ago (2016-09-20 08:38:47 UTC) #6
Marc Treib
https://codereview.chromium.org/2346263002/diff/1/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc (right): https://codereview.chromium.org/2346263002/diff/1/components/ntp_snippets/user_classifier.cc#newcode59 components/ntp_snippets/user_classifier.cc:59: discount_rate_per_hour = (std::log(1 / (1 - kDiscountFactorPerDay)) / 24); ...
4 years, 3 months ago (2016-09-20 10:27:03 UTC) #7
tschumann
some naming nits ;-) https://codereview.chromium.org/2346263002/diff/40001/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc (right): https://codereview.chromium.org/2346263002/diff/40001/components/ntp_snippets/user_classifier.cc#newcode66 components/ntp_snippets/user_classifier.cc:66: if (discount_rate_per_hour == 0.0) { ...
4 years, 3 months ago (2016-09-20 11:32:47 UTC) #8
jkrcal
Thanks, guys! PTAL, again. https://codereview.chromium.org/2346263002/diff/1/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc (right): https://codereview.chromium.org/2346263002/diff/1/components/ntp_snippets/user_classifier.cc#newcode59 components/ntp_snippets/user_classifier.cc:59: discount_rate_per_hour = (std::log(1 / (1 ...
4 years, 3 months ago (2016-09-20 13:10:14 UTC) #9
Marc Treib
Thanks! LGTM with a few more optional suggestions. https://codereview.chromium.org/2346263002/diff/40001/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc (right): https://codereview.chromium.org/2346263002/diff/40001/components/ntp_snippets/user_classifier.cc#newcode250 components/ntp_snippets/user_classifier.cc:250: true ...
4 years, 3 months ago (2016-09-20 13:26:53 UTC) #10
jkrcal
Marc, Tim, thanks again! Bernhard, could you PTAL at the snippets_internals files? https://codereview.chromium.org/2346263002/diff/40001/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc ...
4 years, 3 months ago (2016-09-20 13:46:40 UTC) #12
Marc Treib
https://codereview.chromium.org/2346263002/diff/80001/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc (right): https://codereview.chromium.org/2346263002/diff/80001/components/ntp_snippets/user_classifier.cc#newcode169 components/ntp_snippets/user_classifier.cc:169: DCHECK_NE(static_cast<int>(metric), static_cast<int>(Metric::COUNT)); Ah, the casts are required because the ...
4 years, 3 months ago (2016-09-20 13:53:42 UTC) #13
jkrcal
Thanks, Marc. Bernhard, PTAL. https://codereview.chromium.org/2346263002/diff/80001/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc (right): https://codereview.chromium.org/2346263002/diff/80001/components/ntp_snippets/user_classifier.cc#newcode169 components/ntp_snippets/user_classifier.cc:169: DCHECK_NE(static_cast<int>(metric), static_cast<int>(Metric::COUNT)); On 2016/09/20 13:53:42, ...
4 years, 3 months ago (2016-09-20 14:26:35 UTC) #14
Bernhard Bauer
LGTM w/ some nits: https://codereview.chromium.org/2346263002/diff/40001/components/ntp_snippets/user_classifier.cc File components/ntp_snippets/user_classifier.cc (right): https://codereview.chromium.org/2346263002/diff/40001/components/ntp_snippets/user_classifier.cc#newcode250 components/ntp_snippets/user_classifier.cc:250: true /* event_now */); On ...
4 years, 3 months ago (2016-09-20 15:59:54 UTC) #15
jkrcal
Thanks, Bernhard! https://codereview.chromium.org/2346263002/diff/100001/chrome/browser/resources/snippets_internals.html File chrome/browser/resources/snippets_internals.html (right): https://codereview.chromium.org/2346263002/diff/100001/chrome/browser/resources/snippets_internals.html#newcode67 chrome/browser/resources/snippets_internals.html:67: <input id="clear-classification" type="submit" On 2016/09/20 15:59:54, Bernhard ...
4 years, 3 months ago (2016-09-21 08:58:46 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2346263002/120001
4 years, 3 months ago (2016-09-21 10:20:45 UTC) #23
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 3 months ago (2016-09-21 10:25:46 UTC) #24
commit-bot: I haz the power
4 years, 3 months ago (2016-09-21 10:27:53 UTC) #26
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/8048f8d8d5153a0e530529e883c78582853d0b15
Cr-Commit-Position: refs/heads/master@{#420022}

Powered by Google App Engine
This is Rietveld 408576698