VotingAPI points system

Events happening in the community are now at Drupal community events on www.drupal.org.
Scott Reynolds's picture

Alright,

There is a feature request in the queue for this. http://drupal.org/node/85360

Here is a quote on my plan:

Sorry awefully cryptic, but essentially, User1 liked Node A. The average difference between Node A and Node D is .14. Average Difference between Node A and Node B is .25. Therefore, if User1 hasnt voted on Node D, he is more likely to like Node D then Node B. Thats the plan, and its not quiete the same algorithm as with percentage, though very close.

The difference between perctange and points is that a user doesn't have really have an 'average vote' that could be used to personalize the recommendations. It has instead a bipolar system (like or dislike). So in a sense, it is actually considerably less computationally intense.

Now, I havent commited anything to code yet. I have to set up a development system with up/down and the like. But this is my idea. But I am very open to other opinions.

I plan on making percentage and points a seprate query type (i.e. part of the same radio functions that determine fast/accurate query).

Again, i would like to implement this for e-commerce as well so that whenever someone buys a product it gets a VotingAPI +1 point.

Comments

Well here is the query that

Scott Reynolds's picture

Well here is the query that gets built for point system (after node_recommendation is done doing its join to the node table).

SELECT d.content_id1 as 'content_id',d.sum/d.count as 'score',n.title FROM cre_similarity_matrix d,votingapi_vote r,node n WHERE d.content_type1 = 'node' AND r.uid = 1 AND r.value = 1 AND d.content_id2 = r.content_id AND d.content_id1 <> d.content_id2 AND n.nid=d.content_id1 AND n.uid <> 1 GROUP BY d.content_id1 ORDER BY score DESC

It assumes that only one vote can be placed by a user and that vote will be 1. (i.e. you cant make people have more or less weight. Say a person gets a full point vote only after they have place 10 votes on the site. This will not work with cre). Each vote must have equal wieght and must be 1 or -1 no other values.

SoC 2006: Content Recommedation Engine

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week