Page 1 of 1

User Rating system

Posted: Sat Jul 31, 2004 10:56 am
by turbo2ltr
This is kinda theory but not specific to php so I figured I'd post it here.

I'm looking to make a User rating system. I'm not very good when it comes to these math problems so I figured I'd post what I came up with here for you guys to pick apart.

The site is an 'epinions' type site. Users can post just a product rating with an optional short comment or a full blown epinions style rating/review.

I want people to get a rating credit for posting, then allow other users to rate their submission. It should come up with a number 0-10.

The only thing I could come up with is this..

Code: Select all

UsersRatingVal = (RatingCnt + (ReviewCnt*2) + (helpful votes * .5) - (not helpful votes * .5);

UserRating = (10/MaxUserRatingVal)*UsersRatingVal;
I want to give 'credit' for just a rating, a little more credit for reviews. Then add or take away credit based on how the users rate the submission.

Then the only way to actually convert the numebr to a 0-10 rating that I could think of is to compare it to the user with the largest "UserRatingVal".

The problem I see is the weight of the votes. If the site ends up having a lot of users, a person's rating could drop to zero pretty quickly if people start voting not helpful. So the votes need to be weighted in relation to the number of users (?)

This is beyond me. Any help would be great.
Thanks,
Mike

Posted: Sat Jul 31, 2004 11:27 am
by turbo2ltr
Hmm what about this:

Code: Select all

UsersRatingVal = (RatingCnt + (ReviewCnt*2) * (((200/ totalvotes) * helpful votes) / 100)

UserRating = (10/MaxUserRatingVal)*UsersRatingVal;
I realized you dont want to relate it to the number of users, but the number of votes. So now it comes up with a percentage of "good votes" that can be applied to the base rating/review count.

edit: changed the (100/totalvotes) to (200/totalvotes) so a credit is given if the votes are helpful and a 'debit' if the majority of the votes are not helpful.