Commit c5bcd286 authored by 刘基明's avatar 刘基明

热度计算调参

parent 8820293a
......@@ -46,11 +46,13 @@ public class ThemeAnalysDO {
@ApiModelProperty(value = "距今时间")
private Long minuteTillNow;
public Double getScore() {
double w = (double) (viewCount + forwardCount + commentCount + likeCount + collectCount);
double i = 10;//初试权重
double w = (double) (viewCount*0.1 + forwardCount*3 + commentCount*2 + likeCount*1 + collectCount*3);
double i = 1;//初试权重
double t = Double.valueOf(minuteTillNow) / 60;
double g = 1.2;//时间系数
double g = 0.1;//时间系数
double rank = (w + i) / Math.pow(t + 2, g);
return rank;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment