Gale-Shapley Deferred Acceptance in R
In honor of today’s announcement of the
Nobel Prize for Roth and Shapley, I found an illustration of the deferred acceptance algorithm from 1962 in R. Credit for the code goes to the blogger at Letters from London, and I’ve included a Gist below that illustrates the use of their deferred acceptance function.
It looks like it’s supposed to produce an animation, but it doesn’t seem to be doing so. Nevertheless, it does produce a nice, stable matching, useful for anything from marriages to Teaching Assistant assignments!
leave a comment
for the author, please follow the link and comment on their blog:
daily e-mail updates
on topics such as:
Big Data, R jobs
, visualization (
), programming (
) statistics (
) and more...
If you got this far, why not
subscribe for updates
from the site? Choose your flavor: