From c1c47966c2d060705f9544b4a3ed01dfe5ac91b2 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 25 Feb 2024 17:33:05 -0300 Subject: [PATCH] tweak sample size --- probppl.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/probppl.go b/probppl.go index 43e2a29..c9208b7 100644 --- a/probppl.go +++ b/probppl.go @@ -108,8 +108,11 @@ func draw148PplFromDistributionAndCheck(d pplKnownDistrib, r src) int64 { func getUnnormalizedBayesianUpdateForDistribution(d pplKnownDistrib, r src) float64 { var sum int64 = 0 - n := 1_000 + n := 100_000 for i := 0; i < n; i++ { + if i%1000 == 0 { + fmt.Println(i) + } sum += draw148PplFromDistributionAndCheck(d, r) } return float64(sum) / float64(n) @@ -120,6 +123,7 @@ func main() { var r = rand.New(rand.NewPCG(uint64(1), uint64(2))) people_known_distribution := generatePeopleKnownDistribution(r) + fmt.Println(people_known_distribution) /* for i, p := range people_known_distribution { fmt.Print64f("%d: %.4f\n", i, p) } */