|
|
@ -59,13 +59,6 @@ public class BatchScoreCalculator { |
|
|
|
String sampleId = vo.getSampleId(); |
|
|
|
//归一后的值
|
|
|
|
BigDecimal normalizeValue;// = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold));
|
|
|
|
//如果不需要归一 则 直接value*权重
|
|
|
|
if (idx.isScore()) { |
|
|
|
normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); |
|
|
|
} else { |
|
|
|
normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); |
|
|
|
} |
|
|
|
//反正切函数 [-pi/2,pi/2]
|
|
|
|
BigDecimal maxValue = idx.getScoreCalculator().getMaxValue(); |
|
|
|
BigDecimal minValue = idx.getScoreCalculator().getMinValue(); |
|
|
|
BigDecimal minScoreValue = idx.getScoreCalculator().getMinScore(); |
|
|
@ -81,8 +74,14 @@ public class BatchScoreCalculator { |
|
|
|
normalizeValue = maxValue.subtract(normalizeValue); |
|
|
|
} |
|
|
|
|
|
|
|
}else { |
|
|
|
//如果不需要归一 则 直接value*权重
|
|
|
|
if (idx.isScore()) { |
|
|
|
normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); |
|
|
|
} else { |
|
|
|
normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
BigDecimal score = normalizeValue.multiply(weight).setScale(6, RoundingMode.HALF_UP); |
|
|
|
CalculateResult result = scoreCountOfSamples.get(sampleId); |
|
|
|
|
|
|
|