为什么使用蒙特卡罗方法?
什么时候应该使用蒙特卡罗方法?
例如,为什么 Joel 决定使用蒙特卡罗方法基于证据的调度< /a> 而不是有条不紊地处理过去一年的所有用户数据?
When should the Monte-Carlo method be used?
For example, why did Joel decide to use the Monte-Carlo method for Evidence Based Scheduling instead of methodically processing all user data for the past year?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
蒙特卡洛方法通常用于当问题的维数对于传统方法来说太高时方案。 Persi Diaconis 的 马尔可夫链蒙特卡罗革命。
Monte Carlo methods are commonly used when the dimensionality of the problem is too high for traditional schemes. A great introductory paper on the subject is Persi Diaconis' The Markov Chain Monte Carlo Revolution.
假设您想要估计一些利息数量。在乔尔的示例中,“发货日期”是您想要估计的日期。在大多数此类情况下,都会有一些随机因素影响我们的估计。
当您有一个随机量时,您通常想知道其平均值和标准差,以便您可以采取适当的操作。在简单的情况下,您可以将数量建模为标准分布(例如,正态分布),其中存在平均值和标准差的分析公式。然而,存在许多不存在解析公式的情况。在这种情况下,我们不采用平均值和标准差的解析解,而是采用模拟。其想法是:
步骤 1:使用适当的分布生成影响感兴趣数量的因素
步骤 2:计算感兴趣数量
多次重复步骤 1 和 2,并计算您想知道的经验平均值和标准差。
以上是迄今为止蒙特卡罗应用的典型应用。请参阅 Jarrod 提供的维基百科链接,了解几个此类应用程序以及一些不存在固有随机性(例如,估计 pi)的有趣应用程序的示例。
Suppose that you want to estimate some quantity of interest. In the Joel's example 'ship date' is what you want to estimate. In most such situations, there are random factors that impact our estimates.
When you have a random quantity, you typically wants to know its mean and the standard deviation so that you can take appropriate actions. In simple situations, you can model the quantity as a standard distribution (e.g., normal distribution) for which analytical formulas exist for the mean and the standard deviation. However, there exist many situations where analytical formulas do not exist. In such situations, instead of an analytic solution for the mean and the standard deviation, we resort to simulation. The idea is:
Step 1: Generate factors that impact the quantity of interest using appropriate distributions
Step 2: Compute quantity of interest
Repeat steps 1 and 2 many times and compute the empirical average and standard deviation for what you want to know.
The above is by far the typical application of monte carlo application. See the wikipedia link provided by Jarrod for several such applications and some examples of interesting applications where there is no inherent randomness (e.g., estimation of pi).
维基百科有一篇关于蒙特卡洛模拟方法的好文章。我曾在一些场合使用过蒙特卡罗 - 简而言之,当尝试使用几乎随机的样本集来预测结果时,MC 方法往往会给出准确的答案,并且有人通常会使用直觉来尝试猜测趋势。不幸的是,试图解释 MC 方法非常困难,所以请查看这篇文章。
Wikipedia has a good article on monte carlo simulation methods. I've used monte carlo on a few occasions - in a nutshell MC methods tend to give accurate-ish answers when trying to project results using sample sets that are pretty much random and somebody would typically use intuition to try and guess at a trend. Unfortunately trying to explain MC methods is pretty tough so check out the article.
有时检查所有选项简直令人望而却步。
Sometimes checking all the options is simply prohibitive.
由于在安排编程任务时估计值通常分布相当广泛,因此对它们进行统计处理更有意义。
如果我们的项目需要 100 个任务,则估计的错误将趋于平衡,并且最终会得到一个分布,该分布将项目完成的可能性显示为一个范围。
它还避免了一些严重的问题,例如任务缓冲和学生综合症,这些问题进一步扭曲了结果。
Because the estimates are usually pretty widely distributed when scheduling programming tasks it makes more sense to treat them statistically.
If we take a project which takes 100's of tasks the errors on the estimates will even out and you end up with a distribution which shows the likelihood of project completion as a range.
It also circumvents some serious issues like task buffering and student syndrome skewing the results even further.