diff --git a/README.md b/README.md index 17499ad..fb28754 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Models of Bayesian-like updating under constrained compute This repository contains some implementations of models of bayesian-like updating under constrained compute. The world in which these models operate is the set of sequences from the [Online Encyclopedia of Integer Sequences](https://oeis.org/), which can be downloaded from [here](https://oeis.org/wiki/JSON_Format,_Compressed_Files). -![](./screenshots/jit-bayes.png) +![](./outputs/jit-bayes.png) ## Models @@ -87,19 +87,26 @@ Why nim? Because it is nice to use and [freaking fast](https://github.com/NunoSe ### Prerequisites -Install [nim](https://nim-lang.org/install.html) and make. - -### Compilation +Install [nim](https://nim-lang.org/install.html) and make. Then: ``` git clone https://git.nunosempere.com/personal/compute-constrained-bayes.git cd compute-constrained-bayes cd src make deps ## get dependencies +``` + +### Compilation + +``` make fast ## also make, or make build, for compiling it with debug info. ./compute-constrained-bayes ``` +### Alternatively: + +See [here](./outputs/aha.html) for a copy of the program's outputs. + ## Contributions Contributions are very welcome, particularly around: diff --git a/outputs/aha.html b/outputs/aha.html new file mode 100644 index 0000000..188e4a7 --- /dev/null +++ b/outputs/aha.html @@ -0,0 +1,572 @@ + + + + +
+ ++$ unbuffer make run | aha > aha.html +./compute_constrained_bayes --verbosity:0 + +## Full prediction with access to all hypotheses (~Solomonoff) +## Initial sequence: @["1", "2", "3"] +continuation_probabilities=@[ + ("4", 0.5031144781144781), + ("5", 0.1727272727272727), + ("6", 0.07878787878787878), + ("2", 0.0505050505050505), + ("3", 0.04882154882154882), + ("7", 0.02803030303030303), + ("1", 0.02474747474747475), + ("8", 0.02163299663299663), + ("9", 0.01060606060606061), + ("10", 0.009175084175084175), + ("11", 0.008838383838383838), + ("12", 0.008501683501683501), + ("16", 0.003787878787878788), + ("14", 0.003787878787878788), + ("0", 0.003282828282828283), + ("15", 0.00260942760942761), + ("13", 0.002525252525252525), + ("18", 0.001262626262626263), + ("20", 0.001178451178451178), + ("17", 0.001178451178451178), + ("23", 0.000925925925925926), + ("24", 0.0008417508417508417), + ("22", 0.0008417508417508417), + ("41", 0.0007575757575757576), + ("28", 0.0006734006734006734), + ("19", 0.0005892255892255892), + ("211", 0.0005050505050505051), + ("29", 0.0004208754208754209), + ("30", 0.0004208754208754209), + ("26", 0.0003367003367003367), + ("35", 0.0003367003367003367), + ("25", 0.0003367003367003367), + ("4567", 0.0003367003367003367), + ("-2", 0.0003367003367003367), + ("-1", 0.0003367003367003367), + ("-4", 0.0002525252525252525), + ("40", 0.0002525252525252525), + ("60", 0.0002525252525252525), + ("32", 0.0002525252525252525), + ("81", 0.0001683501683501684), + ("64", 0.0001683501683501684), + ("38", 0.0001683501683501684), + ("56", 0.0001683501683501684), + ("33", 0.0001683501683501684), + ("31", 0.0001683501683501684), + ("123", 0.0001683501683501684), + ("69", 0.0001683501683501684), + ("27", 0.0001683501683501684), + ("39", 0.0001683501683501684), + ("128", 8.417508417508418e-05), + ("130", 8.417508417508418e-05), + ("55", 8.417508417508418e-05), + ("47", 8.417508417508418e-05), + ("65", 8.417508417508418e-05), + ("74", 8.417508417508418e-05), + ("83", 8.417508417508418e-05), + ("92", 8.417508417508418e-05), + ("124", 8.417508417508418e-05), + ("36", 8.417508417508418e-05), + ("789", 8.417508417508418e-05), + ("2436", 8.417508417508418e-05), + ("401", 8.417508417508418e-05), + ("43", 8.417508417508418e-05), + ("58", 8.417508417508418e-05), + ("34", 8.417508417508418e-05), + ("107", 8.417508417508418e-05), + ("380", 8.417508417508418e-05), + ("-3", 8.417508417508418e-05), + ("119", 8.417508417508418e-05), + ("456", 8.417508417508418e-05), + ("8787", 8.417508417508418e-05), + ("48", 8.417508417508418e-05), + ("127", 8.417508417508418e-05), + ("469", 8.417508417508418e-05), + ("57", 8.417508417508418e-05), + ("85", 8.417508417508418e-05), + ("617", 8.417508417508418e-05), + ("-16", 8.417508417508418e-05), + ("1080", 8.417508417508418e-05), + ("72", 8.417508417508418e-05), + ("95", 8.417508417508418e-05), + ("101", 8.417508417508418e-05), + ("661", 8.417508417508418e-05), + ("37", 8.417508417508418e-05), + ("2310", 8.417508417508418e-05), + ("62", 8.417508417508418e-05), + ("111213", 8.417508417508418e-05), + ("44", 8.417508417508418e-05), + ("99", 8.417508417508418e-05), + ("1767", 8.417508417508418e-05), + ("123543", 8.417508417508418e-05), + ("173", 8.417508417508418e-05), + ("21", 8.417508417508418e-05), + ("42", 8.417508417508418e-05), + ("144689999986441", 8.417508417508418e-05), + ("54", 8.417508417508418e-05), + ("512", 8.417508417508418e-05), + ("371", 8.417508417508418e-05), + ("52", 8.417508417508418e-05) +] + +## Predictions with increasingly many hypotheses +Showing predictions with increasingly many hypotheses after seeing @["1", "2", "3", "23"] +Predictions with 10% of the hypotheses +predictions=@[] +Predictions with 20% of the hypotheses +predictions=@[("49", 0.5), ("323", 0.5)] +Predictions with 30% of the hypotheses +predictions=@[("49", 0.3333333333333333), ("323", 0.3333333333333333), ("17", 0.3333333333333333)] +Predictions with 40% of the hypotheses +predictions=@[("49", 0.25), ("323", 0.25), ("17", 0.25), ("20880467999847912034355032910540", 0.25)] +Predictions with 50% of the hypotheses +predictions=@[("49", 0.25), ("323", 0.25), ("17", 0.25), ("20880467999847912034355032910540", 0.25)] +Predictions with 60% of the hypotheses +predictions=@[("49", 0.2), ("323", 0.2), ("17", 0.2), ("20880467999847912034355032910540", 0.2), ("59", 0.2)] +Predictions with 70% of the hypotheses +predictions=@[("49", 0.2), ("323", 0.2), ("17", 0.2), ("20880467999847912034355032910540", 0.2), ("59", 0.2)] +Predictions with 80% of the hypotheses +predictions=@[ + ("49", 0.125), + ("323", 0.125), + ("17", 0.125), + ("20880467999847912034355032910540", 0.125), + ("59", 0.125), + ("29", 0.125), + ("19", 0.125), + ("5", 0.125) +] +Predictions with 90% of the hypotheses +predictions=@[ + ("49", 0.125), + ("323", 0.125), + ("17", 0.125), + ("20880467999847912034355032910540", 0.125), + ("59", 0.125), + ("29", 0.125), + ("19", 0.125), + ("5", 0.125) +] +Predictions with 100% of the hypotheses +predictions=@[ + ("49", 0.09090909090909091), + ("323", 0.09090909090909091), + ("17", 0.09090909090909091), + ("20880467999847912034355032910540", 0.09090909090909091), + ("59", 0.09090909090909091), + ("29", 0.09090909090909091), + ("19", 0.09090909090909091), + ("5", 0.09090909090909091), + ("31", 0.09090909090909091), + ("11", 0.09090909090909091), + ("43", 0.09090909090909091) +] + +## Prediction with limited number of hypotheses (~JIT-Bayes) +### Prediction after seeing 3 observations: @["1", "2", "3"] +predictions=@[ + ("4", 0.375), + ("5", 0.25), + ("6", 0.2083333333333333), + ("8", 0.04166666666666666), + ("10", 0.04166666666666666), + ("3", 0.04166666666666666), + ("7", 0.04166666666666666) +] +Correct continuation, 23 not found in set of hypotheses of size 1000/362901. Increasing size of the set of hypotheses. +Correct continuation, 23 not found in set of hypotheses of size 31000/362901. Increasing size of the set of hypotheses. +Increased number of hypotheses to 61000, and found 1 concordant hypotheses. Continuing +### Prediction after seeing 4 observations: @["1", "2", "3", "23"] +predictions=@[("49", 1.0)] +Correct continuation, 11 not found in set of hypotheses of size 61000/362901. Increasing size of the set of hypotheses. +Correct continuation, 11 not found in set of hypotheses of size 91000/362901. Increasing size of the set of hypotheses. +Correct continuation, 11 not found in set of hypotheses of size 121000/362901. Increasing size of the set of hypotheses. +Correct continuation, 11 not found in set of hypotheses of size 151000/362901. Increasing size of the set of hypotheses. +Correct continuation, 11 not found in set of hypotheses of size 181000/362901. Increasing size of the set of hypotheses. +Correct continuation, 11 not found in set of hypotheses of size 211000/362901. Increasing size of the set of hypotheses. +Correct continuation, 11 not found in set of hypotheses of size 241000/362901. Increasing size of the set of hypotheses. +Correct continuation, 11 not found in set of hypotheses of size 271000/362901. Increasing size of the set of hypotheses. +Correct continuation, 11 not found in set of hypotheses of size 301000/362901. Increasing size of the set of hypotheses. +Increased number of hypotheses to 331000, and found 1 concordant hypotheses. Continuing +### Prediction after seeing 5 observations: @["1", "2", "3", "23", "11"] +predictions=@[("18", 1.0)] +Correct continuation was 18 +It was assigned a probability of 1.0 +### Prediction after seeing 6 observations: @["1", "2", "3", "23", "11", "18"] +predictions=@[("77", 1.0)] +Correct continuation was 77 +It was assigned a probability of 1.0 +### Prediction after seeing 7 observations: @["1", "2", "3", "23", "11", "18", "77"] +predictions=@[("46", 1.0)] +Correct continuation was 46 +It was assigned a probability of 1.0 +### Prediction after seeing 8 observations: @["1", "2", "3", "23", "11", "18", "77", "46"] +predictions=@[("84", 1.0)] +Correct continuation was 84 +It was assigned a probability of 1.0 + +## Mini-infra-bayesianism over environments, where your utility in an environment is just the log-loss in the predictions you make until you become certain that you are in that environment. +### Prediction after seeing 3 observations: @["1", "2", "3"] +predictions=@[ + ("4", 0.5031144781144781), + ("5", 0.1727272727272727), + ("6", 0.07878787878787878), + ("2", 0.0505050505050505), + ("3", 0.04882154882154882), + ("7", 0.02803030303030303), + ("1", 0.02474747474747475), + ("8", 0.02163299663299663), + ("9", 0.01060606060606061), + ("10", 0.009175084175084175), + ("11", 0.008838383838383838), + ("12", 0.008501683501683501), + ("16", 0.003787878787878788), + ("14", 0.003787878787878788), + ("0", 0.003282828282828283), + ("15", 0.00260942760942761), + ("13", 0.002525252525252525), + ("18", 0.001262626262626263), + ("20", 0.001178451178451178), + ("17", 0.001178451178451178), + ("23", 0.000925925925925926), + ("24", 0.0008417508417508417), + ("22", 0.0008417508417508417), + ("41", 0.0007575757575757576), + ("28", 0.0006734006734006734), + ("19", 0.0005892255892255892), + ("211", 0.0005050505050505051), + ("29", 0.0004208754208754209), + ("30", 0.0004208754208754209), + ("26", 0.0003367003367003367), + ("35", 0.0003367003367003367), + ("25", 0.0003367003367003367), + ("4567", 0.0003367003367003367), + ("-2", 0.0003367003367003367), + ("-1", 0.0003367003367003367), + ("-4", 0.0002525252525252525), + ("40", 0.0002525252525252525), + ("60", 0.0002525252525252525), + ("32", 0.0002525252525252525), + ("81", 0.0001683501683501684), + ("64", 0.0001683501683501684), + ("38", 0.0001683501683501684), + ("56", 0.0001683501683501684), + ("33", 0.0001683501683501684), + ("31", 0.0001683501683501684), + ("123", 0.0001683501683501684), + ("69", 0.0001683501683501684), + ("27", 0.0001683501683501684), + ("39", 0.0001683501683501684), + ("128", 8.417508417508418e-05), + ("130", 8.417508417508418e-05), + ("55", 8.417508417508418e-05), + ("47", 8.417508417508418e-05), + ("65", 8.417508417508418e-05), + ("74", 8.417508417508418e-05), + ("83", 8.417508417508418e-05), + ("92", 8.417508417508418e-05), + ("124", 8.417508417508418e-05), + ("36", 8.417508417508418e-05), + ("789", 8.417508417508418e-05), + ("2436", 8.417508417508418e-05), + ("401", 8.417508417508418e-05), + ("43", 8.417508417508418e-05), + ("58", 8.417508417508418e-05), + ("34", 8.417508417508418e-05), + ("107", 8.417508417508418e-05), + ("380", 8.417508417508418e-05), + ("-3", 8.417508417508418e-05), + ("119", 8.417508417508418e-05), + ("456", 8.417508417508418e-05), + ("8787", 8.417508417508418e-05), + ("48", 8.417508417508418e-05), + ("127", 8.417508417508418e-05), + ("469", 8.417508417508418e-05), + ("57", 8.417508417508418e-05), + ("85", 8.417508417508418e-05), + ("617", 8.417508417508418e-05), + ("-16", 8.417508417508418e-05), + ("1080", 8.417508417508418e-05), + ("72", 8.417508417508418e-05), + ("95", 8.417508417508418e-05), + ("101", 8.417508417508418e-05), + ("661", 8.417508417508418e-05), + ("37", 8.417508417508418e-05), + ("2310", 8.417508417508418e-05), + ("62", 8.417508417508418e-05), + ("111213", 8.417508417508418e-05), + ("44", 8.417508417508418e-05), + ("99", 8.417508417508418e-05), + ("1767", 8.417508417508418e-05), + ("123543", 8.417508417508418e-05), + ("173", 8.417508417508418e-05), + ("21", 8.417508417508418e-05), + ("42", 8.417508417508418e-05), + ("144689999986441", 8.417508417508418e-05), + ("54", 8.417508417508418e-05), + ("512", 8.417508417508418e-05), + ("371", 8.417508417508418e-05), + ("52", 8.417508417508418e-05) +] +Correct continuation was 23 +It was assigned a probability of 0.000925925925925926 +And hence a loss of -6.984716320118265 +Total loss is: -6.984716320118265 +### Prediction after seeing 4 observations: @["1", "2", "3", "23"] +predictions=@[ + ("49", 0.09090909090909091), + ("323", 0.09090909090909091), + ("17", 0.09090909090909091), + ("20880467999847912034355032910540", 0.09090909090909091), + ("59", 0.09090909090909091), + ("29", 0.09090909090909091), + ("19", 0.09090909090909091), + ("5", 0.09090909090909091), + ("31", 0.09090909090909091), + ("11", 0.09090909090909091), + ("43", 0.09090909090909091) +] +Correct continuation was 11 +It was assigned a probability of 0.09090909090909091 +And hence a loss of -2.397895272798371 +Total loss is: -9.382611592916636 +### Prediction after seeing 5 observations: @["1", "2", "3", "23", "11"] +predictions=@[("18", 1.0)] +Correct continuation was 18 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -9.382611592916636 +### Prediction after seeing 6 observations: @["1", "2", "3", "23", "11", "18"] +predictions=@[("77", 1.0)] +Correct continuation was 77 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -9.382611592916636 +### Prediction after seeing 7 observations: @["1", "2", "3", "23", "11", "18", "77"] +predictions=@[("46", 1.0)] +Correct continuation was 46 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -9.382611592916636 +### Prediction after seeing 8 observations: @["1", "2", "3", "23", "11", "18", "77", "46"] +predictions=@[("84", 1.0)] +Correct continuation was 84 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -9.382611592916636 + +## Mini-infra-bayesianism over environments, where your utility in an environment is just the log-loss in the predictions you make until you become certain that you are in that environment. This time with a twist: You don't have hypotheses over the sequences you observe, but rather over their odd and even position, i.e., you think that you observe interleaved OEIS sequences, (a1, b1, a2, b2, a3, b3). See the README.md for more. +### Prediction after seeing 6 observations: @["1", "2", "2", "11", "3", "13"] +predictions=@[ + ("4", 0.5031144781144781), + ("5", 0.1727272727272727), + ("6", 0.07878787878787878), + ("2", 0.0505050505050505), + ("3", 0.04882154882154882), + ("7", 0.02803030303030303), + ("1", 0.02474747474747475), + ("8", 0.02163299663299663), + ("9", 0.01060606060606061), + ("10", 0.009175084175084175), + ("11", 0.008838383838383838), + ("12", 0.008501683501683501), + ("16", 0.003787878787878788), + ("14", 0.003787878787878788), + ("0", 0.003282828282828283), + ("15", 0.00260942760942761), + ("13", 0.002525252525252525), + ("18", 0.001262626262626263), + ("20", 0.001178451178451178), + ("17", 0.001178451178451178), + ("23", 0.000925925925925926), + ("24", 0.0008417508417508417), + ("22", 0.0008417508417508417), + ("41", 0.0007575757575757576), + ("28", 0.0006734006734006734), + ("19", 0.0005892255892255892), + ("211", 0.0005050505050505051), + ("29", 0.0004208754208754209), + ("30", 0.0004208754208754209), + ("26", 0.0003367003367003367), + ("35", 0.0003367003367003367), + ("25", 0.0003367003367003367), + ("4567", 0.0003367003367003367), + ("-2", 0.0003367003367003367), + ("-1", 0.0003367003367003367), + ("-4", 0.0002525252525252525), + ("40", 0.0002525252525252525), + ("60", 0.0002525252525252525), + ("32", 0.0002525252525252525), + ("81", 0.0001683501683501684), + ("64", 0.0001683501683501684), + ("38", 0.0001683501683501684), + ("56", 0.0001683501683501684), + ("33", 0.0001683501683501684), + ("31", 0.0001683501683501684), + ("123", 0.0001683501683501684), + ("69", 0.0001683501683501684), + ("27", 0.0001683501683501684), + ("39", 0.0001683501683501684), + ("128", 8.417508417508418e-05), + ("130", 8.417508417508418e-05), + ("55", 8.417508417508418e-05), + ("47", 8.417508417508418e-05), + ("65", 8.417508417508418e-05), + ("74", 8.417508417508418e-05), + ("83", 8.417508417508418e-05), + ("92", 8.417508417508418e-05), + ("124", 8.417508417508418e-05), + ("36", 8.417508417508418e-05), + ("789", 8.417508417508418e-05), + ("2436", 8.417508417508418e-05), + ("401", 8.417508417508418e-05), + ("43", 8.417508417508418e-05), + ("58", 8.417508417508418e-05), + ("34", 8.417508417508418e-05), + ("107", 8.417508417508418e-05), + ("380", 8.417508417508418e-05), + ("-3", 8.417508417508418e-05), + ("119", 8.417508417508418e-05), + ("456", 8.417508417508418e-05), + ("8787", 8.417508417508418e-05), + ("48", 8.417508417508418e-05), + ("127", 8.417508417508418e-05), + ("469", 8.417508417508418e-05), + ("57", 8.417508417508418e-05), + ("85", 8.417508417508418e-05), + ("617", 8.417508417508418e-05), + ("-16", 8.417508417508418e-05), + ("1080", 8.417508417508418e-05), + ("72", 8.417508417508418e-05), + ("95", 8.417508417508418e-05), + ("101", 8.417508417508418e-05), + ("661", 8.417508417508418e-05), + ("37", 8.417508417508418e-05), + ("2310", 8.417508417508418e-05), + ("62", 8.417508417508418e-05), + ("111213", 8.417508417508418e-05), + ("44", 8.417508417508418e-05), + ("99", 8.417508417508418e-05), + ("1767", 8.417508417508418e-05), + ("123543", 8.417508417508418e-05), + ("173", 8.417508417508418e-05), + ("21", 8.417508417508418e-05), + ("42", 8.417508417508418e-05), + ("144689999986441", 8.417508417508418e-05), + ("54", 8.417508417508418e-05), + ("512", 8.417508417508418e-05), + ("371", 8.417508417508418e-05), + ("52", 8.417508417508418e-05) +] +Correct continuation was 23 +It was assigned a probability of 0.000925925925925926 +And hence a loss of -6.984716320118265 +Total loss is: -6.984716320118265 +### Prediction after seeing 7 observations: @["1", "2", "2", "11", "3", "13", "23"] +predictions=@[ + ("17", 0.4035087719298245), + ("19", 0.1228070175438596), + ("23", 0.1228070175438596), + ("29", 0.07017543859649122), + ("31", 0.07017543859649122), + ("24", 0.03508771929824561), + ("7", 0.03508771929824561), + ("101", 0.03508771929824561), + ("41", 0.03508771929824561), + ("47", 0.01754385964912281), + ("20", 0.01754385964912281), + ("22", 0.01754385964912281), + ("25", 0.01754385964912281) +] +Correct continuation was 23 +It was assigned a probability of 0.1228070175438596 +And hence a loss of -2.097141118779237 +Total loss is: -9.081857438897501 +### Prediction after seeing 8 observations: @["1", "2", "2", "11", "3", "13", "23", "23"] +predictions=@[ + ("49", 0.09090909090909091), + ("323", 0.09090909090909091), + ("17", 0.09090909090909091), + ("20880467999847912034355032910540", 0.09090909090909091), + ("59", 0.09090909090909091), + ("29", 0.09090909090909091), + ("19", 0.09090909090909091), + ("5", 0.09090909090909091), + ("31", 0.09090909090909091), + ("11", 0.09090909090909091), + ("43", 0.09090909090909091) +] +Correct continuation was 11 +It was assigned a probability of 0.09090909090909091 +And hence a loss of -2.397895272798371 +Total loss is: -11.47975271169587 +### Prediction after seeing 9 observations: @["1", "2", "2", "11", "3", "13", "23", "23", "11"] +predictions=@[ + ("29", 0.2857142857142857), + ("41", 0.2857142857142857), + ("37", 0.1428571428571428), + ("31", 0.1428571428571428), + ("47", 0.1428571428571428) +] +Correct continuation was 47 +It was assigned a probability of 0.1428571428571428 +And hence a loss of -1.945910149055313 +Total loss is: -13.42566286075118 +### Prediction after seeing 10 observations: @["1", "2", "2", "11", "3", "13", "23", "23", "11", "47"] +predictions=@[("18", 1.0)] +Correct continuation was 18 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -13.42566286075118 +### Prediction after seeing 11 observations: @["1", "2", "2", "11", "3", "13", "23", "23", "11", "47", "18"] +predictions=@[("59", 1.0)] +Correct continuation was 59 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -13.42566286075118 +### Prediction after seeing 12 observations: @["1", "2", "2", "11", "3", "13", "23", "23", "11", "47", "18", "59"] +predictions=@[("77", 1.0)] +Correct continuation was 77 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -13.42566286075118 +### Prediction after seeing 13 observations: @["1", "2", "2", "11", "3", "13", "23", "23", "11", "47", "18", "59", "77"] +predictions=@[("71", 1.0)] +Correct continuation was 71 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -13.42566286075118 +### Prediction after seeing 14 observations: @["1", "2", "2", "11", "3", "13", "23", "23", "11", "47", "18", "59", "77", "71"] +predictions=@[("46", 1.0)] +Correct continuation was 46 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -13.42566286075118 +### Prediction after seeing 15 observations: @["1", "2", "2", "11", "3", "13", "23", "23", "11", "47", "18", "59", "77", "71", "46"] +predictions=@[("83", 1.0)] +Correct continuation was 83 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -13.42566286075118 +### Prediction after seeing 16 observations: @["1", "2", "2", "11", "3", "13", "23", "23", "11", "47", "18", "59", "77", "71", "46", "83"] +predictions=@[("84", 1.0)] +Correct continuation was 84 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -13.42566286075118 +### Prediction after seeing 17 observations: @["1", "2", "2", "11", "3", "13", "23", "23", "11", "47", "18", "59", "77", "71", "46", "83", "84"] +predictions=@[("107", 1.0)] +Correct continuation was 107 +It was assigned a probability of 1.0 +And hence a loss of 0.0 +Total loss is: -13.42566286075118 + ++ + diff --git a/outputs/aha.sh b/outputs/aha.sh new file mode 100644 index 0000000..f105dda --- /dev/null +++ b/outputs/aha.sh @@ -0,0 +1,3 @@ +unbuffer make run | aha > aha.html +# where aha is https://github.com/theZiz/aha + diff --git a/screenshots/jit-bayes.png b/outputs/jit-bayes.png similarity index 100% rename from screenshots/jit-bayes.png rename to outputs/jit-bayes.png diff --git a/src/compute_constrained_bayes b/src/compute_constrained_bayes index 9fb4943..0c523dc 100755 Binary files a/src/compute_constrained_bayes and b/src/compute_constrained_bayes differ