Giter VIP home page Giter VIP logo

Comments (11)

jackaraz avatar jackaraz commented on July 19, 2024

Thanks @WolfgangWaltenberger; in the future, can you also report the machines that you observe the difference so that I can try to find the exact machine configuration? Note that if I don't have access to the machine I won't be able to replicate the issue :/ This particular issue seems to be related to machine precision and optimiser performance tagged to it. Is this solved for other Scipy versions?

Also, this might be due to Python 3.11, I haven't tested Spey with 3.11 yet.

The ultimate solution may be adding an iminuit optimiser, but that will take some time to implement.

from spey.

WolfgangWaltenberger avatar WolfgangWaltenberger commented on July 19, 2024

Hey Jack, I can try and give you all that info. That said, statements "if floating_variable != specific_value:" are clearly, undoubtedly, horribly wrong. In this case, this is the culprit. It seems a given that it is not python 3.11, or a specific version of scipy or any of this. I can give you all the version numbers, but are you sure this is helping in any way? All digits of 64-bit floats after the 16th are a lottery. There will be other machine dependent results coming up that require all these versions, don't you worry ;)

from spey.

jackaraz avatar jackaraz commented on July 19, 2024

Hi @WolfgangWaltenberger, if your solution solves it for all the machines I can definitely add it or maybe add a clip on the mu value? Let me know if there is a one-fits-all type of solution and I'll update the release ASAP.

from spey.

WolfgangWaltenberger avatar WolfgangWaltenberger commented on July 19, 2024

All that said:
*) ubuntu 23.10, python3.11, scipy 1.10.0, numpy 1.26.2, it so happens that right now i get: oUL=0, eUL=inf. Could be different next time, on an ARM computer, etc etc etc.
*) on a centos 7, python3.10, scipy version 1.10.0, numpy 1.26.1, i currently get oUL=0.2842, eUL=0.3516, the right answers.
I do recall even different answers, but thats enough for now i guess.

from spey.

jackaraz avatar jackaraz commented on July 19, 2024

How about

sigma_mu = self.sigma_mu(muhat, expected=expected) if not np.isclose(muhat, 0.0) else 1.0

from spey.

jackaraz avatar jackaraz commented on July 19, 2024

Hi @WolfgangWaltenberger, I also implemented the update within the issue23 branch and attached a PR to it. On my machine, your example works perfectly without any interruption, and I get the following result:

spey oUL(mu)=0.0016
spey eUL(mu)=13.3741

Can you please confirm this on your side as well?

from spey.

WolfgangWaltenberger avatar WolfgangWaltenberger commented on July 19, 2024

This is a realistic example, the data are from CMS-SUS-20-004, testing a very average simplified model point. So, eUL being 4 orders of magnitude bigger than oUL is absolutely impossible. The values I gave above were realistic. I will try to
illustrate with a plot.

from spey.

jackaraz avatar jackaraz commented on July 19, 2024

This is a realistic example, the data are from CMS-SUS-20-004, testing a very average simplified model point. So, eUL being 4 orders of magnitude bigger than oUL is absolutely impossible. The values I gave above were realistic. I will try to illustrate with a plot.

Maybe the issue is originating from an earlier step? perhaps, $\hat{\mu}$, max llhd or asimov data?

from spey.

WolfgangWaltenberger avatar WolfgangWaltenberger commented on July 19, 2024

Now I am the one who cannot reproduce. Using your patch I get on one machine
oUL(mu)=0.2842, eUL(mu)=0.3516 (thats sensible)
on another i get
oUL(mu)=0, eUL(mu)=0.9062.
pretty random. I tried to visualise nll(mu) in a sensible range, e.g. (-.5, 2.) but i get incompatible nonsense

from spey.

jackaraz avatar jackaraz commented on July 19, 2024

HI @WolfgangWaltenberger, I need a more specific issue. I compared the tool with the previous application (including Bill's version) and got the same result. If you can point out what needs to be changed, I can implement it accordingly. Otherwise, I'm afraid I don't know how to help here.

from spey.

jackaraz avatar jackaraz commented on July 19, 2024

@WolfgangWaltenberger is there any update on this? or is it solved?

from spey.

Related Issues (18)

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.