0
$\begingroup$

My math experiences I had at school are not very advanced and I'm struggling with a calculation right now...

I'm programming an image Search script for my company where you can find all pictures we bought off several shops, like Shuttersdock, Istockphoto, Fotolia and so on, and I'd like to base it on a ranked search function...

I'd need a formula to rank each image based on 3 numbers...

I got the hit rate (hits/search tags), the usage (how often it's used) and the days since it was used the last time...

Now I'd need to calculate the level. :/

I tried several things but ended up in chaos ^^

The higher the level the better the pic...

So we have the hit ratio and the days of the last usage increasing the level and the usage decreasing

My last try was with a usage ranking (lastUsage*(usage/100)) I don't know how I ended up there :/ and then (hitrate*usageRanking)

I hope I could explain my problem understandably...

I'm kinda stuck here and I don't know how to try it at all.

I hope you guys can help me. :)

Regards

  • 0
    haha thats exactly the answer i was looking for... Im building a prototype and Im not in the position to decide that... otherwise I wouldnt ask here for help ;)2012-03-01

1 Answers 1

1

Okay so I tried around the last week and thought I got it, but then i played around with random numbers to see how it reacts and it was frustrating... -.-'

Its not working as I expect it to...

here's my calculation so far

searchtags = 5 // sum of entered keywords
hits = 3 // number of hits for this picture
hitquote = hits/searchtags
used = 21 //times
average = 33 // average usage of a picture
lastusage = 19 // last used X days ago

usageRanking = (lastusage*(usage/average))
level = hitquote*usageranking

i dont know how to set this correctly :/

I need the used to decrease the level the higher it goes and the lastusage to increase the level the higher it goes...

to put it dynamic i added the average and i have the possibility to read the average of the lastusage out of the database if its needed...

any Idea how to do it ?

thx