3 ms·
The one place I've used Bayes (hopefully properly!) is in a spaced repetition flash card program. Usually spaced repetition algorithms wait a certain amount of
by mikekchar 10y ago
The one place I've used Bayes (hopefully properly!) is in a spaced repetition flash card program. Usually spaced repetition algorithms wait a certain amount of time based on how many times you have seen and remembered a card. The more times you have remembered it, the longer you wait. It then creates a schedule for each day. You review the cards that have "expired" their wait time.
I wanted to turn this upside down. Instead I sorted the cards by how likely you would be to remember them (a function of the number of times you have already remembered it and the amount of time that has passed since you last saw it). I put the least likely to be remembered cards first and the most likely to be remembered cards last.
As you reviewed the cards you would either remember them or not remember them. I supposed that cards grouped together had a similar probability of being remembered (only valid if my sort algorithm was correct, but I had some confidence on that since I based it on somebody else's research ;-) ). I then used Bayes to estimate the probability of getting the card correct.
So instead of scheduling the cards, I simply had the user keep reviewing until I had a certain confidence that there was a 90% or more of getting the cards correct. At which point I left the rest for another day (the probability goes down over time). Interestingly as the test is binary (remembered/not remembered) Bayes could be simplified down to getting it right a certain number of times in a row. This was simpler for the user to understand without significantly reducing the accuracy of the estimate.
Gratifyingly the system worked incredibly well. I added an option to continue drilling the cards after you hit the 90% mark and I very rarely got into a situation where the estimate was wrong.
- kybernetikos 10y agoThat sounds very interesting. Is your program available anywhere?
- mikekchar 10y agoSee my reply to mtrimpe below. I maintained this program for quite a long time, but realistically my choice of development platform was a poor one ;-) Also my code was pretty awful as I was experimenting with several strange ideas and also writing Ruby code is if I had spent the last 20 years writing C++ code (which... um... might have been true...) You can likely get it to work for some definitions of "work" on a Linux box, but anything else would require serious effort ;-) Link in case you don't see the other message: https://github.com/mikekchar/JLDrill https://github.com/mikekchar/JLDrill
- mtrimpe 10y agoThat sounds fascinating. Is there anywhere you could look at the result (or code ;) of this work?
- mikekchar 10y agoUmm... The code is horrific as I was experimenting with a few different ideas. It is written in Ruby for GTK+ and is not at all idiomatic Ruby. It's also somewhere between slightly and completely broken at the moment... But with all that in mind: https://github.com/mikekchar/JLDrill https://github.com/mikekchar/JLDrill Probably more interesting is simply my description of the scheduling algorithm: https://github.com/mikekchar/JLDrill/blob/master/web/src/Strategy.page https://github.com/mikekchar/JLDrill/blob/master/web/src/Str... There is also one detail missing which is forgetting. Because the items are sorted by the ratio of time waited to "ideal schedule", we can easily stick anything over a certain amount into a separate set (called the forgotten set). That way if you don't study for a long time you can "forget" those items and they are treated like a high priority "new" set until the set is empty. Probably that makes no sense, but if you read my strategy document, you will hopefully be able to understand.
- hacker42 10y agoThat basically seems to ignore the exponential Ebbinghausian forgetting curve. I doubt it results in better scheduling of the cards.
- mikekchar 10y agoIt's not exponential. It has a gamma distribution. The nice thing about the gamma distribution is that within a short part of the tail it is nearly linear. So while it's hard to explain the math in an HN posting, below a certain probability your odds of getting a 90-95% confidence of a 90% recall rate (10% forgetting) rate is very, very low. So you will have to review all of those cards anyway. Once you get into the range where false positives are more likely (say above 80%) the curve starts to get more linear. This is especially true for cards with a very shallow curve (those that you have seen many times). So even when you get it wrong, the ones that are likely to be problematic are those that you will review again quickly anyway. As for whether it results in a better scheduling of cards, it's hard to say. It has the advantage of being self adjusting and containing far fewer magic numbers than something like SM(insert-any-version-here).