Coder Social home page Coder Social logo

rhalphalib's Introduction

rhalphalib

Codestyle

Ralph

Quickstart

First, install Combine v9 using your choice of installation instructions (with CMSSW, using LCG, or inside a Conda environment), then in that environment, run:

python3 -m pip install --user https://github.com/nsmith-/rhalphalib/archive/master.zip

Take a look at test_rhalphalib.py for examples of how to use the package.

rhalphalib's People

Contributors

nsmith- avatar rkansal47 avatar andrzejnovak avatar jmduarte avatar stalbrec avatar jennetd avatar

Stargazers

Duc Hoang avatar  avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar  avatar

rhalphalib's Issues

1xN vs Nx1 array handling in BernsteinPoly

 rl.BernsteinPoly("tf", (2, 0), ['rho', 'pt'],  limits=(0, 10))

is understood correctly, but

 rl.BernsteinPoly("tf", (0, 2), ['rho', 'pt'],  limits=(0, 10))

throws an error. It seems the fcn mishandles an array like [[1], [1], [1]] though a 1D array like [1,1,1] or a proper 2D array is fine.

Smoothstep implementation is wrong

From Thiago, the formula at

formula = "(((0.1875*@0*@0 - 0.625)*@0*@0 + 0.9375)*@0 + 0.5)*TMath::Sign(1, 1+@0)*TMath::Sign(1, 1-@0) + 1 - TMath::Sign(1, 1-@0)"
doesn't behave as it should, blowing up at large values.
I think (((0.1875*x*x - 0.625)*x*x + 0.9375)*x + 0.5)*(x > -1)*(x < 1) + 1*(x >= 1) is what it should be.

[Feature Request] Incorporate MC Statistical Uncertainties

  • Extend TemplateSample class to allow automatic incorporation of MC statistical uncertainties
  • The simplest way would be: add a bin-by-bin error member which is used to construct nbins up and down templates with independent nuisance parameter names (to allow uncorrelated up/down fluctuations)
  • A better way would be to do some kind of Barlow-Beeston lite approach (which is not currently supported in combine with RooDataHist templates, but works if you use histograms)

Install with CMSSW+combine is missing flake8

Installing rhalphalib according to the README with CMSSW+combine, I get this error: pkg_resources.DistributionNotFound: The ‘flake8’ distribution was not found and is required by the application

If I run this before installing rhalphalib, it is fine:
pip install --user flake8

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.