log the stats and AD info
This commit is contained in:
@@ -113,9 +113,10 @@ if args.lowerbound is not None:
|
|||||||
prob_lower = t.cdf(df=df,x=args.lowerbound, loc=mean, scale=stddev)
|
prob_lower = t.cdf(df=df,x=args.lowerbound, loc=mean, scale=stddev)
|
||||||
prob = prob_upper - prob_lower
|
prob = prob_upper - prob_lower
|
||||||
|
|
||||||
#print("probability: %f", prob)
|
|
||||||
info = -np.emath.log2(prob)
|
info = -np.emath.log2(prob)
|
||||||
#print("information content: %f bits", info)
|
logger.info(f"n={samplesize},df={df},mean={mean},stddev={stddev}")
|
||||||
|
logger.info(f"P()={prob},I={info} bits")
|
||||||
|
|
||||||
## set default fontsize
|
## set default fontsize
|
||||||
matplotlib.rcParams['font.size']=args.fontsize
|
matplotlib.rcParams['font.size']=args.fontsize
|
||||||
## place text on plot: https://matplotlib.org/3.3.4/gallery/recipes/placing_text_boxes.html
|
## place text on plot: https://matplotlib.org/3.3.4/gallery/recipes/placing_text_boxes.html
|
||||||
@@ -149,9 +150,7 @@ if args.lowerbound is not None:
|
|||||||
if args.upperbound is not None:
|
if args.upperbound is not None:
|
||||||
plt.axvline(args.upperbound, color="red")
|
plt.axvline(args.upperbound, color="red")
|
||||||
|
|
||||||
plt.plot(x, y, 'b-', label='Normal distribution')
|
plt.plot(x, y, 'b-', label='T distribution')
|
||||||
#yt = scipy.stats.t.pdf(x, len(data)-1, mean, stddev)
|
|
||||||
#plt.plot(x, yt, 'g-', label='T Distribution')
|
|
||||||
|
|
||||||
# Filter for which region to fill
|
# Filter for which region to fill
|
||||||
coloredregion = x#default fill all
|
coloredregion = x#default fill all
|
||||||
|
|||||||
Reference in New Issue
Block a user