cleanup
This commit is contained in:
@@ -97,16 +97,14 @@ if args.mode == "DATA":
|
|||||||
data = np.array(pd.read_csv(inpath)[args.column])
|
data = np.array(pd.read_csv(inpath)[args.column])
|
||||||
mean = data.mean()
|
mean = data.mean()
|
||||||
stddev = data.std(ddof=1)
|
stddev = data.std(ddof=1)
|
||||||
|
# Delta Degrees of Freedom: ddof=0 for population, ddof=1 for sample std dev
|
||||||
samplesize = len(data)
|
samplesize = len(data)
|
||||||
elif args.mode == "SIM":
|
elif args.mode == "SIM":
|
||||||
mean = args.mean
|
mean = args.mean
|
||||||
stddev = args.stddev
|
stddev = args.stddev
|
||||||
samplesize = args.samplesize
|
samplesize = args.samplesize
|
||||||
df = samplesize - 1
|
df = samplesize - 1
|
||||||
|
|
||||||
# time to deal with the bounds
|
|
||||||
|
|
||||||
# Delta Degrees of Freedom: ddof=0 for population, ddof=1 for sample std dev
|
|
||||||
prob = 0
|
prob = 0
|
||||||
if args.upperbound and args.lowerbound:
|
if args.upperbound and args.lowerbound:
|
||||||
prob = t.cdf(df,args.upperbound, mean, stddev) - t.cdf(df,args.lowerbound, mean, stddev)
|
prob = t.cdf(df,args.upperbound, mean, stddev) - t.cdf(df,args.lowerbound, mean, stddev)
|
||||||
@@ -116,7 +114,6 @@ elif args.lowerbound:
|
|||||||
prob = 1 - t.cdf(df,args.lowerbound, mean, stddev)
|
prob = 1 - t.cdf(df,args.lowerbound, mean, stddev)
|
||||||
else:
|
else:
|
||||||
prob = 1# no bounds set!
|
prob = 1# no bounds set!
|
||||||
##TODO!!!!
|
|
||||||
#print("probability: %f", prob)
|
#print("probability: %f", prob)
|
||||||
info = -np.emath.log2(prob)
|
info = -np.emath.log2(prob)
|
||||||
#print("information content: %f bits", info)
|
#print("information content: %f bits", info)
|
||||||
|
|||||||
Reference in New Issue
Block a user