step: add initial shape of jit-bayes loop

This commit is contained in:
NunoSempere 2023-05-24 14:56:30 -07:00
parent 4228edfb25
commit d4581605e0
3 changed files with 23 additions and 1 deletions

View File

@ -108,4 +108,18 @@ proc showPredictionsWithMoreHypotheses() =
## showPredictionsWithMoreHypotheses()
proc jitBayesLoop(seqs: seq[seq[string]], observations: seq[string]) =
proc jitBayesLoop(
seqs: seq[seq[string]],
initial_num_hypotheses: int,
num_hypotheses_step: int,
observations: seq[string]
) =
let l = observations.len
var hypotheses = seqs[0..initial_num_hypotheses]
for i in 1..<l:
let predictions = predictContinuation(hypotheses, observations[0..<i])
print predictions
jitBayesLoop()

BIN
src/scratchpad/seqs_with_0 Executable file

Binary file not shown.

View File

@ -0,0 +1,8 @@
let i = 0
let x = 0..<i
echo x
let j = 1
let y = 0..<j
echo y