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

Issue 2543333002: Added log-domain summation (Closed)

Created:
4 years ago by wrengr
Modified:
4 years ago
CC:
chromium-reviews, infra-reviews+infra_chromium.org, aarya
Target Ref:
refs/heads/master
Project:
infra
Visibility:
Public.

Description

Patch Set 1 : removing todos #

Total comments: 4

Patch Set 2 : rebase #

Patch Set 3 : adding docstrings for tests #

Patch Set 4 : rebase #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -0 lines) Patch
A appengine/findit/libs/math/logarithms.py View 1 1 chunk +44 lines, -0 lines 2 comments Download
A appengine/findit/libs/math/test/logarithms_test.py View 1 2 1 chunk +31 lines, -0 lines 2 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 21 (10 generated)
wrengr
PTAL
4 years ago (2016-12-02 19:48:52 UTC) #5
Martin Barbella
Just some minor nits. Seems fine overall. https://codereview.chromium.org/2543333002/diff/40001/appengine/findit/libs/math/logarithms.py File appengine/findit/libs/math/logarithms.py (right): https://codereview.chromium.org/2543333002/diff/40001/appengine/findit/libs/math/logarithms.py#newcode1 appengine/findit/libs/math/logarithms.py:1: # Copyright ...
4 years ago (2016-12-02 20:07:02 UTC) #6
wrengr
https://codereview.chromium.org/2543333002/diff/40001/appengine/findit/libs/math/logarithms.py File appengine/findit/libs/math/logarithms.py (right): https://codereview.chromium.org/2543333002/diff/40001/appengine/findit/libs/math/logarithms.py#newcode1 appengine/findit/libs/math/logarithms.py:1: # Copyright 2016 The Chromium Authors. All rights reserved. ...
4 years ago (2016-12-02 21:00:58 UTC) #7
Martin Barbella
lgtm (still going to need someone else to stamp it, though)
4 years ago (2016-12-02 22:06:36 UTC) #8
Sharu Jiang
lgtm
4 years ago (2016-12-02 23:28:52 UTC) #9
commit-bot: I haz the power
This CL has an open dependency (Issue 2547133002 Patch 60001). Please resolve the dependency and ...
4 years ago (2016-12-02 23:29:40 UTC) #12
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/2543333002/100001
4 years ago (2016-12-03 00:54:51 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:100001) as https://chromium.googlesource.com/infra/infra/+/12ec7322c19954318ae7426cd85b062b6ecab83d
4 years ago (2016-12-03 01:09:44 UTC) #17
inferno
lgtm https://codereview.chromium.org/2543333002/diff/100001/appengine/findit/libs/math/logarithms.py File appengine/findit/libs/math/logarithms.py (right): https://codereview.chromium.org/2543333002/diff/100001/appengine/findit/libs/math/logarithms.py#newcode12 appengine/findit/libs/math/logarithms.py:12: """Efficiently and accurately compute a log-domain sum. Where ...
4 years ago (2016-12-04 23:51:24 UTC) #19
wrengr
https://codereview.chromium.org/2543333002/diff/100001/appengine/findit/libs/math/logarithms.py File appengine/findit/libs/math/logarithms.py (right): https://codereview.chromium.org/2543333002/diff/100001/appengine/findit/libs/math/logarithms.py#newcode12 appengine/findit/libs/math/logarithms.py:12: """Efficiently and accurately compute a log-domain sum. On 2016/12/04 ...
4 years ago (2016-12-05 19:12:59 UTC) #20
inferno
4 years ago (2016-12-05 20:44:05 UTC) #21
Message was sent while issue was closed.
On 2016/12/05 19:12:59, wrengr wrote:
>
https://codereview.chromium.org/2543333002/diff/100001/appengine/findit/libs/...
> File appengine/findit/libs/math/logarithms.py (right):
> 
>
https://codereview.chromium.org/2543333002/diff/100001/appengine/findit/libs/...
> appengine/findit/libs/math/logarithms.py:12: """Efficiently and accurately
> compute a log-domain sum.
> On 2016/12/04 23:51:24, inferno wrote:
> > Where is this idea based off on ? Can you add a wiki link or point to code ?
> 
> This is common knowledge in the machine learning community. I can provide a
link
> to when I implemented it in Haskell if you'd like, though it just does the
same
> thing as here.

Yes please.

> 
>
https://codereview.chromium.org/2543333002/diff/100001/appengine/findit/libs/...
> File appengine/findit/libs/math/test/logarithms_test.py (right):
> 
>
https://codereview.chromium.org/2543333002/diff/100001/appengine/findit/libs/...
> appengine/findit/libs/math/test/logarithms_test.py:15: def
> testLogsumexpEmpty(self):
> On 2016/12/04 23:51:24, inferno wrote:
> > Can we have a test actual value for logsumpexp for simple inputs ? 
> > Also, a test that shows different results from
math.log(math.fsum(math.exp(x)
> > for x in xs))) ?
> 
> Testing concrete values is problematic because the result will be platform &
> Python-version dependent, and therefore flaky. Showing the result is different
> from the naive implementation will be similarly flaky for any interesting
(i.e.,
> borderline) values, but I can come up with some non-flaky examples where the
> naive thing always over-/underflows, if desired.

Yes, that would be good, basically any input values which are more predictable
and usuable across platform.

Powered by Google App Engine
This is Rietveld 408576698