From de52c2d645985a25cc550998881bdcb1b1a16209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=8D=A3=E5=AE=8F?= <2241220001@qq.com> Date: Sat, 31 Aug 2024 21:42:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E6=B3=A8=E4=BF=AE=E8=AF=A5=EF=BC=8C?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/rtReport/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/rtReport/index.vue b/src/components/rtReport/index.vue index 02997b2..4bdef3c 100644 --- a/src/components/rtReport/index.vue +++ b/src/components/rtReport/index.vue @@ -42,7 +42,7 @@ -
+
Math.pow(val - meanY, 2)).reduce((acc, val) => acc + val, 0); // 计算残差平方和(SSE) const residualSum = y.map((val, index) => Math.pow(val - yHat[index], 2)).reduce((acc, val) => acc + val, 0); - // 计算回归平方和(SST) + // 总离差平方和(SST) const residualSumOfSquares = totalSumOfSquares + residualSum; // 计算 R2 决定系数 const rSquared = 1 - (residualSum / residualSumOfSquares);