Accord.Net 统计工具.四分位数方法()
本文关键字:四分 方法 Net 统计 工具 Accord | 更新日期: 2023-09-27 17:56:23
我目前正在寻找一种使用 Tools. Quartiles Method (Double[,] ,DoubleRange[])
计算column vector
(即N x 1
matrix
)5th percentile
的方法,并希望在这方面得到一些帮助。
到目前为止,我的问题来自方法中类型 DoubleRange[]
的参数,因为我不知道如何正确输入它。作为所用代码段的说明,请在下面找到:
double[,] PMat = Matrix.ToMatrix(dat); // dat being of Type DataTable...methods works
鉴于Accord.Math.Tools
和Accord.Statistics.Tools
之间含糊不清的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 个百分位数。
注意:经验分布是非参数的。 百分位数只是数据排序后适当位置的数据值。 在附图(使用上述方法生成)中看不到插值或拟合:
逆分布函数与百分位数