|
|
|
@ -68,12 +68,14 @@ public class BatchScoreCalculator { |
|
|
|
//反正切函数 [-pi/2,pi/2]
|
|
|
|
BigDecimal maxValue = idx.getScoreCalculator().getMaxValue(); |
|
|
|
BigDecimal minValue = idx.getScoreCalculator().getMinValue(); |
|
|
|
BigDecimal minScoreValue = idx.getScoreCalculator().getMinScore(); |
|
|
|
if (maxValue.compareTo(minValue) == 0) { |
|
|
|
//*((max-min)/ (Math.PI/2))+min
|
|
|
|
//Math.atan(new Double(vo.getSampleValue().toString()))*
|
|
|
|
normalizeValue = new BigDecimal(Math.atan(new Double(getFinalSampleValue(vo.getSampleValue(), threshold).toString()))) |
|
|
|
.multiply( |
|
|
|
(maxValue.subtract(minValue).divide(new BigDecimal(Math.PI / 2), 10, RoundingMode.UNNECESSARY))).add(minValue).setScale(6, RoundingMode.HALF_UP); |
|
|
|
(maxValue.subtract(minValue).divide(new BigDecimal(Math.PI / 2), 10, RoundingMode.UNNECESSARY))) |
|
|
|
.add(minScoreValue).setScale(6, RoundingMode.HALF_UP); |
|
|
|
//
|
|
|
|
if (scoreCalculator.getCorrelation().getCode().equals(Correlation.NEGATIVE)) { |
|
|
|
normalizeValue = maxValue.subtract(normalizeValue); |
|
|
|
|