更改

跳到导航 跳到搜索
删除7,017字节 、 2021年7月31日 (六) 23:02
第152行: 第152行:  
</ref> and the ones by Pierre Del Moral<ref name="dm9622">{{cite journal|last1 = Del Moral|first1 = Pierre|title = Non Linear Filtering: Interacting Particle Solution.|journal = Markov Processes and Related Fields|date = 1996|volume = 2|issue = 4|pages = 555–580|url = http://web.maths.unsw.edu.au/~peterdel-moral/mprfs.pdf}}</ref> and Himilcon Carvalho, Pierre Del Moral, André Monin and Gérard Salut<ref name=":14">Carvalho, Himilcon; Del Moral, Pierre; Monin, André; Salut, Gérard (July 1997). "Optimal Non-linear Filtering in GPS/INS Integration" (PDF). ''IEEE Transactions on Aerospace and Electronic Systems''. '''33''' (3): 835. Bibcode:1997ITAES..33..835C. doi:10.1109/7.599254. S2CID 27966240.</ref> on particle filters published in the mid-1990s. Particle filters were also developed in signal processing in 1989–1992 by P. Del Moral, J. C. Noyer, G. Rigal, and G. Salut in the LAAS-CNRS in a series of restricted and classified research reports with STCAN (Service Technique des Constructions et Armes Navales), the IT company DIGILOG, and the [https://www.laas.fr/public/en LAAS-CNRS] (the Laboratory for Analysis and Architecture of Systems) on radar/sonar and GPS signal processing problems.<ref name=":15">P. Del Moral, G. Rigal, and G. Salut. "Estimation and nonlinear optimal control: An unified framework for particle solutions". LAAS-CNRS, Toulouse, Research Report no. 91137, DRET-DIGILOG- LAAS/CNRS contract, April (1991).</ref><ref name=":16">P. Del Moral, G. Rigal, and G. Salut. "Nonlinear and non Gaussian particle filters applied to inertial platform repositioning." LAAS-CNRS, Toulouse, Research Report no. 92207, STCAN/DIGILOG-LAAS/CNRS Convention STCAN no. A.91.77.013, (94p.) September (1991).</ref><ref name=":17">P. Del Moral, G. Rigal, and G. Salut. "Estimation and nonlinear optimal control: Particle resolution in filtering and estimation: Experimental results". Convention DRET no. 89.34.553.00.470.75.01, Research report no.2 (54p.), January (1992).</ref><ref name=":18">P. Del Moral, G. Rigal, and G. Salut. "Estimation and nonlinear optimal control: Particle resolution in filtering and estimation: Theoretical results". Convention DRET no. 89.34.553.00.470.75.01, Research report no.3 (123p.), October (1992).</ref><ref name=":19">P. Del Moral, J.-Ch. Noyer, G. Rigal, and G. Salut. "Particle filters in radar signal processing: detection, estimation and air targets recognition". LAAS-CNRS, Toulouse, Research report no. 92495, December (1992).</ref><ref name=":20">P. Del Moral, G. Rigal, and G. Salut. "Estimation and nonlinear optimal control: Particle resolution in filtering and estimation". Studies on: Filtering, optimal control, and maximum likelihood estimation. Convention DRET no. 89.34.553.00.470.75.01. Research report no.4 (210p.), January (1993).</ref> These Sequential Monte Carlo methodologies can be interpreted as an acceptance-rejection sampler equipped with an interacting recycling mechanism.
 
</ref> and the ones by Pierre Del Moral<ref name="dm9622">{{cite journal|last1 = Del Moral|first1 = Pierre|title = Non Linear Filtering: Interacting Particle Solution.|journal = Markov Processes and Related Fields|date = 1996|volume = 2|issue = 4|pages = 555–580|url = http://web.maths.unsw.edu.au/~peterdel-moral/mprfs.pdf}}</ref> and Himilcon Carvalho, Pierre Del Moral, André Monin and Gérard Salut<ref name=":14">Carvalho, Himilcon; Del Moral, Pierre; Monin, André; Salut, Gérard (July 1997). "Optimal Non-linear Filtering in GPS/INS Integration" (PDF). ''IEEE Transactions on Aerospace and Electronic Systems''. '''33''' (3): 835. Bibcode:1997ITAES..33..835C. doi:10.1109/7.599254. S2CID 27966240.</ref> on particle filters published in the mid-1990s. Particle filters were also developed in signal processing in 1989–1992 by P. Del Moral, J. C. Noyer, G. Rigal, and G. Salut in the LAAS-CNRS in a series of restricted and classified research reports with STCAN (Service Technique des Constructions et Armes Navales), the IT company DIGILOG, and the [https://www.laas.fr/public/en LAAS-CNRS] (the Laboratory for Analysis and Architecture of Systems) on radar/sonar and GPS signal processing problems.<ref name=":15">P. Del Moral, G. Rigal, and G. Salut. "Estimation and nonlinear optimal control: An unified framework for particle solutions". LAAS-CNRS, Toulouse, Research Report no. 91137, DRET-DIGILOG- LAAS/CNRS contract, April (1991).</ref><ref name=":16">P. Del Moral, G. Rigal, and G. Salut. "Nonlinear and non Gaussian particle filters applied to inertial platform repositioning." LAAS-CNRS, Toulouse, Research Report no. 92207, STCAN/DIGILOG-LAAS/CNRS Convention STCAN no. A.91.77.013, (94p.) September (1991).</ref><ref name=":17">P. Del Moral, G. Rigal, and G. Salut. "Estimation and nonlinear optimal control: Particle resolution in filtering and estimation: Experimental results". Convention DRET no. 89.34.553.00.470.75.01, Research report no.2 (54p.), January (1992).</ref><ref name=":18">P. Del Moral, G. Rigal, and G. Salut. "Estimation and nonlinear optimal control: Particle resolution in filtering and estimation: Theoretical results". Convention DRET no. 89.34.553.00.470.75.01, Research report no.3 (123p.), October (1992).</ref><ref name=":19">P. Del Moral, J.-Ch. Noyer, G. Rigal, and G. Salut. "Particle filters in radar signal processing: detection, estimation and air targets recognition". LAAS-CNRS, Toulouse, Research report no. 92495, December (1992).</ref><ref name=":20">P. Del Moral, G. Rigal, and G. Salut. "Estimation and nonlinear optimal control: Particle resolution in filtering and estimation". Studies on: Filtering, optimal control, and maximum likelihood estimation. Convention DRET no. 89.34.553.00.470.75.01. Research report no.4 (210p.), January (1993).</ref> These Sequential Monte Carlo methodologies can be interpreted as an acceptance-rejection sampler equipped with an interacting recycling mechanism.
   −
在高级信号处理和'''贝叶斯推断 Bayesian Inference'''中使用'''序列蒙特卡罗方法 Sequential Monte Carlo'''是最近才出现的。1993年,高登等人在他们的开创性工作中发表了蒙特卡罗重采样算法在贝叶斯推论统计学中的首次应用。<ref name=":12" /> 作者将他们的算法命名为“自举过滤器” ,并证明了与其他过滤方法相比,他们的自举过滤算法不需要任何关于系统状态空间或噪声的假设。此外北川源四郎也进行了”蒙特卡洛过滤器”相关的开创性研究。<ref name=":13" /> 在1990年代中期,'''皮埃尔·德尔·莫勒尔 Pierre Del Moral <ref name="dm9622" />''' 和'''希米尔康 · 卡瓦略 Himilcon Carvalho'''以及皮埃尔 · 德尔 · 莫勒尔、'''安德烈 · 莫宁 André Monin'''和'''杰拉德 · 萨鲁特 Gérard Salut <ref name=":14" />''' 发表了关于粒子过滤器的文章。1989-1992年间,在LAAS-CNRS (系统分析和体系结构实验室),皮埃尔·德尔·莫勒尔、'''J·C·诺亚 J. C. Noyer'''、'''G·里加尔 G. Rigal''' 和'''杰拉德 · 萨鲁特'''开发了粒子滤波器用于信号处理。他们与STCAN (海军建造和武装服务技术部)、IT公司DIGILOG共同完成了一系列关于雷达/声纳和GPS信号处理问题的限制性和机密性研究报告。<ref name=":15" /><ref name=":16" /><ref name=":17" /><ref name=":18" /><ref name=":19" /><ref name=":20" /> 这些序列蒙特卡罗方法可以解释为一个接受拒绝采样器配备了相互作用的回收机制。
+
在高级信号处理和'''贝叶斯推断 Bayesian Inference'''中使用'''序列蒙特卡罗方法 Sequential Monte Carlo'''是最近才出现的。1993年,高登等人在他们的开创性工作中发表了蒙特卡罗重采样算法在贝叶斯推论统计学中的首次应用。<ref name=":12" /> 作者将他们的算法命名为“自举过滤器” ,并证明了与其他过滤方法相比,他们的自举过滤算法不需要任何关于系统状态空间或噪声的假设。此外北川源四郎也进行了”蒙特卡洛过滤器”相关的开创性研究。<ref name=":13" /> 在1990年代中期,'''皮埃尔·德尔·莫勒尔 Pierre Del Moral <ref name="dm9622" />''' 和'''希米尔康 · 卡瓦略 Himilcon Carvalho'''以及皮埃尔 · 德尔 · 莫勒尔、'''安德烈 · 莫宁 André Monin'''和'''杰拉德 · 萨鲁特 Gérard Salut <ref name=":14" />''' 发表了关于粒子过滤器的文章。1989-1992年间,在LAAS-CNRS (系统分析和体系结构实验室),皮埃尔·德尔·莫勒尔、'''J·C·诺亚 J. C. Noyer'''、'''G·里加尔 G. Rigal''' 和'''杰拉德 · 萨鲁特'''开发了粒子滤波器用于信号处理。他们与STCAN(海军建造和武装服务技术部)、IT公司DIGILOG共同完成了一系列关于雷达/声纳和GPS信号处理问题的限制性和机密性研究报告。<ref name=":15" /><ref name=":16" /><ref name=":17" /><ref name=":18" /><ref name=":19" /><ref name=":20" /> 这些序列蒙特卡罗方法可以解释为一个接受拒绝采样器配备了相互作用的回收机制。
    
From 1950 to 1996, all the publications on Sequential Monte Carlo methodologies, including the pruning and resample Monte Carlo methods introduced in computational physics and molecular chemistry, present natural and heuristic-like algorithms applied to different situations without a single proof of their consistency, nor a discussion on the bias of the estimates and on genealogical and ancestral tree based algorithms. The mathematical foundations and the first rigorous analysis of these particle algorithms were written by Pierre Del Moral in 1996.<ref name="dm9622"/><ref name=":22">{{cite journal|last1 = Del Moral|first1 = Pierre|title = Measure Valued Processes and Interacting Particle Systems. Application to Non Linear Filtering Problems|journal = Annals of Applied Probability|date = 1998|edition = Publications du Laboratoire de Statistique et Probabilités, 96-15 (1996)|volume = 8|issue = 2|pages = 438–495|url = http://projecteuclid.org/download/pdf_1/euclid.aoap/1028903535|doi = 10.1214/aoap/1028903535|citeseerx = 10.1.1.55.5257}}</ref>
 
From 1950 to 1996, all the publications on Sequential Monte Carlo methodologies, including the pruning and resample Monte Carlo methods introduced in computational physics and molecular chemistry, present natural and heuristic-like algorithms applied to different situations without a single proof of their consistency, nor a discussion on the bias of the estimates and on genealogical and ancestral tree based algorithms. The mathematical foundations and the first rigorous analysis of these particle algorithms were written by Pierre Del Moral in 1996.<ref name="dm9622"/><ref name=":22">{{cite journal|last1 = Del Moral|first1 = Pierre|title = Measure Valued Processes and Interacting Particle Systems. Application to Non Linear Filtering Problems|journal = Annals of Applied Probability|date = 1998|edition = Publications du Laboratoire de Statistique et Probabilités, 96-15 (1996)|volume = 8|issue = 2|pages = 438–495|url = http://projecteuclid.org/download/pdf_1/euclid.aoap/1028903535|doi = 10.1214/aoap/1028903535|citeseerx = 10.1.1.55.5257}}</ref>
第164行: 第164行:  
==Definitions 定义==
 
==Definitions 定义==
   −
There is no consensus on how ''Monte Carlo'' should be defined. For example, Ripley<ref name=Ripley>{{harvnb|Ripley|1987}}</ref> defines most probabilistic modeling as ''[[stochastic simulation]]'', with ''Monte Carlo'' being reserved for [[Monte Carlo integration]] and Monte Carlo statistical tests. [[Shlomo Sawilowsky|Sawilowsky]]<ref name=Sawilowsky>{{harvnb|Sawilowsky|2003}}</ref> distinguishes between a [[simulation]], a Monte Carlo method, and a Monte Carlo simulation: a simulation is a fictitious representation of reality, a Monte Carlo method is a technique that can be used to solve a mathematical or statistical problem, and a Monte Carlo simulation uses repeated sampling to obtain the statistical properties of some phenomenon (or behavior). Examples:
+
There is no consensus on how ''Monte Carlo'' should be defined. For example, Ripley<ref name="Ripley">Ripley, B. D. (1987). ''Stochastic Simulation''. Wiley & Sons.</ref> defines most probabilistic modeling as ''[[stochastic simulation]]'', with ''Monte Carlo'' being reserved for [[Monte Carlo integration]] and Monte Carlo statistical tests. [[Shlomo Sawilowsky|Sawilowsky]]<ref name="Sawilowsky">Sawilowsky, Shlomo S. (2003). "You think you've got trivials?". ''Journal of Modern Applied Statistical Methods''. '''2''' (1): 218–225. doi:10.22237/jmasm/1051748460.</ref> distinguishes between a [[simulation]], a Monte Carlo method, and a Monte Carlo simulation: a simulation is a fictitious representation of reality, a Monte Carlo method is a technique that can be used to solve a mathematical or statistical problem, and a Monte Carlo simulation uses repeated sampling to obtain the statistical properties of some phenomenon (or behavior). Examples:
   −
对于如何定义蒙特卡洛还没有达成共识。例如,Ripley将大多数概率建模定义为随机模拟,蒙特卡罗保留用于蒙特卡罗积分和蒙特卡罗统计检验。Sawilowsky[54]区分了模拟、蒙特卡罗方法和蒙特卡罗模拟:蒙特卡罗方法是一种可以用来解决数学或统计问题的技术,蒙特卡罗模拟使用重复抽样来获得某些现象(或行为)的统计特性。例如:
+
对于如何定义蒙特卡洛还没有达成共识。例如,'''里普利 Ripley <ref name="Ripley" />''' 将大多数概率建模定义为'''随机模拟  stochastic simulation''',蒙特卡罗则包含蒙特卡罗积分和蒙特卡罗统计检验。'''萨维罗斯基 Sawilowsky''' <ref name="Sawilowsky" /> 区分了模拟、蒙特卡罗方法和蒙特卡罗模拟:模拟是对现实的一种虚构的表现,蒙特卡罗方法是一种可以用来解决数学或统计问题的技术,蒙特卡罗模拟使用重复抽样来获得某些现象(或行为)的统计特性。例如:
    
*Simulation: Drawing ''one'' pseudo-random uniform variable from the interval [0,1] can be used to simulate the tossing of a coin: If the value is less than or equal to 0.50 designate the outcome as heads, but if the value is greater than 0.50 designate the outcome as tails. This is a simulation, but not a Monte Carlo simulation.
 
*Simulation: Drawing ''one'' pseudo-random uniform variable from the interval [0,1] can be used to simulate the tossing of a coin: If the value is less than or equal to 0.50 designate the outcome as heads, but if the value is greater than 0.50 designate the outcome as tails. This is a simulation, but not a Monte Carlo simulation.
*模拟:从区间[0,1]中绘制一个伪随机均匀变量可以用来模拟抛硬币:如果值小于或等于0.50,则结果为正面,但如果值大于0.50,则结果为反面。这是一个模拟,但不是蒙特卡洛模拟。
+
*模拟:从区间[0,1]中绘制一个伪随机均匀变量可以用来模拟抛硬币:如果值小于或等于0.50,则结果为正面,但如果值大于0.50,则结果为反面。这是一个模拟,但不是蒙特卡洛模拟。
 
*Monte Carlo method: Pouring out a box of coins on a table, and then computing the ratio of coins that land heads versus tails is a Monte Carlo method of determining the behavior of repeated coin tosses, but it is not a simulation.
 
*Monte Carlo method: Pouring out a box of coins on a table, and then computing the ratio of coins that land heads versus tails is a Monte Carlo method of determining the behavior of repeated coin tosses, but it is not a simulation.
*蒙特卡洛方法:将一盒硬币倒在桌子上,然后计算正面与反面落地的硬币比例是一种确定重复掷硬币行为的蒙特卡洛方法,但它不是模拟。
+
*蒙特卡洛方法:将一盒硬币倒在桌子上,然后计算正面与反面落地的硬币比例。这是一种确定重复掷硬币行为的蒙特卡洛方法,但它不是模拟。
 
*Monte Carlo simulation: Drawing <nowiki>''</nowiki>a large number<nowiki>''</nowiki> of pseudo-random uniform variables from the interval [0,1] at one time, or once at many different times, and assigning values less than or equal to 0.50 as heads and greater than 0.50 as tails, is a <nowiki>''</nowiki>Monte Carlo simulation<nowiki>''</nowiki> of the behavior of repeatedly tossing a coin.
 
*Monte Carlo simulation: Drawing <nowiki>''</nowiki>a large number<nowiki>''</nowiki> of pseudo-random uniform variables from the interval [0,1] at one time, or once at many different times, and assigning values less than or equal to 0.50 as heads and greater than 0.50 as tails, is a <nowiki>''</nowiki>Monte Carlo simulation<nowiki>''</nowiki> of the behavior of repeatedly tossing a coin.
*蒙特卡罗模拟法:绘制伪随机均匀的“大量”变量的区间[0,1],或曾在许多不同的时间,和赋值小于或等于0.50作为正面和大于0.50反面,是一个“蒙特卡罗模拟”的行为多次掷硬币。
+
*蒙特卡罗模拟法:一次或多次从区间[0,1]中绘制“大量”伪随机均匀变量,赋值小于或等于0.50作为正面,大于0.50为反面。这是一个多次掷硬币的“蒙特卡罗模拟”行为。
    
Kalos and Whitlock point out that such distinctions are not always easy to maintain. For example, the emission of radiation from atoms is a natural stochastic process. It can be simulated directly, or its average behavior can be described by stochastic equations that can themselves be solved using Monte Carlo methods. "Indeed, the same computer code can be viewed simultaneously as a 'natural simulation' or as a solution of the equations by natural sampling."
 
Kalos and Whitlock point out that such distinctions are not always easy to maintain. For example, the emission of radiation from atoms is a natural stochastic process. It can be simulated directly, or its average behavior can be described by stochastic equations that can themselves be solved using Monte Carlo methods. "Indeed, the same computer code can be viewed simultaneously as a 'natural simulation' or as a solution of the equations by natural sampling."
   −
卡洛斯和惠特洛克指出,这种区别并不总是容易维持。例如,来自原子的辐射是一种自然的随机过程。它可以直接模拟,也可以用随机方程描述其平均行为,这些随机方程本身可以用蒙特卡罗方法求解。“实际上,同样的计算机代码可以同时被看作是‘自然模拟’或者通过自然抽样解方程。”
+
'''卡洛斯 Kalos''''''惠特洛克 Whitlock'''<ref>Kalos, Malvin H.; Whitlock, Paula A. (2008). ''Monte Carlo Methods''. Wiley-VCH. ISBN <bdi>978-3-527-40760-6</bdi>.</ref>指出,这几种方法的区别并不总是容易分辨。例如,来自原子的辐射是一种自然的随机过程。它可以直接模拟,也可以用随机方程描述其平均行为,这些随机方程本身可以用蒙特卡罗方法求解。“实际上,同样的计算机代码可以同时被看作是‘自然模拟’或者通过自然抽样解方程。”
 
  −
<syntaxhighlight lang="python">
  −
 
  −
“ syntaxhighlight lang = " python" ”
  −
 
  −
*Monte Carlo simulation: Drawing ''a large number'' of pseudo-random uniform variables from the interval [0,1] at one time, or once at many different times, and assigning values less than or equal to 0.50 as heads and greater than 0.50 as tails, is a ''Monte Carlo simulation'' of the behavior of repeatedly tossing a coin.
  −
 
  −
import scipy
  −
 
  −
输入接头
  −
 
  −
 
  −
 
  −
Kalos and Whitlock<ref name="Kalos">{{harvnb|Kalos|Whitlock|2008}}</ref> point out that such distinctions are not always easy to maintain. For example, the emission of radiation from atoms is a natural stochastic process. It can be simulated directly, or its average behavior can be described by stochastic equations that can themselves be solved using Monte Carlo methods. "Indeed, the same computer code can be viewed simultaneously as a 'natural simulation' or as a solution of the equations by natural sampling."
  −
 
  −
N = 100000
  −
 
  −
100000
  −
 
  −
 
  −
 
  −
x_array = scipy.random.rand(N)
  −
 
  −
X _ array = scipy.random.rand (n)
  −
 
  −
===Monte Carlo and random numbers===
  −
 
  −
y_array = scipy.random.rand(N)
  −
 
  −
Y _ array = scipy.random.rand (n)
  −
 
  −
 
  −
 
  −
generate N pseudorandom independent x and y-values on interval [0,1)
  −
 
  −
在区间[0,1]上生成 n 个与伪随机无关的 x 和 y 值
  −
 
  −
The main idea behind this method is that the results are computed based on repeated random sampling and statistical analysis. The Monte Carlo simulation is, in fact, random experimentations, in the case that, the results of these experiments are not well known.
  −
 
  −
N_qtr_circle = sum(x_array ** 2 + y_array ** 2 < 1)
  −
 
  −
N _ qtr _ circle = sum (x _ array * * 2 + y _ array * * 2 < 1)
  −
 
  −
Monte Carlo simulations are typically characterized by many unknown parameters, many of which are difficult to obtain experimentally.<ref name="usaus">{{cite journal|last1 = Shojaeefard|first1 = MH| last2 = Khalkhali|first2 = A| last3 =Yarmohammadisatri|first3 = Sadegh|title = An efficient sensitivity analysis method for modified geometry of Macpherson suspension based on Pearson Correlation Coefficient|journal = Vehicle System Dynamics|volume = 55|issue = 6|pages = 827–852|doi = 10.1080/00423114.2017.1283046|year = 2017|bibcode = 2017VSD....55..827S|s2cid = 114260173}}</ref> Monte Carlo simulation methods do not always require [[Random number generation#"True" random numbers vs. pseudo-random numbers|truly random number]]s to be useful (although, for some applications such as [[primality testing]], unpredictability is vital).<ref>{{harvnb|Davenport|1992}}</ref> Many of the most useful techniques use deterministic, [[pseudorandom number generator|pseudorandom]] sequences, making it easy to test and re-run simulations. The only quality usually necessary to make good [[simulation]]s is for the pseudo-random sequence to appear "random enough" in a certain sense.
  −
 
  −
Number of pts within the quarter circle x^2 + y^2 < 1 centered at the origin with radius r=1.
  −
 
  −
以原点为中心,半径 r = 1的四分之一圆 x ^ 2 + y ^ 2 < 1内的点数。
  −
 
  −
 
  −
True area of quarter circle is pi/4 and has N_qtr_circle points within it.
  −
 
  −
四分之一圆的真实面积是 π/4,其中有 n _ qtr _ 圆点。
  −
 
  −
What this means depends on the application, but typically they should pass a series of statistical tests. Testing that the numbers are [[Uniform distribution (continuous)|uniformly distributed]] or follow another desired distribution when a large enough number of elements of the sequence are considered is one of the simplest and most common ones. Weak correlations between successive samples are also often desirable/necessary.
  −
 
  −
True area of the square is 1 and has N points within it, hence we approximate pi with
  −
 
  −
平方的真实面积是1,并且有 n 个点在其中,因此我们用
  −
 
  −
 
  −
pi_approx = 4 * float(N_qtr_circle) / N  # Typical values: 3.13756, 3.15156
  −
 
  −
Pi _ approx = 4 * float (n _ qtr _ circle)/n # 典型值: 3.13756,3.15156
  −
 
  −
Sawilowsky lists the characteristics of a high-quality Monte Carlo simulation:<ref name=Sawilowsky/>
  −
 
  −
</syntaxhighlight>
      
'''Monte Carlo and random numbers'''
 
'''Monte Carlo and random numbers'''
第253行: 第185行:  
The main idea behind this method is that the results are computed based on repeated random sampling and statistical analysis. The Monte Carlo simulation is, in fact, random experimentations, in the case that, the results of these experiments are not well known. Monte Carlo simulations are typically characterized by many unknown parameters, many of which are difficult to obtain experimentally. Monte Carlo simulation methods do not always require truly random numbers to be useful (although, for some applications such as primality testing, unpredictability is vital). Many of the most useful techniques use deterministic, pseudorandom sequences, making it easy to test and re-run simulations. The only quality usually necessary to make good simulations is for the pseudo-random sequence to appear "random enough" in a certain sense.
 
The main idea behind this method is that the results are computed based on repeated random sampling and statistical analysis. The Monte Carlo simulation is, in fact, random experimentations, in the case that, the results of these experiments are not well known. Monte Carlo simulations are typically characterized by many unknown parameters, many of which are difficult to obtain experimentally. Monte Carlo simulation methods do not always require truly random numbers to be useful (although, for some applications such as primality testing, unpredictability is vital). Many of the most useful techniques use deterministic, pseudorandom sequences, making it easy to test and re-run simulations. The only quality usually necessary to make good simulations is for the pseudo-random sequence to appear "random enough" in a certain sense.
   −
这种方法的主要思想是基于重复随机抽样和统计分析来计算结果。蒙特卡洛模拟实际上是一种随机实验,在这种情况下,这些实验的结果并不为人所知。蒙特卡罗模拟的典型特征是有许多未知参数,其中许多参数很难通过实验获得。蒙特卡罗模拟方法并不总是要求真正的随机数是有用的(尽管对于一些应用程序,如质数测试,不可预测性是至关重要的)。许多最有用的技术使用确定性的伪随机序列,使测试和重新运行模拟变得很容易。伪随机序列在某种意义上表现地“足够随机”,这是进行良好模拟所必需的唯一品质。
+
这种方法的主要思想是基于重复随机抽样和统计分析来计算结果。蒙特卡洛模拟实际上是一种随机实验,在这种情况下,这些实验的结果并不为人所知。蒙特卡罗模拟的典型特征是有许多未知参数,其中许多参数很难通过实验获得。<ref>Shojaeefard, MH; Khalkhali, A; Yarmohammadisatri, Sadegh (2017). "An efficient sensitivity analysis method for modified geometry of Macpherson suspension based on Pearson Correlation Coefficient". ''Vehicle System Dynamics''. '''55''' (6): 827–852. Bibcode:2017VSD....55..827S. doi:10.1080/00423114.2017.1283046. S2CID 114260173.</ref>蒙特卡罗模拟方法并不总是要求真正的随机数是有用的(尽管对于一些应用程序,如质数测试,不可预测性是至关重要的)。<ref>Davenport, J. H. (1992). "Primality testing revisited". ''Papers from the international symposium on Symbolic and algebraic computation - ISSAC '92''. ''Proceeding ISSAC '92 Papers from the International Symposium on Symbolic and Algebraic Computation''. pp. 123–129. CiteSeerX 10.1.1.43.9296. doi:10.1145/143242.143290. ISBN <bdi>978-0-89791-489-5</bdi>. S2CID 17322272.</ref>许多最有用的技术是使用确定性的伪随机序列,使测试和重新运行模拟变得很容易。伪随机序列在某种意义上表现地“足够随机”,这是进行良好模拟唯一必需的性质。
    
What this means depends on the application, but typically they should pass a series of statistical tests. Testing that the numbers are uniformly distributed or follow another desired distribution when a large enough number of elements of the sequence are considered is one of the simplest and most common ones. Weak correlations between successive samples are also often desirable/necessary.
 
What this means depends on the application, but typically they should pass a series of statistical tests. Testing that the numbers are uniformly distributed or follow another desired distribution when a large enough number of elements of the sequence are considered is one of the simplest and most common ones. Weak correlations between successive samples are also often desirable/necessary.
第261行: 第193行:  
Sawilowsky lists the characteristics of a high-quality Monte Carlo simulation:
 
Sawilowsky lists the characteristics of a high-quality Monte Carlo simulation:
   −
'''萨维罗斯基 Sawilowsky'''列出了高质量蒙特卡罗模拟的特点:
+
萨维罗斯基列出了高质量蒙特卡罗模拟的特点:<ref name="Sawilowsky" />
 
*the (pseudo-random) number generator has certain characteristics (e.g. a long "period" before the sequence repeats)
 
*the (pseudo-random) number generator has certain characteristics (e.g. a long "period" before the sequence repeats)
 
*(伪随机数)生成器具有某些特征(例如,序列重复之前有一个很长的“周期”)
 
*(伪随机数)生成器具有某些特征(例如,序列重复之前有一个很长的“周期”)
    
*the (pseudo-random) number generator produces values that pass tests for randomness
 
*the (pseudo-random) number generator produces values that pass tests for randomness
*(伪随机数)生成器生成能通过随机性测试的值
+
*(伪随机数)生成器可以产生能通过随机性测试的值
    
*there are enough samples to ensure accurate results
 
*there are enough samples to ensure accurate results
 
*有足够的样本来确保准确的结果
 
*有足够的样本来确保准确的结果
 
*the proper sampling technique is used
 
*the proper sampling technique is used
*使用适当的取样技术
+
*使用适当的取样方法
    
*the algorithm used is valid for what is being modeled
 
*the algorithm used is valid for what is being modeled
第280行: 第212行:  
[[Pseudo-random number sampling]] algorithms are used to transform uniformly distributed pseudo-random numbers into numbers that are distributed according to a given [[probability distribution]].
 
[[Pseudo-random number sampling]] algorithms are used to transform uniformly distributed pseudo-random numbers into numbers that are distributed according to a given [[probability distribution]].
   −
伪随机数采样算法是将均匀分布的伪随机数转化为按给定概率分布分布的数。
+
'''伪随机数采样算法 Pseudo-random Number Sampling Algorithms'''是将均匀分布的伪随机数转化为按给定概率分布分布的数。
    
[[Low-discrepancy sequences]] are often used instead of random sampling from a space as they ensure even coverage and normally have a faster order of convergence than Monte Carlo simulations using random or pseudorandom sequences. Methods based on their use are called [[quasi-Monte Carlo method]]s.
 
[[Low-discrepancy sequences]] are often used instead of random sampling from a space as they ensure even coverage and normally have a faster order of convergence than Monte Carlo simulations using random or pseudorandom sequences. Methods based on their use are called [[quasi-Monte Carlo method]]s.
   −
低差异序列通常被用来代替空间中的随机采样,因为它们确保了均匀的覆盖,并且通常比使用随机或伪随机序列的蒙特卡罗模拟具有更快的收敛顺序。基于它们的使用的方法称为准蒙特卡罗方法。
+
'''低差异序列 Low-discrepancy sequences'''通常被用来代替空间中的随机采样,因为它们确保了均匀的覆盖,并且通常比使用随机或伪随机序列的蒙特卡罗模拟具有更快的收敛顺序。基于它们的使用的方法称为'''准蒙特卡罗方法 Quasi-Monte Carlo Methods'''。
   −
In an effort to assess the impact of random number quality on Monte Carlo simulation outcomes, astrophysical researchers tested cryptographically-secure pseudorandom numbers generated via Intel's [[RDRAND]] instruction set, as compared to those derived from algorithms, like the [[Mersenne Twister]], in Monte Carlo simulations of radio flares from [[brown dwarfs]].  RDRAND is the closest pseudorandom number generator to a true random number generator. No statistically significant difference was found between models generated with typical pseudorandom number generators and RDRAND for trials consisting of the generation of 10<sup>7</sup> random numbers.<ref>{{cite journal|last1=Route|first1=Matthew|title=Radio-flaring Ultracool Dwarf Population Synthesis|journal=The Astrophysical Journal|date=August 10, 2017|volume=845|issue=1|page=66|doi=10.3847/1538-4357/aa7ede|arxiv=1707.02212|bibcode=2017ApJ...845...66R|s2cid=118895524}}</ref>
+
In an effort to assess the impact of random number quality on Monte Carlo simulation outcomes, astrophysical researchers tested cryptographically-secure pseudorandom numbers generated via Intel's [[RDRAND]] instruction set, as compared to those derived from algorithms, like the [[Mersenne Twister]], in Monte Carlo simulations of radio flares from [[brown dwarfs]].  RDRAND is the closest pseudorandom number generator to a true random number generator. No statistically significant difference was found between models generated with typical pseudorandom number generators and RDRAND for trials consisting of the generation of 10<sup>7</sup> random numbers.<ref name=":24">Route, Matthew (August 10, 2017). "Radio-flaring Ultracool Dwarf Population Synthesis". ''The Astrophysical Journal''. '''845''' (1): 66. arXiv:1707.02212. Bibcode:2017ApJ...845...66R. doi:10.3847/1538-4357/aa7ede. S2CID 118895524.</ref>
   −
为了评估随机数质量对蒙特卡罗模拟结果的影响,天体物理学研究人员测试了通过英特尔的RDRAND指令集生成的加密安全伪随机数,并将其与梅森龙卷风等算法生成的伪随机数进行了比较,在蒙特卡洛模拟褐矮星射电耀斑的过程中。RDRAND是最接近真实随机数生成器的伪随机数生成器。对于生成107个随机数的试验,用典型伪随机数生成器生成的模型与RDRAND之间没有统计学差异。
+
为了评估随机数质量对蒙特卡罗模拟结果的影响,天体物理学研究人员测试了通过英特尔的RDRAND指令集生成的加密安全伪随机数,并将其与'''梅森旋转算法 Mersenne Twister'''生成的伪随机数进行了比较,在蒙特卡洛模拟褐矮星射电耀斑的过程中。RDRAND是最接近真实随机数生成器的伪随机数生成器。对于生成10<sup>7</sup>个随机数的试验,典型伪随机数生成器生成的模型与RDRAND之间没有统计差异。<ref name=":24" />
    
=== Monte Carlo simulation versus "what if" scenarios ===
 
=== Monte Carlo simulation versus "what if" scenarios ===
   −
There are ways of using probabilities that are definitely not Monte Carlo simulations – for example, deterministic modeling using single-point estimates. Each uncertain variable within a model is assigned a "best guess" estimate.  Scenarios (such as best, worst, or most likely case) for each input variable are chosen and the results recorded.<ref>{{harvnb|Vose|2000|page=13}}</ref>
+
There are ways of using probabilities that are definitely not Monte Carlo simulations – for example, deterministic modeling using single-point estimates. Each uncertain variable within a model is assigned a "best guess" estimate.  Scenarios (such as best, worst, or most likely case) for each input variable are chosen and the results recorded.<ref name=":25">Vose 2000, p. 13</ref>
    
By contrast, Monte Carlo simulations sample from a [[probability distribution]] for each variable to produce hundreds or thousands of possible outcomes. The results are analyzed to get probabilities of different outcomes occurring.<ref>{{harvnb|Vose|2000|page=16}}</ref> For example, a comparison of a spreadsheet cost construction model run using traditional "what if" scenarios, and then running the comparison again with Monte Carlo simulation and [[triangular distribution|triangular probability distribution]]s shows that the Monte Carlo analysis has a narrower range than the "what if" analysis.{{Examples|date=May 2012}}  This is because the "what if" analysis gives equal weight to all scenarios (see [[Corporate finance#Quantifying uncertainty|quantifying uncertainty in corporate finance]]), while the Monte Carlo method hardly samples in the very low probability regions. The samples in such regions are called "rare events".
 
By contrast, Monte Carlo simulations sample from a [[probability distribution]] for each variable to produce hundreds or thousands of possible outcomes. The results are analyzed to get probabilities of different outcomes occurring.<ref>{{harvnb|Vose|2000|page=16}}</ref> For example, a comparison of a spreadsheet cost construction model run using traditional "what if" scenarios, and then running the comparison again with Monte Carlo simulation and [[triangular distribution|triangular probability distribution]]s shows that the Monte Carlo analysis has a narrower range than the "what if" analysis.{{Examples|date=May 2012}}  This is because the "what if" analysis gives equal weight to all scenarios (see [[Corporate finance#Quantifying uncertainty|quantifying uncertainty in corporate finance]]), while the Monte Carlo method hardly samples in the very low probability regions. The samples in such regions are called "rare events".
第298行: 第230行:  
'''Monte Carlo simulation versus "what if" scenarios'''
 
'''Monte Carlo simulation versus "what if" scenarios'''
   −
蒙特卡罗模拟与“假如”情景
+
蒙特卡罗模拟与“假设”情景
    
There are ways of using probabilities that are definitely not Monte Carlo simulations – for example, deterministic modeling using single-point estimates. Each uncertain variable within a model is assigned a "best guess" estimate.  Scenarios (such as best, worst, or most likely case) for each input variable are chosen and the results recorded.
 
There are ways of using probabilities that are definitely not Monte Carlo simulations – for example, deterministic modeling using single-point estimates. Each uncertain variable within a model is assigned a "best guess" estimate.  Scenarios (such as best, worst, or most likely case) for each input variable are chosen and the results recorded.
   −
使用概率的方法肯定不是蒙特卡洛模拟——例如,使用单点估计的确定性建模。模型中的每个不确定变量都被赋予一个“最佳猜测”估计。为每个输入变量选择场景(如最佳、最差或最可能的情况)并记录结果。
+
使用概率的方法不一定都是蒙特卡洛模拟——例如,使用单点估计的确定性建模。模型中的每个不确定变量都被赋予一个“最佳猜测”估计。为每个输入变量选择场景(如最佳、最差或最可能的情况)并记录结果。<ref name=":25" />
    
By contrast, Monte Carlo simulations sample from a probability distribution for each variable to produce hundreds or thousands of possible outcomes. The results are analyzed to get probabilities of different outcomes occurring. For example, a comparison of a spreadsheet cost construction model run using traditional "what if" scenarios, and then running the comparison again with Monte Carlo simulation and triangular probability distributions shows that the Monte Carlo analysis has a narrower range than the "what if" analysis.  This is because the "what if" analysis gives equal weight to all scenarios (see quantifying uncertainty in corporate finance), while the Monte Carlo method hardly samples in the very low probability regions. The samples in such regions are called "rare events".
 
By contrast, Monte Carlo simulations sample from a probability distribution for each variable to produce hundreds or thousands of possible outcomes. The results are analyzed to get probabilities of different outcomes occurring. For example, a comparison of a spreadsheet cost construction model run using traditional "what if" scenarios, and then running the comparison again with Monte Carlo simulation and triangular probability distributions shows that the Monte Carlo analysis has a narrower range than the "what if" analysis.  This is because the "what if" analysis gives equal weight to all scenarios (see quantifying uncertainty in corporate finance), while the Monte Carlo method hardly samples in the very low probability regions. The samples in such regions are called "rare events".
   −
相比之下,蒙特卡罗模拟从概率分布中抽取每个变量的样本,产生数百或数千个可能的结果。对结果进行分析,得到不同结果发生的概率。例如,对使用传统”如果”情景运行的电子表格成本构造模型进行比较,然后再与蒙特卡罗模拟和三角概率分布进行比较,结果表明蒙特卡罗分析的范围比”如果”分析的范围窄。这是因为“如果”分析对所有情景给予了同等的权重(见量化公司融资的不确定性) ,而蒙特卡罗方法基金组织几乎不在非常低的概率区域抽样。这些地区的样品被称为“稀有事件”。
+
相比之下,蒙特卡罗模拟从概率分布中抽取每个变量的样本,产生数百或数千个可能的结果。对结果进行分析,得到不同结果发生的概率。<ref>Vose 2000, p. 16</ref> 例如,对使用传统”假设”情景运行的电子表格成本构造模型进行比较,然后再与蒙特卡罗模拟和三角概率分布进行比较,结果表明蒙特卡罗分析的范围比”假设”分析的范围窄。这是因为“假设”分析对所有情景给予了同等的权重(见量化公司融资的不确定性) ,而蒙特卡罗方法几乎不在非常低的概率区域抽样。这部分样本被称为“稀有事件”。
 
  −
====Mersenne_twister (MT19937) in Python (a Monte Carlo method simulation)====
  −
'''Mersenne_twister (MT19937)在Python中的应用(一种蒙特卡罗方法仿真)'''
  −
 
  −
A ''Monte Carlo method'' simulation is defined as any method that utilizes sequences of random numbers to perform the simulation.  Monte Carlo simulations are applied to many topics including [[quantum chromodynamics]], cancer radiation therapy, traffic flow, [[stellar evolution]] and VLSI design.  All these simulations require the use of random numbers and therefore [[pseudorandom number generator]]s, which makes creating random-like numbers very important.
  −
 
  −
A Monte Carlo method simulation is defined as any method that utilizes sequences of random numbers to perform the simulation.  Monte Carlo simulations are applied to many topics including quantum chromodynamics, cancer radiation therapy, traffic flow, stellar evolution and VLSI design.  All these simulations require the use of random numbers and therefore pseudorandom number generators, which makes creating random-like numbers very important.
  −
 
  −
蒙特卡罗方法模拟被定义为任何利用随机数序列来执行模拟的方法。蒙特卡罗模拟应用于许多课题,包括量子色动力学,癌症放射治疗,交通流,恒星进化和超大规模集成电路设计。所有这些模拟都需要使用随机数,因此产生类随机数的伪随机数生成器非常重要。
  −
 
  −
A simple example of how a computer would perform a Monte Carlo simulation is the calculation of [[Pi|π]].  If a square enclosed a circle and a point were randomly chosen inside the square the point would either lie inside the circle or outside it.  If the process were repeated many times, the ratio of the random points that lie inside the circle to the total number of random points in the square would approximate the ratio of the area of the circle to the area of the square.  From this we can estimate pi, as shown in the [[Python (programming language)|Python]] code below utilizing a [[SciPy]] package to generate pseudorandom numbers with the [[Mersenne twister|MT19937]] algorithm.  Note that this method is a computationally inefficient way to [[Numerical approximations of π|numerically approximate π]].
  −
 
  −
A simple example of how a computer would perform a Monte Carlo simulation is the calculation of π.  If a square enclosed a circle and a point were randomly chosen inside the square the point would either lie inside the circle or outside it.  If the process were repeated many times, the ratio of the random points that lie inside the circle to the total number of random points in the square would approximate the ratio of the area of the circle to the area of the square.  From this we can estimate pi, as shown in the Python code below utilizing a SciPy package to generate pseudorandom numbers with the MT19937 algorithm.  Note that this method is a computationally inefficient way to numerically approximate π.
  −
 
  −
计算机进行蒙特卡罗模拟的一个简单实例是 π 的计算。如果一个正方形包含一个圆,一个点在正方形内被随机选择,那么这个点要么在圆内,要么在圆外。如果这个过程重复多次,圆内的随机点与正方形内随机点总数的比值将近似于圆的面积与正方形面积的比值。由此我们可以估算π,如下面的Python代码所示,利用 SciPy 包使用 MT19937算法生成伪随机数生成器。值得注意的是,这种从数值上近似得到π的方法计算效率低下。
  −
 
  −
<syntaxhighlight lang="python">
  −
 
  −
import scipy
  −
 
  −
 
  −
N = 100000
  −
 
  −
x_array = scipy.random.rand(N)
  −
 
  −
y_array = scipy.random.rand(N)
  −
 
  −
# generate N pseudorandom independent x and y-values on interval [0,1)
  −
 
  −
N_qtr_circle = sum(x_array ** 2 + y_array ** 2 < 1)
  −
 
  −
# Number of pts within the quarter circle x^2 + y^2 < 1 centered at the origin with radius r=1.
  −
 
  −
# True area of quarter circle is pi/4 and has N_qtr_circle points within it.
  −
 
  −
# True area of the square is 1 and has N points within it, hence we approximate pi with
  −
 
  −
pi_approx = 4 * float(N_qtr_circle) / N  # Typical values: 3.13756, 3.15156
  −
 
  −
The Intergovernmental Panel on Climate Change relies on Monte Carlo methods in probability density function analysis of radiative forcing.
  −
 
  −
政府间气候变化专门委员会基于蒙特卡罗方法对概率密度函数辐射效应进行分析。
  −
 
  −
</syntaxhighlight>
      
==Applications 应用==
 
==Applications 应用==
第358行: 第246行:  
Monte Carlo methods are especially useful for simulating phenomena with significant uncertainty in inputs and systems with many coupled degrees of freedom. Areas of application include:
 
Monte Carlo methods are especially useful for simulating phenomena with significant uncertainty in inputs and systems with many coupled degrees of freedom. Areas of application include:
   −
蒙特卡罗方法尤其适用于模拟输入和多自由度耦合系统中具有明显不确定性的现象。申请范围包括:
+
蒙特卡罗方法尤其适用于模拟输入和多自由度耦合系统中具有明显不确定性的现象。应用领域包括:
    
===Physical sciences 物理科学===
 
===Physical sciences 物理科学===
596

个编辑

导航菜单