Browse Source

残差分析 残差指标精度丢失

gmy 3 weeks ago
parent
commit
64139f5aba
1 changed files with 2 additions and 1 deletions
  1. 2 1
      services/residual_analysis_service/residual_analysis_service.go

+ 2 - 1
services/residual_analysis_service/residual_analysis_service.go

@@ -198,7 +198,8 @@ func fillResidualChartInfo(req residual_analysis_model.ResidualAnalysisReq, edbI
 			totalQuadraticSum += math.Pow(indexData.Value-averageValueA, 2)
 
 			// 补全残差值
-			indexData.Value = indexData.Value - valueB
+
+			indexData.Value = math.Round((indexData.Value-valueB)*10000) / 10000
 
 			// 残差平方和
 			residualQuadraticSum += math.Pow(indexData.Value, 2)