【问题标题】:Slope Standard Error c#斜率标准误差 c#
【发布时间】:2015-02-18 20:33:06
【问题描述】:

MathNet.Numerics 里面有没有计算回归斜率误差的函数?

        double[] xdata = new double[] { 10, 20, 30 };
        double[] ydata = new double[] { 15, 20, 25 };

        Tuple<double, double> p = MathNet.Numerics.Fit.Line(xdata, ydata);
        double a = p.Item1; // == 10; intercept
        double b = p.Item2; // == 0.5; slope

上面给出了斜率。如何得到斜率的误差?

谢谢

【问题讨论】:

    标签: c# mathnet-numerics


    【解决方案1】:

    GoodnessOfFit 类上有 RRSquared 方法

    来自网站的example of usage

    GoodnessOfFit.RSquared(xdata.Select(x => a+b*x), ydata); // == 1.0
    

    您的示例代码来自同一页面。

    【讨论】:

      猜你喜欢
      • 2014-02-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-11
      • 2016-04-14
      • 1970-01-01
      • 2022-01-23
      • 1970-01-01
      相关资源
      最近更新 更多