Git Product home page Git Product logo

iris-hep-benchmark-rumble's People

Contributors

dangraur avatar ingomueller-net avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

iris-hep-benchmark-rumble's Issues

Histogram bin edges are offset from correct values

The hep:histogram function results in offset binning if the bin range doesn't start at a multiple of the bin width. I believe this issue affects your other repositories as well.

https://github.com/RumbleDB/hep-iris-benchmark-jsoniq/blob/45a33842e73cd7fd881e49b81ebc4f4691ff9d97/queries/common/hep.jq#L4-L22

$bucket-idx is set to round(($v - $half-width) div $width). The problem is that this assumes that $half-width is an integer multiple of $width away from $lo. This is equivalent to $lo being an multiple of $width. This is always the case if $lo is zero but is not true generically. When this is not the case, the lowest bin gets shifted to start from the multiple of $width that is closest to $lo.

There are several ways to fix this, but my strategy would be to use floor(($v - $lo) div $width) for $bucket-idx. Then $center := $lo + $bucket-idx * $width + $half-width. Although, it is nice to record the bin edges instead of centers (for example, numpy.histogram()), but that's not as critical.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.