%matplotlib inline
%reload_ext autoreload
%autoreload 2

Prediction histograms

plot_preds[source]

plot_preds()

Plots predictions and background variations. TODO: Gnerelaise this to plllot signal variations

s,b = np.random.normal(1,0.5,1000),np.random.normal(0,0.5,1000)
s,b = s[(s<1)&(s>0)][:,None],b[(b<1)&(b>0)][:,None]
s,b = np.hstack((s,np.ones_like(s))),np.hstack((b,np.zeros_like(b)))
d = np.vstack((s,b))
df = pd.DataFrame({'pred':d[:,0],'gen_target':d[:,1]})
df.head()
plot_preds(df)

Inference plots

plot_likelihood[source]

plot_likelihood(nlls:Union[Dict[str, Tensor], List[Tensor]], mu_scan:Tensor, labels:Optional[List[str]]=None)