When going to /recommendations I now get also nodes recommended on which I have already voted. This does not seem to make much sense.

It would be very nice if there was an option for a filter to remove the nodes a user has already voted on for that user's personalized recommendations.

CommentFileSizeAuthor
#11 node_recommendation.module17.38 KBScott Reynolds

Comments

Scott Reynolds’s picture

Assigned: Unassigned » Scott Reynolds
Status: Active » Closed (works as designed)

This is by design. And it happens when you have placed votes on all nodes. I figured it was better then displaying a blank page

Scott Reynolds’s picture

Sorry should have provided more information

It will NEVER recommend a node that you have already rated UNLESS you have rated ALL of them.

lennart’s picture

Status: Closed (works as designed) » Active

The way you say it works is also the way I think it ought to work. So we agree in theory ;)

The thing is that, in my case at least, it does *not* work the way that we intend it to.

On my site there are many nodes. I have voted on about half of them.

I have set the node recommendation to come up with four recommendations.

But alas, all the recommendations are nodes upon which I have already cast my node, despite the fact that there are many node on which I have not voted that could be displayed instead?

Scott Reynolds’s picture

ok ok,

Are there other users who have voted?

lennart’s picture

In fact, I have now played around with various test users and votes and nodes, and I have not yet been able to get any recommendation on which I have not already voted, in spite of there being dozens of nodes that I have not voted on at all.

I am using the vote_up_down module for voting ( together with the VotingAPI for managing the votes needless to say )

Scott Reynolds’s picture

Category: feature » bug

Sry should be more clear.

How many users? How many users have placed votes and how many nodes?

See I designed it that it depends solely on VotingAPI. CRE + node_recommendation know almost nothing about the nodes created etc. This allows for only certain nodes (or any content) to get voted on.

In reality your feature is implemented. This is a potential bug

Scott Reynolds’s picture

Title: voted filter on node recommendation » Points Feature Request
Category: bug » feature

O! the infamous vote up/down.

I still need to test it to make sure it works with cre. The problem is that it uses a different data type for votes (points, +1 or -1 for each vote). And this is orginally designed (with plans for point system) to work with percentages (50% etc). I working on making it work and did the intial planning this afternoon.

But here is why it DOESNT work for you right now.

cre engine gets the content and then it sees if you voted on that content already by looking to see if you placed a vote in the vote table that has the type equal to 'percent' NOT 'points'. So obviously, it comes back and says, 'hey, you didnt vote on this node because there is no percentage vote in your name'.

So tomorrow I might have a working version for you that checks approtiatly. Im still planning and sorting a couple things out.

lennart’s picture

OK. Thanks a lot for looking into this.

Right now on my site there are five users around 40 nodes and each user having voted around 15 times so there should be enough overlap to make some predictions.

I was thinking, what does the fact that vote up down only allows for two states (+1 and -1) do to accuracy compared to for example a system that allows for six states ( 0,1,2,3,4,5 stars ) ?

I suppose to achieve the same kind of accuracy the first two state system would need votes by many more users, more overlap and more content to achieve the same kind of predictive accuracy that the six state system could achieve with much fewer users, overlap and nodes ?

Scott Reynolds’s picture

I think you are barking up the wrong tree and making things more complex.

In this case I believe that with the pts system i am able to derive the average pt difference between each piece of content. Therefore, those with the least average difference will be recommended.

Now we use the smallest average difference combined with a list of content that the user has liked and derive the recommendations.

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.

Scott Reynolds’s picture

Ok use the latest cvs version. Changes made to cre.module and cre_query_obj.inc. But as always I sugguest you just replace all old code with the latest download.

Please let me know if makes sensible recommendations. Similar is a lil shaky, not sure I like its behavior in points system.

once you download the latest, go to administer >> settings >> cre.

Also please remember that when testing cre, it will NEVER recommend a node to you that you authored. If you authored all nodes and went to /recommendations, you will get the top rated nodes.

And a little trick for ya. /recommendations/45 will be the recommendations for user 45 (if that user exists of course).

Scott Reynolds’s picture

StatusFileSize
new17.38 KB

I lied... Used attached node_recommendation.module as well.

You will have to reset a system variable 'cre_starting_position' to the next votingapi_vote id from the sequences table. here is how i do it in code:

$voting_result = db_query("SELECT id FROM {sequences} WHERE name='votingapi_vote'");
   $vote_obj = db_fetch_object($voting_result);
   variable_set('cre_starting_position', $vote_obj->id + 1);

This will make the cre.module install the previous votes on the cron run

Tomorrow i can come up with a cleaner solution for you. You could also just nuke the Votingapi tables :-D

lennart’s picture

Thanks a lot for all your effort on this Scott! I will be testing this during the next couple of days and report back in a day or two :D

Scott Reynolds’s picture

Ok well I should have thought of this previously.

You need to 'uninstall' and then 'reinstall' cre. This can be done via the devel module: http://www.drupal.org/project/devel. Dont mess with the sequences table, this will take care of that mess

lennart’s picture

Great. Tomorrow I will give this a thorough test and report back!

lennart’s picture

Great! As far as I can tell it works perfectly. I have tested for about an hour with different users and content and the module comes up with only unvoted content that is clearly personalized when going to /recommendations for the particular user.

Once again, great work!

Scott Reynolds’s picture

Status: Active » Closed (fixed)
Scott Reynolds’s picture

Have other people placed votes? Are you the author of all the nodes? Have you gone to cre settings and changed it to points system query?

Scott Reynolds’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)
michelle’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Setting this back to closed as it was re-opened in response to a clever spam comment that I have now deleted.

Michelle

verciseaga’s picture

Озвучены реальные соображения, редкие темы