Code Monkey home page Code Monkey logo

Comments (7)

jlouis avatar jlouis commented on August 23, 2024

Oh, looks like this is how Vitter's Algorithm R works. So it is more a question of specification than one of implementation mistake.

from folsom.

joewilliams avatar joewilliams commented on August 23, 2024

Thanks for checking @jlouis. @russelldb might have some thoughts on how this would effect slide_uniform.

from folsom.

russelldb avatar russelldb commented on August 23, 2024

I need to look into it too. It seems @Vagabond made this change 2be6249#diff-b7a6cde361f08ae87401c3a98eb116c7 that changes the behaviour of the slide_uniform sample.

from folsom.

russelldb avatar russelldb commented on August 23, 2024

Ah, it looks like @Vagabond actually fixes slide_uniform as it was using Size not MCnt as the upper bound for the random number generation (i.e. a fixed, rather than growing value.)

So is the plan to change the sample algorithm?

from folsom.

jlouis avatar jlouis commented on August 23, 2024

The code as it works now does the right thing. A uniform histogram samples its reservoir over the entire set of inputs. So if you have a million inputs already, the chance of replacing into the sample reservoir is 1/1000. Which is what you want for the complete overview.

Most of the time however, you want some kind of histogram window in which case the slide_uniform or exdec solutions are more appropriate. So it is really a questions of "what do you want". Not a question of what is correct or wrong.

The reason I opened this was because I was getting unexpected data. But it turns out the data are correct and my expectations of what uniform does was wrong :) You can close this one.

from folsom.

jlouis avatar jlouis commented on August 23, 2024

@russelldb I don't think we should change anything. But we should definitely consider explaining what the histogram types does in the README :)

from folsom.

joewilliams avatar joewilliams commented on August 23, 2024

Folsom has moved, please resubmit your issue at https://github.com/folsom-project Thanks!

from folsom.

Related Issues (20)

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.