neuropercolation/evaluation/plots/bootstrap_plot.py
2023-09-30 19:53:06 +02:00

29 lines
703 B
Python

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)
qtplot(f"Bootstrapping p-value for noise level {eps}",[range(dt+1)],boots[-1:],[f''],y_tag='p-value',y_log=False)