# Usage Of DACE Toolbox Lien-Chi Lai, Optimization Lab 2009/10/09.

## Presentation on theme: "Usage Of DACE Toolbox Lien-Chi Lai, Optimization Lab 2009/10/09."— Presentation transcript:

Usage Of DACE Toolbox Lien-Chi Lai, Optimization Lab 2009/10/09

Command and Parameter (1/5) Command and ParameterUsage of DACE Toolbox4  Command  >> [dmodel,perf] = dacefit(S,Y,regr,corr,theta0)  >> pred = predictor(x, dmodel)  Parameter  S experimental points (m-by-n)  Y responses at S (m-by-1)  regr regression function  corr correlation function  theta0 parameter of correlation function (1-by-1 if all dimensions are identical, or n-by-1)  x p trial points with n dimensions (p-by-n)  pred predicted responses (p-by-1)

Command and Parameter (2/5) Command and ParameterUsage of DACE Toolbox5  Command  >> [dmodel,perf] =... dacefit(S,Y,regr,corr,theta0,lob,upb)  >> pred = predictor(x, dmodel)  Parameter  lob,upb optional parameter, if present, then should be vectors of the same length as theta0 dim. should be same as the one of theta0

Command and Parameter (3/5)  Command  >> [dmodel,perf] =... dacefit(S,Y,regr,corr,theta0,lob,upb)  >> pred = predictor(x, dmodel)  Parameter  dmodel DACE model, struct with regr, corr, theta, beta …  perf information about the optimization, struct with nv, … Command and ParameterUsage of DACE Toolbox6

Command and Parameter (4/5)  Regression Models  regpoly0 Zero order polynomial  regpoly1 First order polynomial  regpoly2 Second order polynomial  Correlation Models  correxp Exponential  correxpg Generalized exponential  corrgauss Gaussian  corrlin Linear  corrspherical Spherical  corrspline Cubic spline Command and ParameterUsage of DACE Toolbox7

Command and Parameter (5/5)  Command  >> x = gridsamp([1 1;3 3], 3) x = 1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 3 3 Command and ParameterUsage of DACE Toolbox8

Example  >> [dmodel, perf] = dacefit(S, Y, @regpoly0,... @corrgauss, 10);  >> [dmodel, perf] = dacefit(S, Y, @regpoly0,... @corrgauss, 10, 0.1, 20);  >> [dmodel, perf] = dacefit(S, Y, @regpoly0,... @corrgauss, [10 10],... [0.1 0.1], [20 20]);  >> pred = predictor(x, dmodel); ExampleUsage of DACE Toolbox9

Example  Complete code for Branin function ExampleUsage of DACE Toolbox10

Appendix – Complete Code (1/2) % S = lhsamp(25,2); load S.mat S = [S(:,1)*15-5, S(:,2)*15]; Y = ft_branin(S(:,1), S(:,2)); x = gridsamp([-5 0;10 15], 25); theta = [10 10]; lob = [1e-1 1e-1]; upb = [20 20]; [dmodel, perf] = dacefit(S, Y, @regpoly0,... @corrgauss, theta, lob, upb); % [dmodel, perf] = dacefit(S, Y, @regpoly0,... @corrgauss, 1); pred = predictor(x, dmodel); Appendix – Complete CodeUsage of DACE Toolbox11

Appendix – Complete Code (1/2) [x_grid, y_grid] = meshgrid(-5:15/24:10, 0:15/24:15); surf(x_grid, y_grid, reshape(pred, 25, 25)); view(2); xlabel('x'); ylabel('y'); title('Surrogate Surface'); % final_theta = dmodel.theta; % function z = ft_branin(x, y) % z = (y - 5.1*x.^2/(4*pi*pi) + 5*x/pi -6).^2 +... 10*(1-1/(8*pi))*cos(x) + 10; Appendix – Complete CodeUsage of DACE Toolbox12

Similar presentations