Possible to sort views results for voted items through VotingAPI with my own custom calculations?

I'm interested in how VotingAPI currently allows you to sort nodes. The documentation reads "You can use the default calculations (like average, total, etc) or implement your own custom tallying functions."

What I would like to do is use vote_up_down module and use the method described here to come up with the ranking: http://www.evanmiller.org/how-not-to-sort-by-average-rating.html

What I don't want to do is sort nodes based on a solution such as: Score = (Positive ratings) - (Negative ratings).

In the method I have described Score = Lower bound of Wilson score confidence interval for a Bernoulli parameter.

I have developed the PHP to sort items based on the method described in this article which I am willing to share if someone will point me in the right direction.

Comments

Smag’s picture

Hey, this would be a great addition to Drupal and the Voting API.

d3str0y’s picture

Status: Active » Closed (fixed)

After much looking around I discovered this post:
http://drupal.org/node/410842

The information for creating your own custom aggregate function is also provided in the votingapi/API.txt file

I also started looking for other contributed modules using _votingapi_results_alter to provide their own aggregate functions as an example and discovered this:
http://drupal.org/project/imdb_voting

I've made my own module using these techniques and I hope to get it into contrib soon.

d3str0y’s picture

Please check out sandbox at: http://drupal.org/sandbox/d3str0y/1132172 feedback would be appreciated.