User Rating system

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
turbo2ltr
Forum Commoner
Posts: 29
Joined: Sun Jul 18, 2004 4:08 pm

User Rating system

Post 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
turbo2ltr
Forum Commoner
Posts: 29
Joined: Sun Jul 18, 2004 4:08 pm

Post 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.
Post Reply