ebisu icon indicating copy to clipboard operation
ebisu copied to clipboard

Simpler expression for predictRecall when b is integer

Open fasiha opened this issue 6 years ago • 1 comments

Interesting factoid:

Beta[a+t, b] / Beta[a, b] = prod(map(lambda m: (a+m)/(a+t+m), range(b)))

for b>=2 integer (and a and t arbitrary), at least for b>=2 and b<=6.

(Apologies for mixing Mathematica and Python notation.)

This might be immediately useful if predictRecall checks for b (small?) integer.

This can be even more useful if we can find a way to make b always integer in our Ebisu models—easy to do when a quiz is a success, but a bit harder to do when a quiz is a failure: basically we have to search t' (t-prime in the readme) that makes b an integer.

Then, predicting recall at any given time is a rational polynomial, very fast to calculate, no need for Gamma or Beta functions. We could always try to make b=2 even.

(One question I have is, right now with version 1.0, we rebalance the model to roughly near the half-life so a and b aren't too different. Are there t's that yield Beta distributions that are more faithful to the GB1 posterior than others?)

fasiha avatar Dec 05 '19 04:12 fasiha

  • beta after update for any tback (t', t-prime) will be >= beta before update
  • beta after successful quizzes grows very slowly as tback increases a lot, so you might need to go to huge tback to get to beta = next integer

fasiha avatar Jun 03 '20 01:06 fasiha

Closed this because Ebisu v3 is moving away from Beta priors on recall to Gamma priors on half-life.

fasiha avatar Jan 14 '23 04:01 fasiha