均匀性测试的快速算法
我每天有零到多个预订,并且我需要一些措施来衡量这些预订在我的时间段内分布的均匀程度。预订可以是半天或全天预订。
在这种情况下我考虑的时间段是一个月。
我的数据有很多差距:一个月内我可能只有最多 25-50% 的预订天数。
我需要一个算法,它会给我一个数字(任意单位,我不在乎:我只是比较许多排列并选择最统一的),它代表预订的统一性。
最重要的是,我需要它非常快,因为我将运行它数百次。
我研究过 Anderson-Darling 检验、Cramer-con-Mises 和 Kolmogorov-Smirnov 检验,但这些检验都检查数据是否符合任何分布。我确信有一种更快的算法来确定数据是否完全一致。
我正在用 C# 编码
I have zero to many bookings per day, and I need some measure of how uniformly these bookings are distributed throughout my time period. Bookings can be half day or full day bookings.
The time period I am considering in this case is one month.
My data has lots of gaps: in a month I may only have up to 25-50% of days booked.
I need an algorithm which will give me a number (arbitrary units, I don't care: I will just be comparing many permutations and picking the most uniform) which represents the uniformity of the bookings.
Most importantly, I need it to be quite fast as I will be running it many hundreds of times.
I have looked at Anderson-Darling tests, Cramer-con-Mises, and Kolmogorov-Smirnov tests, but these all check whether data fits any distribution. I'm sure there is a faster algorithm to determine if data is purely uniform.
I'm coding in C#
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我希望我没有过分简化你的问题,但我相信你真正想知道的是方差你的差距。有一组用于计算方差的算法集,每个算法都有自己的属性,并且都非常漂亮快速地。
I hope I am not grossly oversimplifying your question but I believe all you really want to know is the variance of your gaps. There are a set of algorithms for calculating variance, each with their own properties and all of which are pretty fast.