small format & refactor

This commit is contained in:
NunoSempere 2023-05-24 14:47:34 -07:00
parent 8ec8f1eda9
commit 4228edfb25
2 changed files with 21 additions and 17 deletions

Binary file not shown.

View File

@ -98,6 +98,7 @@ proc predictContinuationWithTruncatedHypotheses(seqs: seq[seq[string]], start: s
let truncated_seqs = seqs[0..<n] let truncated_seqs = seqs[0..<n]
return predictContinuation(truncated_seqs, start) return predictContinuation(truncated_seqs, start)
proc showPredictionsWithMoreHypotheses() =
let l = seqs.len let l = seqs.len
for i in 1..10: for i in 1..10:
let n = (l.float * (i.float/10.0)).int let n = (l.float * (i.float/10.0)).int
@ -105,3 +106,6 @@ for i in 1..10:
let predictions = predictContinuationWithTruncatedHypotheses(seqs, start, n) let predictions = predictContinuationWithTruncatedHypotheses(seqs, start, n)
print predictions print predictions
## showPredictionsWithMoreHypotheses()
proc jitBayesLoop(seqs: seq[seq[string]], observations: seq[string]) =