1% STK_EXAMPLE_MISC04  Pareto front simulation
2%
3% DESCRIPTION
4%
5%   We consider a bi-objective optimization problem, where the objective
6%   functions are modeled as a pair of independent stationary Gaussian
7%   processes with a Matern 5/2 anisotropic covariance function.
8%
9%   Figure (a): represent unconditional realizations of the Pareto front and
10%      and estimate of the probability of being non-dominated at each point
11%      of the objective space.
12%
13%   Figure (b): represent conditional realizations of the Pareto front and
14%      and estimate of the posteriorior probability of being non-dominated
15%      at each point of the objective space.
16%
17% EXPERIMENTAL FUNCTION WARNING
18%
19%    This script uses the stk_plot_probdom2d function, which is currently
20%    considered an experimental function.  Read the help for more information.
21%
22% REFERENCE
23%
24%  [1] Michael Binois, David Ginsbourger and Olivier Roustant,  Quantifying
25%      uncertainty on Pareto fronts with Gaussian Process conditional simu-
26%      lations,  European J. of Operational Research, 2043(2):386-394, 2015.
27%
28% See also: stk_plot_probdom2d
29
30% Copyright Notice
31%
32%    Copyright (C) 2017, 2019 CentraleSupelec
33%    Copyright (C) 2014 SUPELEC
34%
35%    Author:  Julien Bect  <julien.bect@centralesupelec.fr>
36
37% Copying Permission Statement
38%
39%    This file is part of
40%
41%            STK: a Small (Matlab/Octave) Toolbox for Kriging
42%               (http://sourceforge.net/projects/kriging)
43%
44%    STK is free software: you can redistribute it and/or modify it under
45%    the terms of the GNU General Public License as published by the Free
46%    Software Foundation,  either version 3  of the License, or  (at your
47%    option) any later version.
48%
49%    STK is distributed  in the hope that it will  be useful, but WITHOUT
50%    ANY WARRANTY;  without even the implied  warranty of MERCHANTABILITY
51%    or FITNESS  FOR A  PARTICULAR PURPOSE.  See  the GNU  General Public
52%    License for more details.
53%
54%    You should  have received a copy  of the GNU  General Public License
55%    along with STK.  If not, see <http://www.gnu.org/licenses/>.
56
57stk_disp_examplewelcome;
58
59
60%% Objective functions
61
62DIM = 2;
63BOX = [[0; 5] [0; 3]];
64
65f1 = @(x) 4 * x(:,1) .^ 2 + 4 * x(:,2) .^ 2;
66f2 = @(x) (x(:,1) - 5) .^ 2 + (x(:,2) - 5) .^ 2;
67
68
69%% Data
70
71n_obs = 10;
72
73x_obs = stk_sampling_maximinlhs (n_obs, [], BOX);
74
75z_obs = zeros (n_obs, 2);
76z_obs(:, 1) = f1 (x_obs.data);  % Remark: f1 (x_obs) should be OK...
77z_obs(:, 2) = f2 (x_obs.data);  %         ... but see Octave bug #49267
78
79
80%% Stationary GP models
81
82model1 = stk_model ('stk_materncov52_aniso', DIM);
83model1.param = stk_param_estim (model1, x_obs, z_obs(:, 1));
84
85model2 = stk_model ('stk_materncov52_aniso', DIM);
86model2.param = stk_param_estim (model2, x_obs, z_obs(:, 2));
87
88stk_figure ('stk_example_misc04 (a)');
89
90stk_plot_probdom2d (model1, model2, BOX);
91
92
93%% Conditionned GP models
94
95stk_figure ('stk_example_misc04 (b)');
96
97stk_plot_probdom2d ( ...
98    stk_model_gpposterior (model1, x_obs, z_obs(:, 1)), ...
99    stk_model_gpposterior (model2, x_obs, z_obs(:, 2)), BOX);
100
101
102%!test stk_example_misc04;  close all;
103