Accord.NetStatistics.Tools。四分位数法()

Accord.Net Statistics.Tools. Quartiles Method()

我目前正在寻找一种使用 Tools. Quartiles Method (Double[,] ,DoubleRange[]) 来计算 column vector(即 N x 1 matrix)的 5th percentile 的方法,并希望在这方面获得一些帮助。

到目前为止,我的问题来自方法中 Type DoubleRange[] 的参数,因为我不知道如何 input 它正确。作为使用的代码片段的说明,请在下面找到:

 double[,] PMat = Matrix.ToMatrix(dat); // dat being of Type DataTable...methods works

鉴于 Tools 名称介于 Accord.Math.ToolsAccord.Statistics.Tools

之间

我定义了:

double[] Percentile = Accord.Statistics.Tools.Quartiles(PMat, xxxx) 
                    // all attempts using xxxx has mechanically lead to:

Error: The best overloaded method match for Accord.Statistics.Tools.Quartiles(double[*,*], out AForge.DoubleRange[]) has some invalid arguments

编辑:我的想法包括计算一个0.2 Quartile,作为一种解决方法......所以我想到了Accord.Statistics.Tools.Quartiles(PMat, 0.2)

最佳,

我只需要获得百分位数,我确定的是:

Accord.Statistics.Distributions.Univariate.EmpiricalDistribution

如果您的值在 double[] 中,那么:

EmpiricalDistribution distribution = new EmpiricalDistribution(values);
distribution.InverseDistributionFunction(0.05);

给你第 5 个百分位数。

注意:经验分布是非参数的。百分位数只是数据排序后适当位置的数据值。从附图(用上述方法生成)中可以看出没有插值或拟合:

InverseDistributionFunction against percentile