Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

threshold idea: one standard deviation above the mean #13

Open
BrianHicks opened this issue Jan 10, 2018 · 0 comments
Open

threshold idea: one standard deviation above the mean #13

BrianHicks opened this issue Jan 10, 2018 · 0 comments

Comments

@BrianHicks
Copy link

BrianHicks commented Jan 10, 2018

This is pretty close to the current logic, if you squint a little...

Basically, this bot wants to boost the very best toots. Put another way, those are the outliers measured in favs! It'd end up something like:

SELECT id
  FROM public_toots
 WHERE favourites_count > (
       SELECT stddev(favourites_count) + avg(favourites_count)
         FROM public_toots
        WHERE created_at > NOW - INTERVAL '30 days'
       )

2*stddev seems to be a more common outlier function, but it'd only find the really exceptional toots instead of just the uncommonly good toots.

As a bonus, it's likely that stddev is implemented efficiently in the database!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant