this post was submitted on 16 Jun 2023
10 points (77.8% liked)

General Programming Discussion

8050 readers
1 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 5 years ago
MODERATORS
 

There is a request for a comment on this issue Controversial posts and comments #2515. Do you have any ideas on how best to implement this?

I'd like to see some more people chime in with opinions, but maybe that'll come with a PR. At the very least, it's something that can be moved forward with.

— dcormier

you are viewing a single comment's thread
view the rest of the comments
[–] Kethal 2 points 2 years ago (1 children)

Something is controversial if there is a variety of opinions. You can use the variance to quantity that. In this case, it's just upvotes and downvotes so maybe there's a simpler way to calculate variance for that case.

[–] PixxlMan 1 points 2 years ago (1 children)

Controversiality = upvotes / total votes?

[–] Kethal 2 points 2 years ago* (last edited 2 years ago)

The maximum value of this is 1 and the smallest value is 0. As written, if every person upvoted a post, it would be 1, but not controversial, so that wouldn't work. Say you slightly modified it and used downvotes / total votes, at first glance it seems sensible because then if everyone upvoted, you get 0, indicating that it's not at all controversial, a sensible result. But if everyone downvotes it, you get 1, indicating maximum controversy, but there was no controversy. Everyone agreed it was bad.

With variance, if something is unanimously liked or disliked the variance is 0. If it's split 50/50, the variance is greatest. You want something to adjust for the sample size, so you could use variance * total votes. It is similar, if not identical, to a binomial distribution.