Algorithm to calculate a page importance based on its views / comments

前端 未结 6 572
别跟我提以往
别跟我提以往 2021-01-31 12:02

I need an algorithm that allows me to determine an appropriate field for my website\'s sitemap based on the page\'s views and comments count.

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-31 12:51

    Priority = W1 * views / maxViewsOfAllArticles + W2 * comments / maxCommentsOfAllArticles with W1+W2=1

    Although IMHO, just use 0.5*log_10(10+views)/log_10(10+maxViews) + 0.5*log_10(10+comments)/log_10(10+maxComments)

提交回复
热议问题