Giter VIP home page Giter VIP logo

litehf.jl's People

Contributors

github-actions[bot] avatar grabanal avatar moelf avatar oschulz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

grabanal

litehf.jl's Issues

[FR] shape-only fits

apparently there's a small set of EFT / SUSY model where the internal is conserved by physics and only the shape is different.

and somehow this may require special likelihood terms to capture

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Add CITATION.cff

Hi. Can you please a CITATION.cff file with information on how you want LiteHF cited? This would be quite useful for properly referencing and citing the code.

Asimov `q0` doesn't agree with pyhf

Using the sample file:

with open("./test/pyhfjson/sample_normsys.json") as serialized:
    spec = json.load(serialized)
 
workspace = pyhf.Workspace(spec)

pdf_pyhf = workspace.model(modifier_settings={
            'normsys': {'interpcode': 'code1'},
             'histosys': {'interpcode': 'code0'}}
)

data_pyhf = workspace.data(pdf_pyhf)

calc = pyhf.infer.calculators.AsymptoticCalculator(data_pyhf, pdf_pyhf, test_stat="q0")

In [21]: asimov_data = pyhf.infer.calculators.generate_asimov_data(1.0, calc.data, calc.pdf, calc
    ...: .init_pars, calc.par_bounds, calc.fixed_params)

In [26]: asimov_data
Out[26]: array([33.24940695, 22.79129107, 13.37482208,  9.16658759,  0.15552048])

In [23]: pyhf.infer.test_statistics.q0(0.0, calc.data, calc.pdf, calc.init_pars, calc.par_bounds,
    ...:  calc.fixed_params)
Out[23]: array(6.57480397)

In [24]: pyhf.infer.test_statistics.q0(0.0, asimov_data, calc.pdf, calc.init_pars, calc.par_bound
    ...: s, calc.fixed_params)
Out[24]: array(4.15381162)

In Julia

julia> using LiteHF, Optim

julia> RR = build_pyhf(load_pyhfjson("./test/pyhfjson/sample_normsys.json"));

julia> original_LL = pyhf_logjointof(RR.expected, RR.observed, RR.priors);

julia> function condLL(rest)
           original_LL(vcat(1.0, rest)) #q0 implies Asimov_mu == 1
       end

julia> Asimov_para = vcat(1.0, Optim.maximizer(LiteHF.opt_maximize(condLL, RR.inits[2:end])))
2-element Vector{Float64}: # agrees with pyhf
 1.0
 0.15529785156250003

julia> Asimov_data = RR.expected(Asimov_para) # agrees with pyhf
([33.247581721021554, 22.790135089980318, 13.374274516306468, 9.16634422946954],)

julia> LiteHF.get_q0(original_LL, RR.inits)(0.0)
6.574804029034912 #agrees with pyhf

julia> Asimov_L = pyhf_logjointof(RR.expected, Asimov_data, RR.priors);

julia> LiteHF.get_q0(Asimov_L, RR.inits)(0.0)
4.352907587323511 #wtf?

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.