Content deleted Content added
m inline reference |
→Software implementations: Add CEopt Matlab package to the list. |
||
(34 intermediate revisions by 21 users not shown) | |||
Line 1:
{{Short description|Monte Carlo method for importance sampling and optimization}}
The '''cross-entropy''' ('''CE''') '''method''' is a [[Monte Carlo method|Monte Carlo]] method for [[importance sampling]] and [[Optimization (mathematics)|optimization]]. It is applicable to both [[Combinatorial optimization|combinatorial]] and [[Continuous optimization|continuous]] problems, with either a static or noisy objective.
#Draw a sample from a [[probability distribution]].
▲In a nutshell, the CE method consists of two phases <ref> Rubinstein, R.Y. and Kroese, D.P.,The Cross-Entropy Method: A Unified Approach to Combinatorial Optimization, Monte-Carlo Simulation, and Machine Learning, Springer-Verlag, New York (2004)</ref>
#Minimize the ''[[cross-entropy]]'' between this distribution and a target distribution to produce a better sample in the next iteration.
[[Reuven Rubinstein]] developed the method in the context of ''rare-event simulation'', where tiny probabilities must be estimated, for example in network reliability analysis, queueing models, or performance analysis of telecommunication systems. The method has also been applied to the [[traveling salesman problem|traveling salesman]], [[quadratic assignment problem|quadratic assignment]], [[Sequence alignment|DNA sequence alignment]], [[Maxcut|max-cut]] and buffer allocation problems.
==Estimation via importance sampling==
Consider the general problem of estimating the quantity
where <math>H</math> is some ''performance function'' and <math>f(\mathbf{x};\mathbf{u})</math> is a member of some [[parametric family]] of distributions. Using [[importance sampling]] this quantity can be estimated as
where <math>\mathbf{X}_1,\dots,\mathbf{X}_N</math> is a random sample from <math>g\,</math>. For positive <math>H</math>, the theoretically ''optimal'' importance sampling [[probability density function|density]] (
This, however, depends on the unknown <math>\ell</math>. The CE method aims to approximate the optimal PDF by adaptively selecting members of the parametric family that are closest (in the [[Kullback–Leibler divergence|Kullback–Leibler]] sense) to the optimal PDF <math>g^*</math>.
Line 29 ⟶ 27:
# Choose initial parameter vector <math>\mathbf{v}^{(0)}</math>; set t = 1.
# Generate a random sample <math>\mathbf{X}_1,\dots,\mathbf{X}_N</math> from <math>f(\cdot;\mathbf{v}^{(t-1)})</math>
# Solve for <math>\mathbf{v}^{(t)}</math>, where<br><math>\mathbf{v}^{(t)} = \mathop{\textrm{argmax}}_{\mathbf{
# If convergence is reached then '''stop'''; otherwise, increase t by 1 and reiterate from step 2.
Line 39 ⟶ 37:
== Continuous optimization—example==
The same CE algorithm can be used for optimization, rather than estimation.
Suppose the problem is to maximize some function <math>S
<math>S(x) = \textrm{e}^{-(x-2)^2} + 0.8\,\textrm{e}^{-(x+2)^2}</math>.
To apply CE, one considers first the ''associated stochastic problem'' of estimating
Line 54 ⟶ 52:
This yields the following randomized algorithm that happens to coincide with the so-called Estimation of Multivariate Normal Algorithm (EMNA), an [[estimation of distribution algorithm]].
===
μ := −6
σ2 := 100
3. while t < maxits and sigma2 > epsilon // While maxits not exceeded and not converged▼
t := 0
4. X = SampleGaussian(mu,sigma2,N); // Obtain N samples from current sampling distribution▼
maxits := 100
5. S = exp(-(X-2)^2) + 0.8 exp(-(X+2)^2); // Evaluate objective function at sampled points▼
N := 100
6. X = sort(X,S); // Sort X by objective function values (in descending order)▼
Ne := 10
'''while''' t < maxits '''and''' σ2 > ε '''do'''
9. return mu // Return mean of final sampling distribution as solution▼
X := SampleGaussian(μ, σ2, N)
S := exp(−(X − 2) ^ 2) + 0.8 exp(−(X + 2) ^ 2)
X := sort(X, S)
''// Update parameters of sampling distribution via elite samples''
μ := mean(X(1:Ne))
σ2 := var(X(1:Ne))
t := t + 1
'''return''' μ
==Related methods==
* [[Simulated annealing]]
* [[Genetic algorithms]]
* [[Harmony search]]
* [[Estimation of distribution algorithm]]
* [[Tabu search]]
* [[Natural Evolution Strategy]]
* [[Ant colony optimization algorithms]]
==See also==
* [[Cross entropy]]
* [[Kullback–Leibler divergence]]
* [[Randomized algorithm]]
* [[Importance sampling]]
== Journal papers ==
==References==▼
* De Boer, P.-T., Kroese, D.P., Mannor, S. and Rubinstein, R.Y. (2005). A Tutorial on the Cross-Entropy Method. ''Annals of Operations Research'', '''134''' (1), 19–67.[http://www.maths.uq.edu.au/~kroese/ps/aortut.pdf]
*Rubinstein, R.Y. (1997). Optimization of Computer
* [https://ceopt.org '''CEopt''' Matlab package]
* [https://cran.r-project.org/web/packages/CEoptim/index.html '''CEoptim''' R package]▼
* [https://www.nuget.org/packages/Novacta.Analytics '''Novacta.Analytics''' .NET library]
▲==References==
▲==Software Implementations==
{{reflist}}
▲*[https://cran.r-project.org/web/packages/CEoptim/index.html '''CEoptim''' R package]
[[Category:Heuristics]]
|