假设A
可以采用以下值[0,1,...,100]
。 W
(或重量)可以[0.0,0.1,...,1.0]
。对A
和W
加权的好评分公式是什么,以便得分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
得分不好。
答案 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"