Skip to content

Commit

Permalink
store & read data from plain text
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Fowlie committed May 27, 2021
1 parent 9bf5d3d commit 17a075f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions plots/data/mn_dim_1.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions plots/data/mn_dim_30.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions plots/data/mn_dim_5.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions plots/data/pc_dim_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.000000000000000000e+00 1.377781069434297345e-01 2.857473043968638549e-01 4.452846504527215865e-01 6.179802449447613366e-01 8.056688430882394947e-01 1.010465078230409652e+00 1.234802448731654678e+00 1.481476239918988025e+00 1.753690614799728209e+00 2.055110231005061738e+00 2.389916932036114439e+00 2.762872311200295083e+00 3.179387235546495383e+00 3.645599713600443437e+00 4.168462762685360978e+00 4.755844156639480680e+00 5.416640107909802104e+00 6.160905073496857121e+00 7.000000000000000000e+00
4.408416068361251519e+02 6.352329342616178565e+02 9.014975550717034594e+02 1.300700640308665697e+03 1.897197888051261543e+03 2.815105758546526886e+03 4.208021332578279726e+03 6.266703214368820227e+03 9.612643066759865178e+03 1.390126958424562872e+04 2.008167350419891227e+04 3.111361423098999876e+04 4.757993314423712582e+04 7.384014881172256719e+04 1.190142237757658004e+05 1.875223252210470673e+05 2.978164277979269391e+05 4.703988421811308363e+05 7.469328438755112002e+05 1.213508202502314234e+06
2 changes: 2 additions & 0 deletions plots/data/pc_dim_30.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-5.565832849343534251e-16 2.870208223879823772e-01 5.812585929032431098e-01 8.829863371746123901e-01 1.192488053074985732e+00 1.510059138010886315e+00 1.836006831655971672e+00 2.170650674659833967e+00 2.514322983884421880e+00 2.867369344741986126e+00 3.230149121231380871e+00 3.603035984293440741e+00 3.986418459131311209e+00 4.380700492167696858e+00 4.786302038338755338e+00 5.203659669452778580e+00 5.633227204372208696e+00 6.075476361808608061e+00 6.530897436553238400e+00 7.000000000000000888e+00
1.015599248956430893e+04 2.003489264471608112e+04 3.655705983799456590e+04 6.241697854207388446e+04 1.151843822111389600e+05 1.878134375618739577e+05 3.222793637616939959e+05 5.055291475156724337e+05 8.057125136110410094e+05 1.260916674932757393e+06 1.943429725093171699e+06 2.949412086460865103e+06 4.288911045900060795e+06 6.605232433029321022e+06 1.000212494804987498e+07 1.538863568228394911e+07 2.229281119064341113e+07 3.298089436365664750e+07 4.930707295756006986e+07 7.878257146670958400e+07
2 changes: 2 additions & 0 deletions plots/data/pc_dim_5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2.782916424671767126e-16 2.173864544096037466e-01 4.452916861268750304e-01 6.845033146133479018e-01 9.358715776627873906e-01 1.200314061007649702e+00 1.478820750757726232e+00 1.772459430697996163e+00 2.082381448501246624e+00 2.409827877118522643e+00 2.756136099994684230e+00 3.122746851315002292e+00 3.511211745220365721e+00 3.923201330833852030e+00 4.360513713023203231e+00 4.825083782088392503e+00 5.318993099020426385e+00 5.844480486639494821e+00 6.403953380803461215e+00 7.000000000000000000e+00
1.809807288442017352e+03 3.138160998602367727e+03 5.414608087827095915e+03 8.671378288073685326e+03 1.512967037100990819e+04 2.231739187465344003e+04 3.503774472877111111e+04 5.923851561263520853e+04 9.129251585717678245e+04 1.516923858021628403e+05 2.398101452634226298e+05 3.765081041579036391e+05 6.041280369415296009e+05 9.818750514114275575e+05 1.623344036590387346e+06 2.514357867354522459e+06 3.772309949845963158e+06 5.460440977422655560e+06 7.925297152438407764e+06 1.195292161154104955e+07
11 changes: 4 additions & 7 deletions plots/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Requires data saved as pikcles.
"""

import pickle
import numpy as np

from scipy.stats import norm
Expand Down Expand Up @@ -39,9 +38,8 @@

for d, l in zip(dims, ls_list):
try:
pkl_name = "../examples/pkl/pc_dim_{}.pkl".format(d)
with open(pkl_name, 'rb') as pkl:
px, py = pickle.load(pkl)
txt_name = "./data/pc_dim_{}.txt".format(d)
px, py = np.loadtxt(txt_name)

p = ax[0].plot(px, py, label=r"\textsc{{PolyChord}} ($d = {})$".format(d), ls=l, c='r', zorder=5)
pr = []
Expand All @@ -55,9 +53,8 @@

for d, l in zip(dims, ls_list):
try:
pkl_name = "../examples/pkl/mn_dim_{}.pkl".format(d)
with open(pkl_name, 'rb') as pkl:
px, py = pickle.load(pkl)
txt_name = "./data/mn_dim_{}.txt".format(d)
px, py = np.loadtxt(txt_name)

p = ax[0].plot(px, py, label=r"\textsc{{MultiNest}} ($d = {})$".format(d), ls=l, c='b')
pr = []
Expand Down

0 comments on commit 17a075f

Please sign in to comment.