Git Product home page Git Product logo

corrnoise.jl's People

Contributors

fincardona avatar juliatagbot avatar ziotom78 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

corrnoise.jl's Issues

Implicit seed definition might make confusion

Hi,
I create the following function, according to your example:

function estimator(σ_K, slope, f_knee_Hz, τ_s, sampling_rate_Hz)
    rng = OofRNG(GaussRNG(), slope,  1/τ_s, f_knee_Hz, sampling_rate_Hz)
    data = [randoof(rng) * σ_K for i in 1:Int(τ_s * sampling_rate_Hz)+1]
end

Every time I call estimator I get the same values. This does not happen if I put the line rng = OofRNG(GaussRNG(), slope, 1/τ_s, f_knee_Hz, sampling_rate_Hz) outside the function. This happens because the seed is reinitialized every time the function is called, so the drawn sequence of pseudo-random numbers will be always the same.

This does not happen using the Distributions package, e.g.:

function estimator(mean_val, σ, τ)
    d = Normal(mean_val, σ)
    rand(d, τ)
end

where the seed can be fixed explicitly, outside the function, with Random.seed!.
So, should be possible to disentangle the seed definition from the OofRNG function? In other words, should be possible to make CorrNoise getting the seed in the same way as Distributions does?

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.