0

i have a music pages website, and users can download, play, and view those pages, and I want to make a ranking page for this.

this ranking depend on those music's download, play, and view times. 3 attributes added together and call a new name is HOT pt.

I want this ranking page rank all music page with a point which is limit in 100.

example: I have 3000 pages .and the top 3 pages there has HOT pt with 300,500,700. and i want these 3 pt run within 100.like this below:

Top 1 : test1 99.34 top 2 : test2 94.21 top 3 : test3 89.64

so, how can i get a algorithm like this?

4

1 に答える 1

0

これらのポイントを取得するためにすでにランキングシステムを作成している場合は、0〜100に正規化するだけで済みます。

例えば:

page id   points      
1         500
2         300
3         700
4         200

次に、最大ポイント(この場合は700)のページが必要です。すべてのポイントをそれで割り、100を掛けます。

page id   points            points[0-100]   
1         500 / 700 * 100    71.43
2         300 / 700 * 100    42.86
3         700 / 700 * 100   100.00
4         200 / 700 * 100    28.57
于 2012-11-01T20:57:07.787 に答える