From cd6eb5203c169c5bc67f6bf0cf8df48bb786061d Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 16 Jul 2023 17:59:53 +0200 Subject: [PATCH] add some thoughts to scratchpad and readme --- scratchpad/scratchpad | Bin 22056 -> 21984 bytes scratchpad/scratchpad.c | 13 +++++++++---- to-do.md | 9 +++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/scratchpad/scratchpad b/scratchpad/scratchpad index b1224e6724193197c269ebb434be8725b123a481..57601d606328f000879eddeeff2d00ed6545b073 100755 GIT binary patch literal 21984 zcmeHPe{@vUoxe#81SOdPp+>ASQmH{;2tNzfND>%$X@f>hT0mhOk_k*rCUG)@!L$+RcmUcZ`x-De_)}TjQsB90dSW}N~XH440fNkocv!Cz1_xtkR z%M9(7{iA>6=FEKW_viiI@4ff??z=DZ9`V(#$Qjl^a`n} zaVHGUP;v~JZ?;#i_`(4XNTWh9wCYi8Dl3#;4*#K5t;Prv|gRoV<@y9LyjlK zgg(o4Je|-39u<%L7Q(5wUh6sGYAw%@+MsgRThXS!q`f+=cY2|+B~LR*$CSG(L`u$2Yt6;FRU9@Zs zw6+FBOWRh_aepM*EP|0{(Gdz$TaBu%U}q>Q+GEiUSccKY`}~dD?(;VXLM@`PrLFNk z(Hdw01h=s>;BO9v11+Hk$qh20-DnNKWJkC?5(=Y@=14Fo*4EZkuktVQE?PWVT`^kq zE;Z{*(Di)1D)O#;9k*-Q{W*0i|93&qbh z9-9%u6{A4B37kqE?9qba{4p&QDyGajq-jb%-<0RP&iS-o52~T_Hq#GidJzpg3ey=s zbGxF`8s{8Blzt2SawQ_aQx-a{SuR5s`V=Mtj#%iFPq=K;^obx)+_~es1jZvU9)Z8Q2%K|W_ny%;SY-4R{(Pkn zMt3rrpE+rCJy&#G`kGm~2;||+?8N}CnS$iE5ob94t4t=dSK_pB7*3xuaoR8pr+ZDD zHZ;TOZ<{!69EQ_RnmBD3hSQIkIBgV$)4NQZHVDJ%`%RoS2E*xqiPMH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a$@ZX6lq z^wON1Z^FrbJx#U-Ih3%T2NvF%V_;aseQX$J=4#*867z2ajYW0ZBy)I+PB7ZWTzIk> zbZv@sxZ0wvZNX@4n*rL`5ylIr!T|w!msZb?`8P4n-sEp@Vy?ip2%6AoEUMSg6Iwjz z%qsX$7Y#Q1NkHVEak`=E7Rmg7rx*mVZ5^%TfV8xNPzy_mz^$a}ZI@d1apHwfNAH zgOsQ1BPB`gyfpG9&l@B{x6MZRdLb{VxJ{7k*h6HeYLmR&&q`{~X1`4SR@CD^ORds= zdA=j5Y+s)5nC1fy(U z%FF(LPslG7d~%;JsXYH8d6F^9{}>qgMC!+_nVtj{w_O6vey0)u*!+Nc$!FxJh1~Ye*{3Q6;~5 z{v8tXa{M#r9~HVp!W6LP_MbAz%X1P*=~=%qncF{!N@_y3FV9mX9Te+{)FI=?~IN>Wbx z@gIRv|1%Ke0aKCv7axyByZ`_I diff --git a/scratchpad/scratchpad.c b/scratchpad/scratchpad.c index 238b8cc..d49fe56 100644 --- a/scratchpad/scratchpad.c +++ b/scratchpad/scratchpad.c @@ -21,7 +21,7 @@ return error; \ } \ } while (0) -#define NUM_SAMPLES 10 +#define NUM_SAMPLES 1000000 struct box { int empty; @@ -399,7 +399,7 @@ void test_and_time_sampler_float(char* cdf_name, float cdf_float(float), uint32_ if (sample.empty) { printf("Error in sampler function for %s", cdf_name); } else { - printf("%f\n", sample.content); + // printf("%f\n", sample.content); } } clock_t end = clock(); @@ -416,7 +416,7 @@ void test_and_time_sampler_box(char* cdf_name, struct box cdf_box(float), uint32 if (sample.empty) { printf("Error in sampler function for %s", cdf_name); } else { - printf("%f\n", sample.content); + // printf("%f\n", sample.content); } } clock_t end = clock(); @@ -451,7 +451,7 @@ int main() for (int i = 0; i < NUM_SAMPLES; i++) { float normal_sample = sampler_normal_0_1(seed); - printf("%f\n", normal_sample); + // printf("%f\n", normal_sample); } clock_t end_2 = clock(); @@ -460,6 +460,11 @@ int main() // Test box sampler test_and_time_sampler_box("cdf_beta", cdf_beta, seed); + // Ok, this is slower than python!! + // Partly this is because I am using a more general algorithm, + // which applies to any cdf + // But I am also using really anal convergence conditions. + // This could be optimized. free(seed); return 0; diff --git a/to-do.md b/to-do.md index 02b71ee..2eb1eb1 100644 --- a/to-do.md +++ b/to-do.md @@ -6,6 +6,11 @@ - [x] Chain various mixture functions - [ ] Have some more complicated & realistic example - [ ] Add summarization functions, like mean, std, 90% ci (or all c.i.?) -- [ ] Add beta distribution +- [x] Add beta distribution + - See for a faster method. - [ ] Use OpenMP for acceleration -- [ ] Add function to get sample when given a cdf +- [x] Add function to get sample when given a cdf +- [ ] Don't have a single header file. +- [ ] Structure project a bit better +- [ ] Add README +- [ ] Publish