from plot import qtplot import json import math as ma import numpy as np path='/cloud/Public/_data/neuropercolation/4lay/cons=dimtimesdimby3_steps=100100/dim=09_cons=27/batch=0/' eps_sp=np.linspace(0.01,0.2,20) eps_ep=eps_sp extremes=10000 strength=100000 savepath=path+f'extremes={extremes}_bootstrength={strength}/' dt=250 boots=[] for eps in eps_ep: eps=round(eps,3) with open(savepath+f'eps={eps:.3f}_dt={dt}_simpbootstrap.txt','r') as f: confs=list(zip(*json.load(f)))[1] ps=[1-conf for conf in confs] boots.append(ps) lower=[0.001]*len(ps) higher=[0.999]*len(ps) qtplot(f"Bootstrapping p-value for noise level {eps}",[range(dt+1)]*3,[lower,higher,ps],[f'right-sided p-value','p=0.999 limit','p=0.001 limit'],colors=['w','r','g'],y_tag='p-value',y_log=False)