diff --git a/src/compute_constrained_bayes b/src/compute_constrained_bayes index f27f83a..9028165 100755 Binary files a/src/compute_constrained_bayes and b/src/compute_constrained_bayes differ diff --git a/src/compute_constrained_bayes.nim b/src/compute_constrained_bayes.nim index e4a8598..805e3b4 100644 --- a/src/compute_constrained_bayes.nim +++ b/src/compute_constrained_bayes.nim @@ -103,6 +103,7 @@ proc predictContinuationWithTruncatedHypotheses(seqs: seq[seq[string]], start: s return predictContinuation(truncated_seqs, start) proc showPredictionsWithMoreHypotheses(seqs: seq[seq[string]], start: seq[string]) = + echo "Showing predictions with increasingly many hypotheses after seeing ", start let l = seqs.len for i in 1..10: let n = (l.float * (i.float/10.0)).int @@ -179,6 +180,11 @@ let continuation_probabilities = predictContinuation(seqs, observations) print continuation_probabilities echo "" +echo "## Predictions with increasingly many hypotheses" +observations = @["1", "2", "3", "23"] +showPredictionsWithMoreHypotheses(seqs, observations) +echo "" + observations = @["1", "2", "3", "23", "11", "18", "77", "46", "84"] jitBayesLoop(seqs, observations, 3, 1_000, 2_000) diff --git a/src/makefile b/src/makefile index 26b9c83..4fd7832 100644 --- a/src/makefile +++ b/src/makefile @@ -1,15 +1,29 @@ +## make +## make = make build +## make deps +## make build +## make fast ## < recommended for users +## make run +## make examine +## make time + SHELL := /bin/bash ## <= required to use time VERBOSE=--verbosity:0 build: compute_constrained_bayes.nim nim c $(VERBOSE) compute_constrained_bayes.nim +fast: + nim c $(VERBOSE) -d:danger compute_constrained_bayes.nim && echo + deps: nimble install print@1.0.2 + gzip -d ../data/stripped.gz -c > ../data/stripped run: compute_constrained_bayes ./compute_constrained_bayes $(VERBOSE) +## Misc: examine: compute_constrained_bayes nim c $(VERBOSE) compute_constrained_bayes.nim && time ./compute_constrained_bayes $(VERBOSE) && echo nim c $(VERBOSE) -d:release compute_constrained_bayes.nim && time ./compute_constrained_bayes $(VERBOSE) && echo