ningshuxia
2025-04-03 3d5771f9c195698c7694fb22afea2e2040553389
01-api/_Expand/IStation.Win.Schedule/bjMain.cs
@@ -1,7 +1,6 @@
using IStation.Curve;
using MathNet.Numerics.LinearAlgebra;
using MathNet.Numerics.LinearAlgebra.Double;
using System.Formats.Asn1;
using System.IO;
using System.Text;
using Yw.Untity;
@@ -160,6 +159,7 @@
                                var pX = double.Parse(xStr);
                                var pY = double.Parse(yStr);
                                pY = Math.Abs(pY);
                                ptList.Add(new CurvePoint(pX, pY));
                            }
@@ -174,7 +174,7 @@
                    var y = ptList.Select(x => x.Y).ToArray();
                    // 多项式回归的阶数(例如,二次多项式)
                    int degree = 8;
                    int degree = 10;
                    // 拟合多项式回归模型
                    double[] coefficients = NonlinearRegressionHelper.FitPolynomial(x, y, degree);
@@ -183,7 +183,7 @@
                    double xNew = target_pressure2;
                    double yPredicted = NonlinearRegressionHelper.PredictPolynomial(xNew, coefficients);
                    target_flow2 -= yPredicted;
                    target_flow2 += yPredicted;
                    AlertTool.ShowInfo(this,"预测缺失",$"{yPredicted}");
                    // 计算 R² 和 MSE