.net - 使用 Math.Net 进行统计

标签 .net .net-core math.net

如何使用 Math.NET 计算 99.5 百分位数?

98%是

MathNet.Numerics.Statistics.Statistics.Percentile(valuesInDecile, 100 - 2)

99%是

MathNet.Numerics.Statistics.Statistics.Percentile(valuesInDecile, 100 - 1)

对于非整数 p 值,它表示使用四分位数函数。应该如何使用它,因为它返回 NaN

MathNet.Numerics.Statistics.Statistics.Quantile(valuesInDecile, 100 - 0.5f)

我尝试运行此数据集的数据集:

0.0353737
0.0009659
0.0005655
0.0053452
0.0402773
0.0018171
0.0193516
0.0003455
0.0505242
0.0539421
0.0363619
0.0293928
0.0356062
0.0352433
0.0577016
0.0529182
0.0015018
0.0436227
0.0042247
0.0157081
0.0112555
0.0061088
0.0319852
0.020557
0.0106685
0.029806
0.0053733
0.0965764
0.0001344
0.0033052
0.0080388
0.0189088
0.024258
0.0254075
0.0852993
0.0055825
0.0712195
0.0682945
0.013282

最佳答案

尝试:

MathNet.Numerics.Statistics.Statistics.Quantile(valuesInDecile, 1d - 0.005d)

Instead of grouping into 4 or 100 boxes, quantiles generalize the concept to an infinite number of boxes and thus to arbitrary real numbers tau between 0.0 and 1.0, where 0.0 represents the minimum value, 0.5 the median and 1.0 the maximum value.
Quantiles | Descriptive Statistics

关于.net - 使用 Math.Net 进行统计,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69434839/

相关文章:

c# - AssemblyLoadContext 将无法卸载

c# - 简单注入(inject)器注入(inject) PageModel ASP.NET Core Razor 页面

asp.net-mvc - 在我们使用 JWT token 的情况下,Asp.net 核心中的 session 和应用程序变量(因此没有基于 cookie 的 session )

mathnet-numerics - 如何计算 MathNet.Symbolics 中的 sqrt

c# - C# 中三角函数的 Math.net 幂

c# - tabcontrol ownerdraw 更改 tabcontrol 的边框样式

c# - WPF 将基于几何图形的图像绑定(bind)到 MenuItem.Icon 属性

c# - Windows Azure 存储的默认顺序是什么?

rest - 如何将 IFormFile 作为 ViewModel 对象的一部分发送到 Web API

f# - 低通滤波器在 MathNet.Filter、F# 中不起作用