Open ToshiyukiBandai opened 3 years ago
for loop in range(self.nspl):
# probability distribution
lcs = np.array([0] * self.nps)
lcs[0] = 1
for k3 in range(1, self.nps):
for i in range(1000):
################## matlab code #################
for loop=1:nspl;
% Select simplex by sampling the complex according to a linear
% probability distribution
lcs(1) = 1;
for k3=2:nps;
for iter=1:1000;
lpos = 1 + floor(npg+0.5-sqrt((npg+0.5)^2 - npg*(npg+1)*rand));
idx=find(lcs(1:k3-1)==lpos); if isempty(idx); break; end;
end;
i guess yr guess is correct!
Hi,
Thank you for providing the code. I really appreciate your work. I am using the SCE-UA algorithm for my research and just noticed that there may be a mistake in the code
Line 93 of the sceua.py lcs[0] = 1 should be lcs[0] = 0
I think this error comes from that the original Matlab code starts with 1 for index, but 0 in python. This code means that we alwarys pick up the best value in the sub-pupulation for defining the simpex. This error may be related to issues reported here (ex. "Strange behavior of SCEUA convergence #204").