pyhf icon indicating copy to clipboard operation
pyhf copied to clipboard

vectorize pvalue calculations

Open lukasheinrich opened this issue 4 years ago • 1 comments

Description

once #1162 is in, there is a slight performance bottleneck in terms of this loop

https://github.com/scikit-hep/pyhf/pull/1162/files#diff-ed4ae97f40d769c90d21f07e7ab70f34a875fe5374d8dc9bdd35983ce1910640R602

that can easily be vectorized b/c np.percentile is vectorizable. But I didn't find the time to do this. It's only notiacable w/ jax because the numpy conversion are expensive

Additional context

Add any other context or screenshots about the feature request here.

lukasheinrich avatar Nov 09 '20 12:11 lukasheinrich

@lukasheinrich PR #1694 will use tensorlib.percentile over np.percentile to avoid the conversion. What loop in particular were you referring to? The

matthewfeickert avatar Nov 12 '21 00:11 matthewfeickert