评分公式

时间:2012-03-07 00:53:58

标签: math formula

假设A可以采用以下值[0,1,...,100]W(或重量)可以[0.0,0.1,...,1.0]。对AW加权的好评分公式是什么,以便得分S为:

"good" when A and W are high
decent/"doesn't matter" when A is high and W is low
decent/"doesn't matter" when A and W are low
"bad" when A is low and W is high

注意:通常情况下A为0且W为低。我想阻止X得分不好。

1 个答案:

答案 0 :(得分:0)

当A = 100且B = 1时将给出+1的方法为高,当A = 0且B = 1时为-1,当B = 0时为0,且这些值之间具有双线性混合:

a = 2*(A/100)-1
b = B

score = b * a

您需要重新调整/阈值输出才能获得所需内容。如果你真的想要文本值作为回报,那么你需要在最后添加这样的东西。

if(score<-0.5) return "bad"
if(score>0.5) return "good"
return "decent/doesn't matter"