...
 
Commits (2)
......@@ -37,7 +37,7 @@ if __name__ == "__main__":
results[str(mu1) + "\t" + str(mu2) + "\t" + str(pi1) + "\t" + str(pi2)] = pool.apply_async(sim, [mu1, mu2, pi1, pi2])
# Output simulation results:
with open("results/hemoglobin-simulation.tsv", "w", encoding="utf-8") as hb:
hb.write("\tµ₁\tµ₂\tπ₁\tπ₂\tP\t\tT\t\t\t\n")
hb.write("\tµ₁\tµ₂\tπ₁\tπ₂\tP2.5\tP97.5\n")
for task, result in results.items():
result = result.get()
hb.write("Median\t" + task + "\t" + str(np.percentile(result[0], 50)) + "\t" + str(np.percentile(result[1], 50)) + "\n")
......
This diff is collapsed.
µ₁ σ₁ π₁ P2.5 P97.5
Result 3 0.5 0.0 0.24443038668 3.96988280797
Result 3 0.5 0.05 0.24801056162475968 3.990100380151939
Result 3 0.5 0.1 0.24683436928464023 4.025423715866261
Result 3 0.5 0.15 0.244082891786 3.93807117395
Result 3 0.5 0.2 0.23494378903164337 4.818952987649758
Result 3 0.5 0.3 0.143454396792 9.36087928201
Result 3 1 0.05 0.2469442519202049 4.102812165475391
Result 3 1 0.1 0.245724654686371 4.252495152441422
Result 3 1 0.15 0.24833563062933092 4.375049657368636
Result 3 1 0.2 0.23968656586997555 5.1263722058070185
Result 3 1 0.3 0.2201678273333024 8.991773157549318
Result 3 1.5 0.05 0.24830141627677466 4.070663629086165
Result 3 1.5 0.1 0.2474624590433735 4.300858100729402
Result 3 1.5 0.15 0.24766002606244794 4.4148562336146755
Result 3 1.5 0.2 0.24254510520554234 4.858101171550603
Result 3 1.5 0.3 0.2337476774124843 6.475303488450092
Result 3 2 0.05 0.24750802345117687 4.0779614246318365
Result 3 2 0.1 0.24733172399923306 4.178838366733133
Result 3 2 0.15 0.24538483227662056 4.419299348096376
Result 3 2 0.2 0.245268565331101 4.622217925083701
Result 3 2 0.3 0.24265841246812386 5.332946133665947
Result 3.5 0.5 0.05 0.24764927728974573 3.9972451283610217
Result 3.5 0.5 0.1 0.24681220732739878 4.01735077379844
Result 3.5 0.5 0.15 0.24689937229707284 4.032662913087804
Result 3.5 0.5 0.2 0.2457469472433424 4.108423855344487
Result 3.5 0.5 0.3 0.187441756863 8.7157358033
Result 3.5 1 0.05 0.24835823853512828 4.017971780064404
Result 3.5 1 0.1 0.24555698794286115 4.147210651989129
Result 3.5 1 0.15 0.24752270871840765 4.211814381299852
Result 3.5 1 0.2 0.2396722450938095 4.683406457786263
Result 3.5 1 0.3 0.20805104442 7.87494337044
Result 3.5 1.5 0.05 0.24754976199102197 4.052786856296138
Result 3.5 1.5 0.1 0.24759363191115102 4.200481572341626
Result 3.5 1.5 0.15 0.24592787549457149 4.272763638628933
Result 3.5 1.5 0.2 0.24375040826797903 4.6169713990873555
Result 3.5 1.5 0.3 0.22874887170550862 6.32590752189112
Result 3.5 2 0.05 0.24840172676850664 4.040616645485683
Result 3.5 2 0.1 0.2510734078266444 4.146847924345012
Result 3.5 2 0.15 0.25175823794818125 4.209164963928693
Result 3.5 2 0.2 0.24880305736225505 4.464924283053704
Result 3.5 2 0.3 0.23436496761057451 5.71833110673119
Result 4 0.5 0.05 0.2478392658215386 3.9886604813976243
Result 4 0.5 0.1 0.24640656989828455 4.045487832226354
Result 4 0.5 0.15 0.24721873467268235 4.02275321126724
Result 4 0.5 0.2 0.236315451793 3.79304168579
Result 4 0.5 0.3 0.21913962945303497 5.971075454030981
Result 4 1 0.05 0.24771233881975074 4.008108329729146
Result 4 1 0.1 0.24694404798873867 4.0396577029530345
Result 4 1 0.15 0.244329263251 4.01428487329
Result 4 1 0.2 0.2408178598087629 4.423818400532571
Result 4 1 0.3 0.2112860449243554 6.812332875994197
Result 4 1.5 0.05 0.2480352985328982 4.025380279323014
Result 4 1.5 0.1 0.242777578302 3.94724552413
Result 4 1.5 0.15 0.24987929366253192 4.182968665293567
Result 4 1.5 0.2 0.24708086041836716 4.383090198374043
Result 4 1.5 0.3 0.22302495896800378 6.2704220834382784
Result 4 2 0.05 0.2475236710042196 4.049221659743621
Result 4 2 0.1 0.24557283578215028 4.154515144196451
Result 4 2 0.15 0.2464679271347157 4.258103731802656
Result 4 2 0.2 0.24478982989548645 4.467292367035442
Result 4 2 0.3 0.23197194455959172 5.581069336118463
Result 4.5 0.5 0.05 0.24764333537196073 4.000560729052647
Result 4.5 0.5 0.1 0.24684190340575374 4.014649504286552
Result 4.5 0.5 0.15 0.2471821531618145 4.02361160790989
Result 4.5 0.5 0.2 0.24776993637173764 4.055629941737724
Result 4.5 0.5 0.3 0.23470093294703961 5.062874920858046
Result 4.5 1 0.05 0.24785786724958872 3.992910183689752
Result 4.5 1 0.1 0.24598625780632818 4.051429273759442
Result 4.5 1 0.15 0.2460276335639405 4.065081116725909
Result 4.5 1 0.2 0.239974215731 4.05177657071
Result 4.5 1 0.3 0.21411848231753083 5.921003718715303
Result 4.5 1.5 0.05 0.24778009846374785 4.031061191480938
Result 4.5 1.5 0.1 0.2454248351465378 4.126188083369033
Result 4.5 1.5 0.15 0.2463513601451675 4.136211412080861
Result 4.5 1.5 0.2 0.2495287844018475 4.297699051304101
Result 4.5 1.5 0.3 0.2231101204272712 5.8167556112017325
Result 4.5 2 0.05 0.244600528331 3.98063513118
Result 4.5 2 0.1 0.24536797020251908 4.135035914393597
Result 4.5 2 0.15 0.24612470082732507 4.168286321373861
Result 4.5 2 0.2 0.2473529516868696 4.321108320515945
Result 4.5 2 0.3 0.2295645275965836 5.551481512038851
Result 5 0.5 0.05 0.24765393111327094 4.00344110857793
Result 5 0.5 0.1 0.24607558126480814 4.04150681593235
Result 5 0.5 0.15 0.2466086649141337 4.041766472062683
Result 5 0.5 0.2 0.254445741602 3.95439605576
Result 5 0.5 0.3 0.2369874029751461 4.710527520021288
Result 5 1 0.05 0.2476219814000511 3.995294851372371
Result 5 1 0.1 0.24682562557437537 4.022795290070469
Result 5 1 0.15 0.24730596024699197 3.9995624578284046
Result 5 1 0.2 0.24642397378464317 4.090585458616864
Result 5 1 0.3 0.21944718652184156 5.36609849652695
Result 5 1.5 0.05 0.24792189611414928 3.9981291108916754
Result 5 1.5 0.1 0.24601237601375464 4.072291669059395
Result 5 1.5 0.15 0.244538272853 3.98937998392
Result 5 1.5 0.2 0.24381368074735954 4.266796520301695
Result 5 1.5 0.3 0.22336305628708328 5.441275960174379
Result 5 2 0.05 0.24802619938557582 4.011460076171225
Result 5 2 0.1 0.24576390903375467 4.1142441447215
Result 5 2 0.15 0.24696043203297546 4.116007672494225
Result 5 2 0.2 0.24648038492856686 4.2733678163425255
Result 5 2 0.3 0.22833964322199518 5.349858891186994
Result 5.5 0.5 0.05 0.24764245991436823 3.9989024717644486
Result 5.5 0.5 0.1 0.24662628153827187 4.039683959709267
Result 5.5 0.5 0.15 0.24655495027422875 4.043751059701829
Result 5.5 0.5 0.2 0.25891415894182707 3.9971925725587774
Result 5.5 0.5 0.3 0.2442149095021355 4.422435401169303
Result 5.5 1 0.05 0.24692524748710004 4.02189193834053
Result 5.5 1 0.1 0.24629111500396883 4.037573232527829
Result 5.5 1 0.15 0.25073944906564744 3.952607867252265
Result 5.5 1 0.2 0.246053033947 3.97311251196
Result 5.5 1 0.3 0.23727592012387974 4.782380925388014
Result 5.5 1.5 0.05 0.2476949547309566 3.9981446255017783
Result 5.5 1.5 0.1 0.24639687231510565 4.059106504155592
Result 5.5 1.5 0.15 0.24698749641973505 4.033372967362628
Result 5.5 1.5 0.2 0.24119008733 3.95528867834
Result 5.5 1.5 0.3 0.22425031336360843 5.18883586735564
Result 5.5 2 0.05 0.24773694761019907 4.019812044097601
Result 5.5 2 0.1 0.24605165576164276 4.100124639230888
Result 5.5 2 0.15 0.24652828378046235 4.105284400640593
Result 5.5 2 0.2 0.2508173043606281 4.16989975254613
Result 5.5 2 0.3 0.2304094078385436 5.083930026350329
Result 6 0.5 0.05 0.2469232464721377 4.020860413164789
Result 6 0.5 0.1 0.2464922794436735 4.043958677645202
Result 6 0.5 0.15 0.2465472782393302 4.044165901008428
Result 6 0.5 0.2 0.25930107738943486 3.9940837268300466
Result 6 0.5 0.3 0.24586853376738732 4.303556296691167
Result 6 1 0.05 0.24763830749341542 3.999678284339468
Result 6 1 0.1 0.24596975771082552 4.046378609298871
Result 6 1 0.15 0.24730129071821574 4.019307069305236
Result 6 1 0.2 0.249942475022 3.91279607051
Result 6 1 0.3 0.23871967551358678 4.571229924422083
Result 6 1.5 0.05 0.24768439916797091 3.9951717771795745
Result 6 1.5 0.1 0.24582931553990942 4.070355578194877
Result 6 1.5 0.15 0.24684962435777627 4.036922309076515
Result 6 1.5 0.2 0.2464161497462006 4.098992931837085
Result 6 1.5 0.3 0.22680114169978152 4.961008960710661
Result 6 2 0.05 0.24674998522174826 4.036073599709003
Result 6 2 0.1 0.24782671113735144 3.996105228564657
Result 6 2 0.15 0.244166516431 3.99664896848
Result 6 2 0.2 0.243818280398 4.14785807104
Result 6 2 0.3 0.23012018855397645 4.975371663163351
......@@ -34,7 +34,7 @@ if __name__ == "__main__":
results[str(mu1) + "\t" + str(sd1) + "\t" + str(pi1)] = pool.apply_async(sim, [mu1, sd1, pi1])
# Output simulation results:
with open("results/tsh-simulation.tsv", "w", encoding="utf-8") as tsh:
tsh.write("\tµ₁\tsd₁\tπ₁\tPᵀ\t\n")
tsh.write("\tµ₁\tσ₁\tπ₁\tP2.5\tP97.5\n")
for task, result in results.items():
result = result.get()
tsh.write("Result\t" + task + "\t" + str(result[0]) + "\t" + str(result[1]) + "\n")