A user visits my site at time t , and they may or may not click on a specific link, which I care about if they record the fact that they clicked the link, as well as the duration with t that they clicked, call it d .
I need an algorithm that allows me to create a class like this:
class ClickProbabilityEstimate { public void reportImpression(long id); public void reportClick(long id); public double estimateClickProbability(long id); }
Each impression gets a unique id , and this is used when you give a click to indicate which impression belongs to the click.
I need an algorithm that will return the probability, based on how much time has passed since the message about the impression, that a click will be received on the impression, based on how many previous clicks are required. Obviously, this probability can be expected to decrease over time if the click is still missing.
If necessary, we can set an upper limit beyond which we will consider the probability of a click equal to 0 (for example, if it were an hour from the moment the impression appeared, we can be sure that there will be no click).
The algorithm should be both space and time efficient, and I hope to make as few assumptions as possible, while being elegant. Ease of implementation will also be enjoyable. Any ideas?
source share