Code Monkey home page Code Monkey logo

Comments (4)

lukasheinrich avatar lukasheinrich commented on May 18, 2024 1

for basic mechanics of doing 2D contour check cell [48]

https://github.com/diana-hep/pyhf/blob/master/examples/notebooks/multiBinPois.ipynb

from pyhf.

lukasheinrich avatar lukasheinrich commented on May 18, 2024

this is the relevant section..

screenshot

from pyhf.

kratsg avatar kratsg commented on May 18, 2024

Need to essentially add a Poisson() term for each channel in the constraint PDF (around here: https://github.com/diana-hep/pyhf/blob/master/pyhf/__init__.py#L394). This would be useful to get the MBJ analysis up and running in HistFactory.

from pyhf.

lukasheinrich avatar lukasheinrich commented on May 18, 2024

i.e. do add some more info

the general HiFa setup is:

  • there are multiple channels
  • each channel has multiple samples

each sample can declare whether or not it participates in stat. flucuations. e.g. in the JSON we could have

name: 'some sample'
mods: [
  {'type': 'staterror', data: {'enable': true}},
]

this is a mod that will be shared across all enabled samples in the channel

for each bin in the channel, you go through the samples add up all the mean rates of the samples that do participate. the mechanics of the auxiliary measurement is the essentially the same like the shapesys here

https://github.com/diana-hep/pyhf/blob/master/pyhf/__init__.py#L142

so for each channel one gets 1 Pois() term per bin (one can use broadcasting to compute this in one go using the tensorlib backends)

ill add more info later

tentative itemized work

[ ] extend spec so sample can declare participation in staterror
[ ] split up the bin-broadcasted sum in https://github.com/diana-hep/pyhf/blob/master/pyhf/__init__.py#L368 so that it moves from sum(samples) to sum(stack(disabled_stat_samples), axis=0) + gamma_stat_i * sum(stack(enabled_sum_samples), axis=0)
[ ] add constraint pdf for the gamma_stat_i e.g. Pois(gamma_stat_1)*Pois(gamma_stat_2)...

from pyhf.

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.