cleanup
This commit is contained in:
@@ -97,6 +97,7 @@ if args.mode == "DATA":
|
||||
data = np.array(pd.read_csv(inpath)[args.column])
|
||||
mean = data.mean()
|
||||
stddev = data.std(ddof=1)
|
||||
# Delta Degrees of Freedom: ddof=0 for population, ddof=1 for sample std dev
|
||||
samplesize = len(data)
|
||||
elif args.mode == "SIM":
|
||||
mean = args.mean
|
||||
@@ -104,9 +105,6 @@ elif args.mode == "SIM":
|
||||
samplesize = args.samplesize
|
||||
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
|
||||
if args.upperbound and args.lowerbound:
|
||||
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)
|
||||
else:
|
||||
prob = 1# no bounds set!
|
||||
##TODO!!!!
|
||||
#print("probability: %f", prob)
|
||||
info = -np.emath.log2(prob)
|
||||
#print("information content: %f bits", info)
|
||||
|
||||
Reference in New Issue
Block a user