From 2ae238f4253851a992fac3039fae05d621c1c80f Mon Sep 17 00:00:00 2001 From: tomtkg Date: Sun, 24 Dec 2023 09:57:13 +0900 Subject: [PATCH 1/3] suppress alphaShape:DupPointsBasicWarnId warning --- .../Multi-objective optimization/MOEA-D-PFE/generateFunctions.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PlatEMO/Algorithms/Multi-objective optimization/MOEA-D-PFE/generateFunctions.m b/PlatEMO/Algorithms/Multi-objective optimization/MOEA-D-PFE/generateFunctions.m index 0ba657997..c8f5ad6bb 100644 --- a/PlatEMO/Algorithms/Multi-objective optimization/MOEA-D-PFE/generateFunctions.m +++ b/PlatEMO/Algorithms/Multi-objective optimization/MOEA-D-PFE/generateFunctions.m @@ -43,7 +43,7 @@ end function W = alphaShapeValidator(W,X) - shp = alphaShape(X*A,alpha); + shp = alphaShape(unique(X*A,'rows'),alpha); if alpha > min(alphaSpectrum(shp)) W = W(inShape(shp,W*A),:); end From f80c1cb5330e11f8bfa6524ab47640175573c87a Mon Sep 17 00:00:00 2001 From: tomtkg Date: Sun, 24 Dec 2023 09:57:32 +0900 Subject: [PATCH 2/3] suppress rankDeficientMatrix warning --- .../Multi-objective optimization/MOEA-D-PFE/MOEADPFE.m | 1 + 1 file changed, 1 insertion(+) diff --git a/PlatEMO/Algorithms/Multi-objective optimization/MOEA-D-PFE/MOEADPFE.m b/PlatEMO/Algorithms/Multi-objective optimization/MOEA-D-PFE/MOEADPFE.m index 9091ba1fb..794597d10 100644 --- a/PlatEMO/Algorithms/Multi-objective optimization/MOEA-D-PFE/MOEADPFE.m +++ b/PlatEMO/Algorithms/Multi-objective optimization/MOEA-D-PFE/MOEADPFE.m @@ -22,6 +22,7 @@ methods function main(Algorithm,Problem) + warning('off','MATLAB:rankDeficientMatrix') %% Parameter setting [phi,alpha] = Algorithm.ParameterSet(0.1,0.1); From 48d56817f88238bcef57a7448cf01275c181e4fd Mon Sep 17 00:00:00 2001 From: HanLeI187 <93068350+HanLeI187@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:47:40 +0800 Subject: [PATCH 3/3] Merge pull request #130 from tomtkg/master Adding I-SMOA --- .../I-SMOA/ISMOA.m | 72 ++++ .../I-SMOA/dacefit.m | 358 ++++++++++++++++++ .../I-SMOA/loadData.m | 24 ++ .../I-SMOA/predictor.m | 143 +++++++ ...{DTLZ2_M3_D12.dat => DTLZ2_M3_D12_ILD.dat} | 0 ...{DTLZ2_M3_D12.mat => DTLZ2_M3_D12_ILD.mat} | Bin .../SMOA/DTLZ2_M3_D12_UDH.dat | 10 + .../SMOA/DTLZ2_M3_D12_UDH.mat | Bin 0 -> 1181 bytes .../Multi-objective optimization/SMOA/SMOA.m | 15 +- .../SMOA/loadData.m | 4 +- 10 files changed, 618 insertions(+), 8 deletions(-) create mode 100644 PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/ISMOA.m create mode 100644 PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/dacefit.m create mode 100644 PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/loadData.m create mode 100644 PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/predictor.m rename PlatEMO/Algorithms/Multi-objective optimization/SMOA/{DTLZ2_M3_D12.dat => DTLZ2_M3_D12_ILD.dat} (100%) rename PlatEMO/Algorithms/Multi-objective optimization/SMOA/{DTLZ2_M3_D12.mat => DTLZ2_M3_D12_ILD.mat} (100%) create mode 100644 PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_UDH.dat create mode 100644 PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_UDH.mat diff --git a/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/ISMOA.m b/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/ISMOA.m new file mode 100644 index 000000000..a1579c04b --- /dev/null +++ b/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/ISMOA.m @@ -0,0 +1,72 @@ +classdef ISMOA < ALGORITHM +% +% Iterative supervised multi-objective optimization algorithm +% H --- 2.6e4 --- Size of uniformly distributed L1 unit vector set + +%------------------------------- Reference -------------------------------- +% T. Takagi, K. Takadama, and H. Sato, Pareto front upconvert by iterative +% estimation modeling and solution sampling, Proceedings of The 12th +% Edition of International Conference Series on Evolutionary Multi- +% Criterion Optimization, Lecture Notes in Computer Science, 2023, 13970: +% 218–230. +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2023 BIMK Group. You are free to use the PlatEMO for +% research purposes. All publications which use this platform or any code +% in the platform should acknowledge the use of "PlatEMO" and reference "Ye +% Tian, Ran Cheng, Xingyi Zhang, and Yaochu Jin, PlatEMO: A MATLAB platform +% for evolutionary multi-objective optimization [educational forum], IEEE +% Computational Intelligence Magazine, 2017, 12(4): 73-87". +%-------------------------------------------------------------------------- + +% This function is written by Tomoaki Takagi + +% This function requires solution data like 'DTLZ2_M3_D12_ILD.mat' or +% 'DTLZ2_M3_D12_ILD.dat'. This function return all evaluated solutions. +% This function is deterministic method without random numbers. + + methods + function main(Algorithm,Problem) + %% Parameter setting + H = Algorithm.ParameterSet(2.6e4); + + %% Generate the uniformly distributed L1 unit vector set + [W,N] = UniformPoint(H,Problem.M,'ILD'); + W(W==1e-6) = 0; + + %% Generate estimator + if ~isempty(ver('nnet')) + estimator = @(W,X,Y) sim(newrbe(X',Y'),W')'; + else + I = ones(1,M); + estimator = @(W,X,Y) predictor(W, ... + dacefit(X,Y,'regpoly0','corrgauss',I,1e-3*I,1e3*I)); + end + + %% Load solution data + Population = loadData(Problem); + + %% Iterative loop + while size(Population) < Problem.maxFE + Obj = Population.objs; + Dec = Population.decs; + + % Generate model values + Y = vecnorm(Obj,1,2); % L1 norm set + X = Obj./Y; % L1 unit vector set + + % Single solution sampling + objs = W.*estimator(W,X,Y); + [~,index] = max(min(pdist2(objs,Obj),[],2)); + + % Evaluation and upconvert + dec = zeros(1,Problem.D); + for i = 1 : Problem.D + dec(i) = estimator(W(index,:),X,Dec(:,i)); + end + dec = min(max(dec,Problem.lower),Problem.upper); + Population = [Population,Problem.Evaluation(dec)]; + end + Algorithm.NotTerminated(Population); + end + end +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/dacefit.m b/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/dacefit.m new file mode 100644 index 000000000..6a77fa4ab --- /dev/null +++ b/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/dacefit.m @@ -0,0 +1,358 @@ +function [dmodel,perf] = dacefit(S,Y,regr,corr,theta0,lob,upb) +%dacefit - Constrained non-linear least-squares fit of a given correlation +%model to the provided data set and regression model +% +% Call +% [dmodel, perf] = dacefit(S, Y, regr, corr, theta0) +% [dmodel, perf] = dacefit(S, Y, regr, corr, theta0, lob, upb) +% +% Input +% S, Y : Data points (S(i,:), Y(i,:)), i = 1,...,m +% regr : Function handle to a regression model +% corr : Function handle to a correlation function +% theta0 : Initial guess on theta, the correlation function parameters +% lob,upb : If present, then lower and upper bounds on theta +% Otherwise, theta0 is used for theta +% +% Output +% dmodel : DACE model: a struct with the elements +% regr : function handle to the regression model +% corr : function handle to the correlation function +% theta : correlation function parameters +% beta : generalized least squares estimate +% gamma : correlation factors +% sigma2 : maximum likelihood estimate of the process variance +% S : scaled design sites +% Ssc : scaling factors for design arguments +% Ysc : scaling factors for design ordinates +% C : Cholesky factor of correlation matrix +% Ft : Decorrelated regression matrix +% G : From QR factorization: Ft = Q*G' . +% perf : struct with performance information. Elements +% nv : Number of evaluations of objective function +% perf : (q+2)*nv array, where q is the number of elements +% in theta, and the columns hold current values of +% [theta; psi(theta); type] +% |type| = 1, 2 or 3, indicate 'start', 'explore' or 'move' +% A negative value for type indicates an uphill step + +% hbn@imm.dtu.dk +% Last update September 3, 2002 + + % Check design points + [m,n] = size(S); % number of design sites and their dimension + sY = size(Y); + if min(sY) == 1 + Y = Y(:); + lY = max(sY); + else + lY = sY(1); + end + if m ~= lY + error('S and Y must have the same number of rows') + end + % Check correlation parameters if it is given + lth = length(theta0); + if nargin > 5 % optimization case + if length(lob) ~= lth || length(upb) ~= lth + error('theta0, lob and upb must have the same length') + end + if any(lob <= 0) || any(upb < lob) + error('The bounds must satisfy 0 < lob <= upb') + end + else % given theta + if any(theta0 <= 0) + error('theta0 must be strictly positive') + end + end + % Normalize data + mS = mean(S); sS = std(S); + mY = mean(Y); sY = std(Y); + % 02.08.27: Check for 'missing dimension' + j = find(sS == 0); + if ~isempty(j) + sS(j) = 1; + end + j = find(sY == 0); + if ~isempty(j) + sY(j) = 1; + end + S = (S - repmat(mS,m,1)) ./ repmat(sS,m,1); + Y = (Y - repmat(mY,m,1)) ./ repmat(sY,m,1); + % Calculate distances D between points + mzmax = m*(m-1) / 2; % number of non-zero distances + ij = zeros(mzmax, 2); % initialize matrix with indices + D = zeros(mzmax, n); % initialize matrix with distances + LL = 0; + for k = 1 : m-1 + LL = LL(end) + (1 : m-k); + ij(LL,:) = [repmat(k,m-k,1) (k+1:m)']; % indices for sparse matrix + D(LL,:) = repmat(S(k,:),m-k,1)-S(k+1:m,:); % differences between points + end + %if min(sum(abs(D),2) ) == 0 + % error('Multiple design sites are not allowed') + %end + % Regression matrix + F = feval(regr, S); + [mF,p] = size(F); + if mF ~= m + error('number of rows in F and S do not match') + end + if p > mF + error('least squares problem is underdetermined') + end + % parameters for objective function + par = struct('corr',corr,'regr',regr,'y',Y,'F',F,'D',D,'ij',ij,'scS',sS); + % Determine theta + if nargin > 5 + % Bound constrained non-linear optimization + [theta, f, fit, perf] = boxmin(theta0, lob, upb, par); + if isinf(f) + error('Bad parameter region. Try increasing upb') + end + else + % Given theta + theta = theta0(:); + [f,fit] = objfunc(theta, par); + perf = struct('perf',[theta; f; 1], 'nv',1); + if isinf(f) + error('Bad point. Try increasing theta0') + end + end + % Return values + dmodel = struct('regr',regr,'corr',corr,'theta',theta.','beta',fit.beta,... + 'gamma',fit.gamma,'sigma2',sY.^2.*fit.sigma2,'S',S,'Ssc',[mS; sS],... + 'Ysc',[mY; sY],'C',fit.C,'Ft',fit.Ft,'G',fit.G); +end + +function [obj, fit] = objfunc(theta, par) + % Initialize + obj = inf; + fit = struct('sigma2',NaN,'beta',NaN,'gamma',NaN,'C',NaN,'Ft',NaN,'G',NaN); + m = size(par.F,1); + % Set up R + r = feval(par.corr, theta, par.D); + idx = find(r > 0); o = (1 : m)'; + mu = (10+m)*eps; + R = sparse([par.ij(idx,1); o],[par.ij(idx,2); o],[r(idx); ones(m,1)+mu]); + % Cholesky factorization with check for pos. def. + [C,rd] = chol(R); + if rd + return; + end + % Get least squares solution + C = C'; + Ft = C \ par.F; + [Q,G] = qr(Ft,0); + if rcond(G) < 1e-10 + % Check F + if cond(par.F) > 1e15 + error('F is too ill conditioned\nPoor combination of regression model and design sites') + else % Matrix Ft is too ill conditioned + return + end + end + Yt = C \ par.y; + beta = G \ (Q'*Yt); + rho = Yt - Ft*beta; sigma2 = sum(rho.^2)/m; + detR = prod( full(diag(C)) .^ (2/m) ); + obj = sum(sigma2) * detR; + if nargout > 1 + fit = struct('sigma2',sigma2,'beta',beta,'gamma',rho'/C,'C',C,'Ft',Ft,'G',G'); + end +end + +function [t,f,fit,perf] = boxmin(t0,lo,up,par) +%BOXMIN Minimize with positive box constraints + + % Initialize + [t, f, fit, itpar] = start(t0, lo, up, par); + if ~isinf(f) + % Iterate + p = length(t); + if p <= 2 + kmax = 2; + else + kmax = min(p,4); + end + for k = 1 : kmax + th = t; + [t, f, fit, itpar] = explore(t, f, fit, itpar, par); + [t, f, fit, itpar] = move(th, t, f, fit, itpar, par); + end + end + perf = struct('nv',itpar.nv, 'perf',itpar.perf(:,1:itpar.nv)); +end + +function [t,f,fit,itpar] = start(t0,lo,up,par) +% Get starting point and iteration parameters + + % Initialize + t = t0(:); + lo = lo(:); + up = up(:); + p = length(t); + D = 2 .^((1:p)'/(p+2)); + ee = find(up == lo); % Equality constraints + if ~isempty(ee) + D(ee) = ones(length(ee),1); + t(ee) = up(ee); + end + ng = find(t < lo | up < t); % Free starting values + if ~isempty(ng) + t(ng) = (lo(ng) .* up(ng).^7).^(1/8); % Starting point + end + ne = find(D ~= 1); + % Check starting point and initialize performance info + [f,fit] = objfunc(t,par); + nv = 1; + itpar = struct('D',D,'ne',ne,'lo',lo,'up',up,'perf',zeros(p+2,200*p),'nv',1); + itpar.perf(:,1) = [t; f; 1]; + if isinf(f) % Bad parameter region + return + end + if length(ng) > 1 % Try to improve starting guess + d0 = 16; d1 = 2; q = length(ng); + th = t; fh = f; jdom = ng(1); + for k = 1 : q + j = ng(k); + fk = fh; + tk = th; + DD = ones(p,1); DD(ng) = repmat(1/d1,q,1); DD(j) = 1/d0; + alpha = min(log(lo(ng) ./ th(ng)) ./ log(DD(ng))) / 5; + v = DD .^ alpha; + for rept = 1 : 4 + tt = tk .* v; + [ff, fitt] = objfunc(tt,par); nv = nv+1; + itpar.perf(:,nv) = [tt; ff; 1]; + if ff <= fk + tk = tt; + fk = ff; + if ff <= f + t = tt; + f = ff; + fit = fitt; + jdom = j; + end + else + itpar.perf(end,nv) = -1; + break + end + end + end % improve + % Update Delta + if jdom > 1 + D([1 jdom]) = D([jdom 1]); + itpar.D = D; + end + end % free variables + itpar.nv = nv; +end + +function [t,f,fit,itpar] = explore(t,f,fit,itpar,par) +% Explore step + + nv = itpar.nv; + ne = itpar.ne; + for k = 1 : length(ne) + j = ne(k); + tt = t; + DD = itpar.D(j); + if t(j) == itpar.up(j) + atbd = 1; + tt(j) = t(j) / sqrt(DD); + elseif t(j) == itpar.lo(j) + atbd = 1; + tt(j) = t(j) * sqrt(DD); + else + atbd = 0; + tt(j) = min(itpar.up(j), t(j)*DD); + end + [ff,fitt] = objfunc(tt,par); + nv = nv+1; + itpar.perf(:,nv) = [tt; ff; 2]; + if ff < f + t = tt; + f = ff; + fit = fitt; + else + itpar.perf(end,nv) = -2; + if ~atbd % try decrease + tt(j) = max(itpar.lo(j), t(j)/DD); + [ff,fitt] = objfunc(tt,par); + nv = nv+1; + itpar.perf(:,nv) = [tt; ff; 2]; + if ff < f + t = tt; + f = ff; + fit = fitt; + else + itpar.perf(end,nv) = -2; + end + end + end + end + itpar.nv = nv; +end + +function [t,f,fit,itpar] = move(th,t,f,fit,itpar,par) +% Pattern move + + nv = itpar.nv; + p = length(t); + v = t ./ th; + if all(v == 1) + itpar.D = itpar.D([2:p 1]).^.2; + return; + end + % Proper move + rept = 1; + while rept + tt = min(itpar.up, max(itpar.lo, t .* v)); + [ff,fitt] = objfunc(tt,par); + nv = nv+1; + itpar.perf(:,nv) = [tt; ff; 3]; + if ff < f + t = tt; + f = ff; + fit = fitt; + v = v .^ 2; + else + itpar.perf(end,nv) = -3; + rept = 0; + end + if any(tt == itpar.lo | tt == itpar.up) + rept = 0; + end + end + itpar.nv = nv; + itpar.D = itpar.D([2:p 1]).^.25; +end + +function [r,dr] = corrgauss(theta,d) +%CORRGAUSS Gaussian correlation function, + + [m,n] = size(d); % number of differences and dimension of data + if length(theta) == 1 + theta = repmat(theta,1,n); + elseif length(theta) ~= n + error('Length of theta must be 1 or %d',n) + end + td = d.^2 .* repmat(-theta(:).',m,1); + r = exp(sum(td, 2)); + dr = repmat(-2*theta(:).',m,1) .* d .* repmat(r,1,n); +end + +function [f,df] = regpoly0(S) +%REGPOLY0 Zero order polynomial regression function + + f = ones(size(S,1),1); + df = zeros(size(S,2),1); +end + +function [f,df] = regpoly1(S) +%REGPOLY1 First order polynomial regression function + + f = [ones(size(S,1),1),S]; + df = [zeros(size(S,2),1),eye(size(S,2))]; +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/loadData.m b/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/loadData.m new file mode 100644 index 000000000..0031f006a --- /dev/null +++ b/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/loadData.m @@ -0,0 +1,24 @@ +function Population = loadData(Problem) + +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2023 BIMK Group. You are free to use the PlatEMO for +% research purposes. All publications which use this platform or any code +% in the platform should acknowledge the use of "PlatEMO" and reference "Ye +% Tian, Ran Cheng, Xingyi Zhang, and Yaochu Jin, PlatEMO: A MATLAB platform +% for evolutionary multi-objective optimization [educational forum], IEEE +% Computational Intelligence Magazine, 2017, 12(4): 73-87". +%-------------------------------------------------------------------------- + +% This function is written by Tomoaki Takagi + + dir = fullfile(pwd,'Algorithms','Multi-objective optimization','SMOA'); + [file,path] = uigetfile('*.*','Select data',dir); + + if endsWith(file,'.mat') % PlatEMO's default save file + load(fullfile(path, file),'result'); + Population = result{end,2}; + else % Decision variables save file + Dec = load(fullfile(path, file)); + Population = Problem.Evaluation(Dec); + end +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/predictor.m b/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/predictor.m new file mode 100644 index 000000000..d167ece53 --- /dev/null +++ b/PlatEMO/Algorithms/Multi-objective optimization/I-SMOA/predictor.m @@ -0,0 +1,143 @@ +function [y,or1,or2,dmse] = predictor(x,dmodel) +%PREDICTOR Predictor for y(x) using the given DACE model. +% +% Call: y = predictor(x, dmodel) +% [y, or] = predictor(x, dmodel) +% [y, dy, mse] = predictor(x, dmodel) +% [y, dy, mse, dmse] = predictor(x, dmodel) +% +% Input +% x : trial design sites with n dimensions. +% For mx trial sites x: +% If mx = 1, then both a row and a column vector is accepted, +% otherwise, x must be an mx*n matrix with the sites stored +% rowwise. +% dmodel : Struct with DACE model; see DACEFIT +% +% Output +% y : predicted response at x. +% or : If mx = 1, then or = gradient vector/Jacobian matrix of predictor +% otherwise, or is an vector with mx rows containing the estimated +% mean squared error of the predictor +% Three or four results are allowed only when mx = 1, +% dy : Gradient of predictor; column vector with n elements +% mse : Estimated mean squared error of the predictor; +% dmse : Gradient vector/Jacobian matrix of mse + +% hbn@imm.dtu.dk +% Last update August 26, 2002 + + or1 = NaN; or2 = NaN; dmse = NaN; % Default return values + if isnan(dmodel.beta) + error('DMODEL has not been found') + end + [m,n] = size(dmodel.S); % number of design sites and number of dimensions + sx = size(x); % number of trial sites and their dimension + if min(sx) == 1 && n > 1 % Single trial point + nx = max(sx); + if nx == n + mx = 1; + x = x(:).'; + end + else + mx = sx(1); + nx = sx(2); + end + if nx ~= n + error('Dimension of trial sites should be %d',n) + end + % Normalize trial sites + x = (x - repmat(dmodel.Ssc(1,:),mx,1)) ./ repmat(dmodel.Ssc(2,:),mx,1); + q = size(dmodel.Ysc,2); % number of response functions + if mx == 1 % one site only + dx = repmat(x,m,1) - dmodel.S; % distances to design sites + if nargout > 1 % gradient/Jacobian wanted + [f,df] = feval(dmodel.regr, x); + [r,dr] = feval(dmodel.corr, dmodel.theta, dx); + % Scaled Jacobian + dy = (df * dmodel.beta).' + dmodel.gamma * dr; + % Unscaled Jacobian + or1 = dy .* repmat(dmodel.Ysc(2, :)', 1, nx) ./ repmat(dmodel.Ssc(2,:), q, 1); + if q == 1 + % Gradient as a column vector + or1 = or1'; + end + if nargout > 2 % MSE wanted + rt = dmodel.C \ r; + u = dmodel.Ft.' * rt - f.'; + v = dmodel.G \ u; + or2 = repmat(dmodel.sigma2,mx,1) .* repmat((1 + sum(v.^2) - sum(rt.^2))',1,q); + if nargout > 3 % gradient/Jacobian of MSE wanted + % Scaled gradient as a row vector + Gv = dmodel.G' \ v; + g = (dmodel.Ft * Gv - rt)' * (dmodel.C \ dr) - (df * Gv)'; + % Unscaled Jacobian + dmse = repmat(2 * dmodel.sigma2',1,nx) .* repmat(g ./ dmodel.Ssc(2,:),q,1); + if q == 1 + % Gradient as a column vector + dmse = dmse'; + end + end + end + else % predictor only + f = feval(dmodel.regr, x); + r = feval(dmodel.corr, dmodel.theta, dx); + end + % Scaled predictor + sy = f * dmodel.beta + (dmodel.gamma*r).'; + % Predictor + y = (dmodel.Ysc(1,:) + dmodel.Ysc(2,:) .* sy)'; + else % several trial sites + % Get distances to design sites + dx = zeros(mx*m,n); + kk = 1 : m; + for k = 1 : mx + dx(kk,:) = repmat(x(k,:),m,1) - dmodel.S; + kk = kk + m; + end + % Get regression function and correlation + f = feval(dmodel.regr, x); + r = feval(dmodel.corr, dmodel.theta, dx); + r = reshape(r, m, mx); + % Scaled predictor + sy = f * dmodel.beta + (dmodel.gamma * r).'; + % Predictor + y = repmat(dmodel.Ysc(1,:),mx,1) + repmat(dmodel.Ysc(2,:),mx,1) .* sy; + if nargout > 1 % MSE wanted + rt = dmodel.C \ r; + u = dmodel.G \ (dmodel.Ft.' * rt - f.'); + or1 = repmat(dmodel.sigma2,mx,1) .* repmat((1 + sum(u.^2,1) - sum(rt.^2,1))',1,q); + if nargout > 2 + disp('WARNING from PREDICTOR. Only y and or1=mse are computed') + end + end + end +end + +function [r,dr] = corrgauss(theta,d) +%CORRGAUSS Gaussian correlation function, + + [m,n] = size(d); % number of differences and dimension of data + if length(theta) == 1 + theta = repmat(theta,1,n); + elseif length(theta) ~= n + error('Length of theta must be 1 or %d',n) + end + td = d.^2 .* repmat(-theta(:).',m,1); + r = exp(sum(td, 2)); + dr = repmat(-2*theta(:).',m,1) .* d .* repmat(r,1,n); +end + +function [f,df] = regpoly0(S) +%REGPOLY0 Zero order polynomial regression function + + f = ones(size(S,1),1); + df = zeros(size(S,2),1); +end + +function [f,df] = regpoly1(S) +%REGPOLY1 First order polynomial regression function + + f = [ones(size(S,1),1),S]; + df = [zeros(size(S,2),1),eye(size(S,2))]; +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12.dat b/PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_ILD.dat similarity index 100% rename from PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12.dat rename to PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_ILD.dat diff --git a/PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12.mat b/PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_ILD.mat similarity index 100% rename from PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12.mat rename to PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_ILD.mat diff --git a/PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_UDH.dat b/PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_UDH.dat new file mode 100644 index 000000000..558002b2e --- /dev/null +++ b/PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_UDH.dat @@ -0,0 +1,10 @@ +0.0901324213671605 0.0910496017880132 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.0902953694011688 0.281833454842465 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.40044326033671 0.155958260754739 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.0711036381558104 0.574769372978128 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.503793903593041 0.415410087055306 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.307309940032745 0.676255280288509 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.808854662959556 0.305311868229164 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.0418147910107339 0.895887101971036 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.573484568986492 0.878323440646399 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.271428446406184 0.975955682916463 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 diff --git a/PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_UDH.mat b/PlatEMO/Algorithms/Multi-objective optimization/SMOA/DTLZ2_M3_D12_UDH.mat new file mode 100644 index 0000000000000000000000000000000000000000..8e2d3f7acd5c1777f606967e0dd317a876ca9127 GIT binary patch literal 1181 zcmeZu4DoSvQZUssQ1EpO(M`+DN!3vZ$Vn_o%P-2cQV4Jk_w+L}(NS9|KmensFF%k~4a6059w#RxOh`yc zNMODsB#HcMapVO=PipWy2>CdJZ7<^#7$;QJ`o0IV?fgw#!cnaIg=*A`f0=}}! z%-qfEH`f~|huGb?uWoYW@_qg#>lr-d^=H-o2{2B0)^O#f!;JF8ch8+Z@f!@vBpjz zPNC<*`4(4u9_J&G2a0+EO!uApchI0%X~G%7mR0F3mvs`hD%j}@>`r~Qq)l8^Ok|1J z(c{ivy%k=%-(Y|EdcjWSCHERwx9@Mfws1vyQ*CQ!5JMEmxCvs& z0vVPP0gqYPEEWQ}++7pzw#&&I*qyQW@pv_3J=M_@z*B z<>O%j4CQjW2>7FD>s{;?L_j*NQopQC`Tlkuk7t zgX7VOr)}lfT&h@?&Sp_~XQQn2H7a9w?dtFQSLgh@{Z?@k{|dL}J5L=C#Gd#m|3oj~ z&-=?iKAh6}wb%Bz?R(MmAN)5rJ7i9%6k|D)>|)%{thSrSiLXY zIA!~7{mP>7{qsLxTEKaK?(<(x_s`cS*T1-b*Q9jn?Qd59)pvV%^6dQ(yRQDniMg!i zZ};}SzZ>@9?S}=N@f$ZCI1;dO`nOjJzn1*f>D({Fu4gY*^l>xSbSs%6rnQ-&m{c_{q#iq{Zm-p}AFn^)erX_2V&rjgKpPPAAQ|S}`oBc2SO$BC_ zWnXA{&nkVnTIRd_E&2NbHrovzZ2P;Xr-|d-;qz@VKdx1m{jQHMy?O6%$AmYFkNUIw z{+M;Dtu$_Ko5sF*w*TuppyAz@f=i~z@7;3$)A_$sLa#q{6yBGm zB>aiRFMdP()B8fZ7XMjLTm1dgN?+moygNUjaW5%g?0AA+O!)o z+Zk?d|E9M6)S>Uw?n_