Giter VIP home page Giter VIP logo

Comments (1)

jkirkby3 avatar jkirkby3 commented on August 20, 2024

Thanks for your great question! I have rewritten the Ozaki density function to make clear that each of these terms is indeed well-defined (this form is also more efficient :). You can see that (exp(x*t) -1)/x is always positive for positive t ):

    sig = self._model.diffusion(x0, t)
    mu = self._model.drift(x0, t)
    mu_x = self._model.drift_x(x0, t)
    temp = mu * (np.exp(mu_x * t) - 1) / mu_x

    Mt = x0 + temp
    Kt = (2 / t) * np.log(1 + temp / x0)
    Vt = sig * np.sqrt((np.exp(Kt * t) - 1) / Kt)

    return np.exp(-0.5 * ((xt - Mt) / Vt) ** 2) / (np.sqrt(2 * np.pi) * Vt)

Also, I removed the if z <=0 expression from above, as you mention this is not going to be optimal, and its better that if something like this happens we should return a nan value, allowing the optimizer to adapt the parameters accordingly

from pymle.

Related Issues (3)

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.