Author Topic: [REQ] Top Image (An average between all ratings)  (Read 3863 times)

0 Members and 1 Guest are viewing this topic.

Offline Albert

  • Newbie
  • *
  • Posts: 45
    • View Profile
[REQ] Top Image (An average between all ratings)
« on: July 02, 2005, 10:27:33 PM »
The idea for this mod is simple.  It's just the average for all other ratings(hits, downloads, ratings, etc...).  This average will bring up the best image of all.

Cheers,

Albert Abrantes

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [REQ] Top Image (An average between all ratings)
« Reply #1 on: July 03, 2005, 03:52:01 AM »
how do u calculate it?

P.S. this was requested several times already, but no real "theory" on how it should work was provided.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Albert

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: [REQ] Top Image (An average between all ratings)
« Reply #2 on: July 04, 2005, 12:59:59 AM »
Image rating should be maximum of 100%.

Let's give Hits, Donwloads and Rating a part of that 100%

      Hits =                 50%
      Downloads =       10%
      Rating =        +    40%
      -----------------------------------------
      Image average =  100%
     
Ok...  Now let's get the value for Hits.

# of Hits of image with most Hits on the site = X
# of Hits from current image being rated       = Y

     X/100 * Y = Z

So "Z" is Value for Hits. But it's only 50% of total so...

     Z/100 * 50 = Hits

Now for downloads we do the same thing.

# of downloads of image with the most downlodas = A
# of downloads from current image being rated      = B

     A/100 * B = C

So "C" is Value for downloads. But it's only 10% of total so...

     Z/100 * 10 = Downloads

Now rating is already a percentage so let's just take that value... But it's only 40% of total value so...

      Actual Value of rating/100 * 40 = Rating

So now adding all values from Hits, Downloads and Rating I think we should get a pretty good average.

The only problem we have now is just the Rating value.  We should only add Rating for images with more than X votes...

Example,

If votes is higher than 10 then we use the formula above.
If votes is less than 10 then we just don't include rating.

Hits =               85%
Downloads =     15%
-----------------------------
Image average= 100%

Well I think this is a very simple ideia, just hope it's good enough to understand... Just simple math..

Cheers,

Albert Abrantes