Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I calculate the trending nature of a link? [closed]

enter image description here

The above image represents an article's page views over time. I'm looking for a decent, not to complex either physics or statistical calculation that would be able to give me (based on the history of the page views) what the current trending of the page views is for the past n days (which is represented by the blue box).

So basically, in the past 5 days is this link trending unusually higher than it usually does and if so by what degree/magnitude?

Ideally the accepted answer would provide an algorithm class that applies to this problem as well as some example of that using the data provided from this chart above.

thanks!

like image 743
James Avatar asked Dec 20 '25 21:12

James


1 Answers

One approach could be to perform a least squares fit of the points within the blue box. Trends could then measured by the difference between the points and the least squares fit approximation value.

like image 134
btreat Avatar answered Dec 22 '25 09:12

btreat