"That algorithm is likely to stay hypothetical for some time."
I interviewed someone a few weeks ago whose prior job was maintaining such an algorithm for use in shopping malls. They had a database that you could issue queries like "Given that a person goes to store X, how long on average will it be until they return?" or "Are women who shop at Victoria's Secret likely to visit The Gap in the same month?" and so on. His job was applying that knowledge to affect what ads were displayed on the video screens that people walked past in the mall.
(Yes, the project was self-consciously inspired by "Minority Report". Apparently nobody found that creepy.)