开发者

Predict downloads

开发者 https://www.devze.com 2022-12-16 02:46 出处:网络
I\'m writing a little tool that counts the downloads of an app. I save every download with a timestamp.

I'm writing a little tool that counts the downloads of an app. I save every download with a timestamp.

What algorithm (php and mysql) is normally used开发者_开发技巧 for predicting eg todays downloads?


You could do Regression Analysis to predict the number of downloads on a given day. This image from Wikipedia shows some sample data points and the best-fit line. In case of downloads, the X axis could represents days, and Y axis could represent the number of downloads. Keeping that assumption, one would see that the number of downloads are going up each day on average.

Here's a good article explaining Linear Regression and IBM has written two articles on how to implement Simple Linear Regression with PHP (1, 2).

Also check out these other threads:

  1. Occurrence prediction
  2. Predictional Logic in Programming?
  3. Predict next event occurrence, based on past occurrences

Predict downloads


The term you want is "extrapolation", there are some equations and further details described here: http://en.wikipedia.org/wiki/Extrapolation

In principle you need to pick an equation that matches your expected trend (linear, exponential etc) then you use the current data to find the parameters that best fit that equation to your data. Something like R-squared is a simple measure of best fit.

Once you've done a best-fit you can use the resulting equation parameters to extrapolate future data.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号