Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Pretty sure this is going to have to boil down to a search that scores possible outcomes based on an error rate.
-
What?
say series is 1...n
calc the diffs series: 2-1, 3-2... n-(n-1)
then sum, and divide by n-1 to get the avg.
change what you get to human readable time period. -
The regularity should be fairly easy if you look for the root average of squares and compare it to average.
The delta should give you the average distance from the average. Or sth like that, there is a term that staticians use to find volatility in data.
Also accept the fact that the task is unsolvable for some cases and think how you would go reporting that to the user. -
I would think looking at deltas at standard deviation and min/max would be a good first pass to see of they are regular "enough"
-
@HitWRight Root average of squares is ringing bells from my Big Tech Inc. days, I think this is what I was trying to remember.
For context, this is more or less like a human-friendly "this user uploads content every couple of weeks" type of thing. I'd like statements like "every week", "every two weeks", "monthly", "bi-monthly", "once in a while" or "rarely" or whatever. That's more what I'm thinking of.
I think just having a set of valid outputs and testing for best fit based on deviation is probably best.
Thanks everyone :) -
@junon
uploads / seconds of period to look at is the upload frequency.
You can test, whether that evaluates to more than once a second, minute, hour, day, week, bi-week, month, quarter, half-year, year, decade, century, eon...
But you probably want to display nothing when the period doesn't contain any downloads or the user's first download is too recent.
Related Rants
I have a series of timestamps (second granularity). I need to derive a "frequency" from them and produce a string like "every X minutes/hours/days/weeks/etc", to where it fits closest.
Is there a well-known algorithm for this? I'm having trouble finding search terms.
question
frequency
time series