Content deleted Content added
m Improve pseudo-code formatting |
|||
Line 55:
===Pseudo-code===
mu:=-6
2. N:=100; Ne:=10; //▼
sigma2:=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
7. mu = mean(X(1:Ne)); sigma2=var(X(1:Ne)); // Update parameters of sampling distribution▼
'''while''' t < maxits and sigma2 > epsilon
9. return mu // Return mean of final sampling distribution as solution▼
X:=SampleGaussian(mu,sigma2,N)
S:=exp(-(X-2)^2) + 0.8 exp(-(X+2)^2)
X:=sort(X,S)
mu:=mean(X(1:Ne))
sigma2:=var(X(1:Ne))
t:=t+1
==Related methods==
|