This jupyter notebook file is available at ISSP Data Repository (develop branch).

Multi-objective optimization

When there are multiple objective functions (\(p\)) to be optimized, multi-objective optimization is used.
Note that in this tutorial, “solution” means the pair of objective functions \(y = (y_1(x), y_2(x), \dots, y_p(x))\).
Define the solution size relation \(\prec\) as follows.

\(y \prec y^{'}\Longleftrightarrow \forall \ i \le p, y_i \le y^{'}_i \land \exists \ j \le p, y_j < y^{'}_j\)

A Pareto solution (in the maximization problem) is one in which no solution is larger than itself satisfying the above relations.
In other words, if you try to improve the value of any objective function, one of the other objective functions will deteriorate.
When there is a trade-off between objective functions, there are multiple Pareto solutions, and the numerical task is to find them efficiently.

PHYSBO implements a Bayesian optimization method to find Pareto solutions efficiently.

[1]:
import numpy as np
import matplotlib.pyplot as plt
import physbo
%matplotlib inline

Test functions

In this tutorial, we will use VLMOP2, which is a benchmark function for multi-objective optimization.
The number of objective functions is two.
\[\begin{split}\begin{split} y_1(\vec{x}) &= 1 - \exp\left[-\sum_{i=1}^N\left( x_i - 1/\sqrt{N}\right)^2\right] \\ y_2(\vec{x}) &= 1 - \exp\left[-\sum_{i=1}^N\left( x_i + 1/\sqrt{N}\right)^2\right], \end{split}\end{split}\]

where \(y_1\) and \(y_2\) have minimums at \(x_1 = x_2 = \cdots x_N = 1/\sqrt{N}\) and \(x_1 = x_2 = \cdots x_N = -1/\sqrt{N}\), respectively, both of which are 0. Also, the upper bound is 1.

Since PHYSBO solves a maximization problem, the objective function is again multiplied by -1.

  • Refernce

    • Van Veldhuizen, David A. Multiobjective evolutionary algorithms: classifications, analyses, and new innovations. No. AFIT/DS/ENG/99-01. AIR FORCE INST OF TECH WRIGHT-PATTERSONAFB OH SCHOOL OF ENGINEERING, 1999.

[2]:
def vlmop2_minus(x):
    n = x.shape[1]
    y1 = 1 - np.exp(-1 * np.sum((x - 1/np.sqrt(n)) ** 2, axis = 1))
    y2 = 1 - np.exp(-1 * np.sum((x + 1/np.sqrt(n)) ** 2, axis = 1))

    return np.c_[-y1, -y2]

Preparation of search candidate data

Let the input space \(\vec{x}\) be two-dimensional, and generate a grid of candidate points on [-2, 2] × [-2, 2].

[3]:
import itertools
a = np.linspace(-2,2,101)
test_X = np.array(list(itertools.product(a, a)))
[4]:
test_X
[4]:
array([[-2.  , -2.  ],
       [-2.  , -1.96],
       [-2.  , -1.92],
       ...,
       [ 2.  ,  1.92],
       [ 2.  ,  1.96],
       [ 2.  ,  2.  ]], shape=(10201, 2))
[5]:
test_X.shape
[5]:
(10201, 2)

Definition of simulator

[6]:
class Simulator(object):
    def __init__(self, X):
        self.t = vlmop2_minus(X)

    def __call__( self, action):
        return self.t[action]
[7]:
simu = Simulator(test_X)

Plotting the functions

Let’s plot each of the two objective functions. The first objective function has a peak in the upper right corner, and the second objective function has a trade-off with a peak in the lower left corner (The star is the position of the peak.).

First objective function

[8]:
plt.figure()
plt.imshow(simu.t[:,0].reshape((101,101)), vmin=-1.0, vmax=0.0, origin="lower", extent=[-2.0, 2.0, -2.0, 2.0])
plt.title("objective 1")
plt.colorbar()
plt.plot([1.0/np.sqrt(2.0)], [1.0/np.sqrt(2.0)], '*')
plt.show()
../_images/notebook_tutorial_multi_objective_12_0.png

Second objective function

[9]:
# plot objective 2
plt.figure()
plt.imshow(simu.t[:,1].reshape((101,101)), vmin=-1.0, vmax=0.0, origin="lower", extent=[-2.0, 2.0, -2.0, 2.0])
plt.title("objective 2")
plt.colorbar()
plt.plot([-1.0/np.sqrt(2.0)], [-1.0/np.sqrt(2.0)], '*')
plt.show()
../_images/notebook_tutorial_multi_objective_14_0.png

Performing optimizations.

Setting policy

Use physbo.search.discrete_multi.Policy for multi-objective optimization.
Specify the number of objective functions in num_objectives.
[10]:
policy = physbo.search.discrete_multi.Policy(test_X=test_X, num_objectives=2)
policy.set_seed(0)

As with the usual usage of physbo.search.discrete.Policy (with one objective function), optimization is done by calling the random_search or bayes_search methods. The basic API and usage are roughly the same as discrete.policy.

Checking results

#### History of evaluation values

[13]:
res_random.fx[0:res_random.num_runs]
[13]:
array([[-0.99973003, -0.62334035],
       [-0.99789981, -0.99866427],
       [-0.99090897, -0.46609239],
       [-0.92633083, -0.29208351],
       [-0.67969326, -0.99981691],
       [-0.45601619, -0.99848443],
       [-0.92670204, -0.71508873],
       [-0.58233995, -0.99952931],
       [-0.99848229, -0.96780195],
       [-0.80479332, -0.99994946],
       [-0.99700074, -0.99847873],
       [-0.9992592 , -0.93891121],
       [-0.19963873, -0.93357674],
       [-0.98046765, -0.99294428],
       [-0.99602549, -0.98620358],
       [-0.99957128, -0.9973798 ],
       [-0.52191048, -0.72845916],
       [-0.99916441, -0.40869572],
       [-0.99480122, -0.7565076 ],
       [-0.63329589, -0.63329589],
       [-0.95437918, -0.80142908],
       [-0.99899466, -0.96646532],
       [-0.19473522, -0.99445365],
       [-0.99969529, -0.52395588],
       [-0.59106078, -0.79258035],
       [-0.78231041, -0.99997141],
       [-0.99955573, -0.99930147],
       [-0.99825097, -0.99875436],
       [-0.65387719, -0.99938669],
       [-0.26132949, -0.87913689],
       [-0.74523952, -0.7724917 ],
       [-0.33644513, -0.97772424],
       [-0.99777557, -0.93373833],
       [-0.9725524 , -0.6296562 ],
       [-0.99924826, -0.84674905],
       [-0.99743705, -0.17848438],
       [-0.99994916, -0.78013199],
       [-0.99887174, -0.86936149],
       [-0.99362699, -0.99769786],
       [-0.84889217, -0.99973225],
       [-0.95713719, -0.09067194],
       [-0.17190645, -0.91382463],
       [-0.98406208, -0.94467587],
       [-0.93974303, -0.92444262],
       [-0.98414342, -0.84762781],
       [-0.99699986, -0.98166426],
       [-0.3868143 , -0.99930896],
       [-0.97964062, -0.65554315],
       [-0.99907307, -0.73466786],
       [-0.99720717, -0.85352507]])

Obtaining the Pareto solution

[14]:
front, front_num = res_random.export_pareto_front()
front, front_num
[14]:
(array([[-0.95713719, -0.09067194],
        [-0.92633083, -0.29208351],
        [-0.63329589, -0.63329589],
        [-0.52191048, -0.72845916],
        [-0.26132949, -0.87913689],
        [-0.17190645, -0.91382463]]),
 array([40,  3, 19, 16, 29, 41]))

Plotting the solution (evaluated value)

Note again that the space to be plotted is \(y = (y_1, y_2)\) and not \(x = (x_1, x_2)\).

The red plot is the Pareto solution.

[15]:
def plot_pareto_front(res):
    front, front_num = res.export_pareto_front()
    dominated = [i for i in range(res.num_runs) if i not in front_num]
    points = res.fx[dominated, :]

    plt.figure(figsize=(7, 7))
    plt.scatter(res.fx[dominated,0], res.fx[dominated,1], c = "blue")
    plt.scatter(front[:, 0], front[:, 1], c = "red")
    plt.title('Pareto front')
    plt.xlabel('Objective 1')
    plt.ylabel('Objective 2')
    plt.xlim([-1.0,0.0])
    plt.ylim([-1.0,0.0])
[16]:
plot_pareto_front(res_random)
../_images/notebook_tutorial_multi_objective_28_0.png

Calculate the volume of the dominated region

A solution that is not a Pareto solution, i.e., a solution \(y\) for which there exists a solution \(y'\) that is better than itself, is called a inferior solution (\(\exists y' y\prec y'\)). The volume of the inferior solution region, which is the space occupied by inferior solutions in the solution space (a subspace of the solution space), is one of the indicators of the results of multi-objective optimization. The larger this value is, the more good Pareto solutions are obtained.res_random.pareto.volume_in_dominance(ref_min, ref_max) calculates the volume of the inferior solution region in the hyper-rectangle specified by ref_min and ref_max.

[17]:
res_random.pareto.volume_in_dominance([-1,-1],[0,0])
[17]:
np.float64(0.2376881844865093)

Bayesian optimization

For bayes_search in the multi-objective case, score can be selected from the following method

  • HVPI (HyperVolume-based Probability of Improvement)

  • EHVI (Expected Hyper-Volume Improvement)

  • TS (Thompson Sampling)

The following 50 evaluations (10 random searches + 40 Bayesian optimizations) will be performed with different scores.

HVPI (HyperVolume-based Probability of Improvement)

The improvement probability of a non-dominated region in a multi-dimensional objective function space is obtained as a score.

  • Reference

    • Couckuyt, Ivo, Dirk Deschrijver, and Tom Dhaene. “Fast calculation of multiobjective probability of improvement and expected improvement criteria for Pareto optimization.” Journal of Global Optimization 60.3 (2014): 575-594.

[18]:
policy = physbo.search.discrete_multi.Policy(test_X=test_X, num_objectives=2)
policy.set_seed(0)

policy.random_search(max_num_probes=10, simulator=simu)
res_HVPI = policy.bayes_search(max_num_probes=40, simulator=simu, score='HVPI', interval=10)
0001-th step: f(x) = [-0.99973003 -0.62334035] (action = 836)
   Pareto set updated.
   the number of Pareto frontiers = 1

0002-th step: f(x) = [-0.99789981 -0.99866427] (action = 9404)
   Pareto set updated.
   the number of Pareto frontiers = 2

0003-th step: f(x) = [-0.99090897 -0.46609239] (action = 4664)
   Pareto set updated.
   the number of Pareto frontiers = 1

0004-th step: f(x) = [-0.92633083 -0.29208351] (action = 4780)
   Pareto set updated.
   the number of Pareto frontiers = 1

0005-th step: f(x) = [-0.67969326 -0.99981691] (action = 9566)
   Pareto set updated.
   the number of Pareto frontiers = 2

0006-th step: f(x) = [-0.45601619 -0.99848443] (action = 8852)
   Pareto set updated.
   the number of Pareto frontiers = 2

0007-th step: f(x) = [-0.92670204 -0.71508873] (action = 6088)
0008-th step: f(x) = [-0.58233995 -0.99952931] (action = 7060)
0009-th step: f(x) = [-0.99848229 -0.96780195] (action = 473)
0010-th step: f(x) = [-0.80479332 -0.99994946] (action = 7573)
Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -3.209523518535507
50 -th epoch marginal likelihood -3.2561436911697434
100 -th epoch marginal likelihood -3.257729815869572
150 -th epoch marginal likelihood -3.259506317055296
200 -th epoch marginal likelihood -3.2618022406678744
250 -th epoch marginal likelihood -3.2650078673751812
300 -th epoch marginal likelihood -3.2702146544567237
350 -th epoch marginal likelihood -3.2831467787386135
400 -th epoch marginal likelihood -3.3349571842670835
450 -th epoch marginal likelihood -3.4598938485764457
500 -th epoch marginal likelihood -3.638891636652417
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -0.39855118433009995
50 -th epoch marginal likelihood -1.1073617181516324
100 -th epoch marginal likelihood -1.48359552534615
150 -th epoch marginal likelihood -1.6402679273119745
200 -th epoch marginal likelihood -1.723529184935276
250 -th epoch marginal likelihood -1.7923359112412909
300 -th epoch marginal likelihood -1.8557670557806043
350 -th epoch marginal likelihood -1.914971589977279
400 -th epoch marginal likelihood -1.9707008234172179
450 -th epoch marginal likelihood -2.023644146709623
500 -th epoch marginal likelihood -2.0742748668215913
Done

0011-th step: f(x) = [-0.3901523  -0.82431347] (action = 5911)
   Pareto set updated.
   the number of Pareto frontiers = 2

0012-th step: f(x) = [-0.03511246 -0.9676084 ] (action = 6830)
   Pareto set updated.
   the number of Pareto frontiers = 3

0013-th step: f(x) = [-0.71403166 -0.55036801] (action = 5096)
   Pareto set updated.
   the number of Pareto frontiers = 4

0014-th step: f(x) = [-0.57031134 -0.69398025] (action = 5403)
   Pareto set updated.
   the number of Pareto frontiers = 5

0015-th step: f(x) = [-0.95456998 -0.13930743] (action = 4274)
   Pareto set updated.
   the number of Pareto frontiers = 6

0016-th step: f(x) = [-0.97105694 -0.03456373] (action = 3769)
   Pareto set updated.
   the number of Pareto frontiers = 7

0017-th step: f(x) = [-0.8209077 -0.3783301] (action = 4589)
   Pareto set updated.
   the number of Pareto frontiers = 8

0018-th step: f(x) = [-0.2166426 -0.8977806] (action = 6118)
   Pareto set updated.
   the number of Pareto frontiers = 9

0019-th step: f(x) = [-0.8884927  -0.23687603] (action = 4283)
   Pareto set updated.
   the number of Pareto frontiers = 9

0020-th step: f(x) = [-0.47482314 -0.76211783] (action = 5507)
   Pareto set updated.
   the number of Pareto frontiers = 10

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -20.47851706054039
50 -th epoch marginal likelihood -20.781777717781775
100 -th epoch marginal likelihood -21.074743824515078
150 -th epoch marginal likelihood -21.361819816983022
200 -th epoch marginal likelihood -21.643265562211905
250 -th epoch marginal likelihood -21.91931561518443
300 -th epoch marginal likelihood -22.190181963505218
350 -th epoch marginal likelihood -22.456056664334906
400 -th epoch marginal likelihood -22.717113628442412
450 -th epoch marginal likelihood -22.973511398909388
500 -th epoch marginal likelihood -23.22539459785565
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -19.220067456548204
50 -th epoch marginal likelihood -19.781203528558475
100 -th epoch marginal likelihood -20.16078232129641
150 -th epoch marginal likelihood -20.476091523476207
200 -th epoch marginal likelihood -20.77894833455666
250 -th epoch marginal likelihood -21.075707387253228
300 -th epoch marginal likelihood -21.367080634555183
350 -th epoch marginal likelihood -21.65332404734539
400 -th epoch marginal likelihood -21.93463854018043
450 -th epoch marginal likelihood -22.211199410392915
500 -th epoch marginal likelihood -22.483162429093504
Done

0021-th step: f(x) = [-0.00146848 -0.97868044] (action = 6834)
   Pareto set updated.
   the number of Pareto frontiers = 11

0022-th step: f(x) = [-9.82978321e-01 -3.32414921e-04] (action = 3264)
   Pareto set updated.
   the number of Pareto frontiers = 12

0023-th step: f(x) = [-0.65290909 -0.61133266] (action = 4999)
   Pareto set updated.
   the number of Pareto frontiers = 13

0024-th step: f(x) = [-0.76211783 -0.47482314] (action = 4693)
   Pareto set updated.
   the number of Pareto frontiers = 14

0025-th step: f(x) = [-0.30569255 -0.85754934] (action = 5814)
   Pareto set updated.
   the number of Pareto frontiers = 15

0026-th step: f(x) = [-0.11566871 -0.93445881] (action = 6223)
   Pareto set updated.
   the number of Pareto frontiers = 16

0027-th step: f(x) = [-0.93445881 -0.11566871] (action = 3877)
   Pareto set updated.
   the number of Pareto frontiers = 16

0028-th step: f(x) = [-0.85754934 -0.30569255] (action = 4386)
   Pareto set updated.
   the number of Pareto frontiers = 17

0029-th step: f(x) = [-0.61133266 -0.65290909] (action = 5101)
   Pareto set updated.
   the number of Pareto frontiers = 18

0030-th step: f(x) = [-0.52191048 -0.72845916] (action = 5305)
   Pareto set updated.
   the number of Pareto frontiers = 19

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -42.17175308256856
50 -th epoch marginal likelihood -43.80465098138666
100 -th epoch marginal likelihood -45.02627488559782
150 -th epoch marginal likelihood -45.96539736747549
200 -th epoch marginal likelihood -46.77369057378866
250 -th epoch marginal likelihood -47.54071032744218
300 -th epoch marginal likelihood -48.29092418080571
350 -th epoch marginal likelihood -49.02943117865013
400 -th epoch marginal likelihood -49.75844919206087
450 -th epoch marginal likelihood -50.47935398601936
500 -th epoch marginal likelihood -51.19300046940765
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -41.719173831287456
50 -th epoch marginal likelihood -43.05994290558705
100 -th epoch marginal likelihood -44.130659234469974
150 -th epoch marginal likelihood -45.04560599026428
200 -th epoch marginal likelihood -45.85761716495073
250 -th epoch marginal likelihood -46.625463272431865
300 -th epoch marginal likelihood -47.377755215418944
350 -th epoch marginal likelihood -48.12173437412513
400 -th epoch marginal likelihood -48.85871974035222
450 -th epoch marginal likelihood -49.58901390368543
500 -th epoch marginal likelihood -50.312730818888525
Done

0031-th step: f(x) = [-0.42677852 -0.79293383] (action = 5509)
   Pareto set updated.
   the number of Pareto frontiers = 20

0032-th step: f(x) = [-0.79293383 -0.42677852] (action = 4591)
   Pareto set updated.
   the number of Pareto frontiers = 21

0033-th step: f(x) = [-0.91382463 -0.17190645] (action = 4080)
   Pareto set updated.
   the number of Pareto frontiers = 22

0034-th step: f(x) = [-0.72845916 -0.52191048] (action = 4795)
   Pareto set updated.
   the number of Pareto frontiers = 23

0035-th step: f(x) = [-0.69201544 -0.56755251] (action = 4897)
   Pareto set updated.
   the number of Pareto frontiers = 24

0036-th step: f(x) = [-0.95078624 -0.06762287] (action = 3774)
   Pareto set updated.
   the number of Pareto frontiers = 25

0037-th step: f(x) = [-0.17190645 -0.91382463] (action = 6120)
   Pareto set updated.
   the number of Pareto frontiers = 26

0038-th step: f(x) = [-0.35362632 -0.83371008] (action = 5712)
   Pareto set updated.
   the number of Pareto frontiers = 27

0039-th step: f(x) = [-0.25896196 -0.87874951] (action = 5916)
   Pareto set updated.
   the number of Pareto frontiers = 28

0040-th step: f(x) = [-0.06762287 -0.95078624] (action = 6426)
   Pareto set updated.
   the number of Pareto frontiers = 29

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -68.14422496160624
50 -th epoch marginal likelihood -69.74821313678456
100 -th epoch marginal likelihood -71.16364516263113
150 -th epoch marginal likelihood -72.45633416637565
200 -th epoch marginal likelihood -73.7042727789136
250 -th epoch marginal likelihood -74.9391823161883
300 -th epoch marginal likelihood -76.16638542804971
350 -th epoch marginal likelihood -77.3865858356882
400 -th epoch marginal likelihood -78.60006687735121
450 -th epoch marginal likelihood -79.80705478031906
500 -th epoch marginal likelihood -81.00774602550848
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -67.44927460858037
50 -th epoch marginal likelihood -69.06511428073524
100 -th epoch marginal likelihood -70.50986339369791
150 -th epoch marginal likelihood -71.83302009477606
200 -th epoch marginal likelihood -73.1047262763335
250 -th epoch marginal likelihood -74.35727970975769
300 -th epoch marginal likelihood -75.59977538619195
350 -th epoch marginal likelihood -76.83435149512748
400 -th epoch marginal likelihood -78.06151201943835
450 -th epoch marginal likelihood -79.28144610933279
500 -th epoch marginal likelihood -80.49427803124193
Done

0041-th step: f(x) = [-0.83371008 -0.35362632] (action = 4488)
   Pareto set updated.
   the number of Pareto frontiers = 30

0042-th step: f(x) = [-0.58937008 -0.67252288] (action = 5202)
   Pareto set updated.
   the number of Pareto frontiers = 31

0043-th step: f(x) = [-0.54457573 -0.71034774] (action = 5304)
   Pareto set updated.
   the number of Pareto frontiers = 32

0044-th step: f(x) = [-0.86857621 -0.28270771] (action = 4285)
   Pareto set updated.
   the number of Pareto frontiers = 33

0045-th step: f(x) = [-0.63212056 -0.63212056] (action = 5100)
   Pareto set updated.
   the number of Pareto frontiers = 34

0046-th step: f(x) = [-0.67252288 -0.58937008] (action = 4998)
   Pareto set updated.
   the number of Pareto frontiers = 35

0047-th step: f(x) = [-0.40208972 -0.80711969] (action = 5610)
   Pareto set updated.
   the number of Pareto frontiers = 36

0048-th step: f(x) = [-0.7454381  -0.49811725] (action = 4794)
   Pareto set updated.
   the number of Pareto frontiers = 37

0049-th step: f(x) = [-0.49811725 -0.7454381 ] (action = 5406)
   Pareto set updated.
   the number of Pareto frontiers = 38

0050-th step: f(x) = [-0.77770464 -0.45044788] (action = 4692)
   Pareto set updated.
   the number of Pareto frontiers = 39

Plotting the Pareto solution

We can see that more Pareto solutions are obtained compared to random sampling.

[19]:
plot_pareto_front(res_HVPI)
../_images/notebook_tutorial_multi_objective_35_0.png

Volume of dominated region

[20]:
res_HVPI.pareto.volume_in_dominance([-1,-1],[0,0])
[20]:
np.float64(0.32877907991633726)

EHVI (Expected Hyper-Volume Improvement)

The expected improvement of the non-dominated region in the multi-dimensional objective function space is obtained as score.

  • Reference

    • Couckuyt, Ivo, Dirk Deschrijver, and Tom Dhaene. “Fast calculation of multiobjective probability of improvement and expected improvement criteria for Pareto optimization.” Journal of Global Optimization 60.3 (2014): 575-594.

[21]:
policy = physbo.search.discrete_multi.Policy(test_X=test_X, num_objectives=2)
policy.set_seed(0)

policy.random_search(max_num_probes=10, simulator=simu)
res_EHVI = policy.bayes_search(max_num_probes=40, simulator=simu, score='EHVI', interval=10)
0001-th step: f(x) = [-0.99973003 -0.62334035] (action = 836)
   Pareto set updated.
   the number of Pareto frontiers = 1

0002-th step: f(x) = [-0.99789981 -0.99866427] (action = 9404)
   Pareto set updated.
   the number of Pareto frontiers = 2

0003-th step: f(x) = [-0.99090897 -0.46609239] (action = 4664)
   Pareto set updated.
   the number of Pareto frontiers = 1

0004-th step: f(x) = [-0.92633083 -0.29208351] (action = 4780)
   Pareto set updated.
   the number of Pareto frontiers = 1

0005-th step: f(x) = [-0.67969326 -0.99981691] (action = 9566)
   Pareto set updated.
   the number of Pareto frontiers = 2

0006-th step: f(x) = [-0.45601619 -0.99848443] (action = 8852)
   Pareto set updated.
   the number of Pareto frontiers = 2

0007-th step: f(x) = [-0.92670204 -0.71508873] (action = 6088)
0008-th step: f(x) = [-0.58233995 -0.99952931] (action = 7060)
0009-th step: f(x) = [-0.99848229 -0.96780195] (action = 473)
0010-th step: f(x) = [-0.80479332 -0.99994946] (action = 7573)
Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -3.209523518535507
50 -th epoch marginal likelihood -3.2561436911697434
100 -th epoch marginal likelihood -3.257729815869572
150 -th epoch marginal likelihood -3.259506317055296
200 -th epoch marginal likelihood -3.2618022406678744
250 -th epoch marginal likelihood -3.2650078673751812
300 -th epoch marginal likelihood -3.2702146544567237
350 -th epoch marginal likelihood -3.2831467787386135
400 -th epoch marginal likelihood -3.3349571842670835
450 -th epoch marginal likelihood -3.4598938485764457
500 -th epoch marginal likelihood -3.638891636652417
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -0.39855118433009995
50 -th epoch marginal likelihood -1.1073617181516324
100 -th epoch marginal likelihood -1.48359552534615
150 -th epoch marginal likelihood -1.6402679273119745
200 -th epoch marginal likelihood -1.723529184935276
250 -th epoch marginal likelihood -1.7923359112412909
300 -th epoch marginal likelihood -1.8557670557806043
350 -th epoch marginal likelihood -1.914971589977279
400 -th epoch marginal likelihood -1.9707008234172179
450 -th epoch marginal likelihood -2.023644146709623
500 -th epoch marginal likelihood -2.0742748668215913
Done

0011-th step: f(x) = [-9.00606888e-04 -9.80950206e-01] (action = 6935)
   Pareto set updated.
   the number of Pareto frontiers = 2

0012-th step: f(x) = [-0.54603076 -0.71127314] (action = 5404)
   Pareto set updated.
   the number of Pareto frontiers = 3

0013-th step: f(x) = [-0.7666416  -0.48481035] (action = 4993)
   Pareto set updated.
   the number of Pareto frontiers = 4

0014-th step: f(x) = [-0.24028954 -0.95990013] (action = 5626)
   Pareto set updated.
   the number of Pareto frontiers = 5

0015-th step: f(x) = [-0.95713719 -0.09067194] (action = 4073)
   Pareto set updated.
   the number of Pareto frontiers = 6

0016-th step: f(x) = [-0.30791078 -0.85800445] (action = 5914)
   Pareto set updated.
   the number of Pareto frontiers = 7

0017-th step: f(x) = [-0.97621647 -0.0052244 ] (action = 3467)
   Pareto set updated.
   the number of Pareto frontiers = 8

0018-th step: f(x) = [-0.86941464 -0.28728372] (action = 4185)
   Pareto set updated.
   the number of Pareto frontiers = 8

0019-th step: f(x) = [-0.67252288 -0.58937008] (action = 4998)
   Pareto set updated.
   the number of Pareto frontiers = 9

0020-th step: f(x) = [-0.24028954 -0.95990013] (action = 7226)
   Pareto set updated.
   the number of Pareto frontiers = 10

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -17.256832207034954
50 -th epoch marginal likelihood -17.70987258414165
100 -th epoch marginal likelihood -17.978813161119295
150 -th epoch marginal likelihood -18.20902541636026
200 -th epoch marginal likelihood -18.42887383064057
250 -th epoch marginal likelihood -18.642976990250432
300 -th epoch marginal likelihood -18.852196397138677
350 -th epoch marginal likelihood -19.056813755107562
400 -th epoch marginal likelihood -19.257038614163122
450 -th epoch marginal likelihood -19.453048039816018
500 -th epoch marginal likelihood -19.644993031408248
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -16.974228421583867
50 -th epoch marginal likelihood -17.412773390586732
100 -th epoch marginal likelihood -17.6957396729131
150 -th epoch marginal likelihood -17.947485717899337
200 -th epoch marginal likelihood -18.19073249547074
250 -th epoch marginal likelihood -18.427704212860476
300 -th epoch marginal likelihood -18.658813644519498
350 -th epoch marginal likelihood -18.884284104555697
400 -th epoch marginal likelihood -19.10431964671836
450 -th epoch marginal likelihood -19.31910873872588
500 -th epoch marginal likelihood -19.528823244919753
Done

0021-th step: f(x) = [-0.45044788 -0.77770464] (action = 5508)
   Pareto set updated.
   the number of Pareto frontiers = 11

0022-th step: f(x) = [-0.15266624 -0.92125491] (action = 6221)
   Pareto set updated.
   the number of Pareto frontiers = 10

0023-th step: f(x) = [-0.80711969 -0.40208972] (action = 4590)
   Pareto set updated.
   the number of Pareto frontiers = 11

0024-th step: f(x) = [-0.98483911 -0.00295954] (action = 3163)
   Pareto set updated.
   the number of Pareto frontiers = 12

0025-th step: f(x) = [-0.91382463 -0.17190645] (action = 4080)
   Pareto set updated.
   the number of Pareto frontiers = 13

0026-th step: f(x) = [-0.61133266 -0.65290909] (action = 5201)
   Pareto set updated.
   the number of Pareto frontiers = 14

0027-th step: f(x) = [-3.32414921e-04 -9.82978321e-01] (action = 6936)
   Pareto set updated.
   the number of Pareto frontiers = 15

0028-th step: f(x) = [-0.72845916 -0.52191048] (action = 4895)
   Pareto set updated.
   the number of Pareto frontiers = 16

0029-th step: f(x) = [-0.3783301 -0.8209077] (action = 5711)
   Pareto set updated.
   the number of Pareto frontiers = 17

0030-th step: f(x) = [-9.82978321e-01 -3.32414921e-04] (action = 3264)
   Pareto set updated.
   the number of Pareto frontiers = 17

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -40.56517293280312
50 -th epoch marginal likelihood -41.830958947827085
100 -th epoch marginal likelihood -42.67299215293333
150 -th epoch marginal likelihood -43.40527956813362
200 -th epoch marginal likelihood -44.119164651126496
250 -th epoch marginal likelihood -44.82488438364018
300 -th epoch marginal likelihood -45.52360072557966
350 -th epoch marginal likelihood -46.21583030400157
400 -th epoch marginal likelihood -46.90190490077359
450 -th epoch marginal likelihood -47.58205426649934
500 -th epoch marginal likelihood -48.2564517202437
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -38.64708359440495
50 -th epoch marginal likelihood -40.29723156259631
100 -th epoch marginal likelihood -41.50105212639616
150 -th epoch marginal likelihood -42.39506537989113
200 -th epoch marginal likelihood -43.16816415460113
250 -th epoch marginal likelihood -43.90802002518212
300 -th epoch marginal likelihood -44.634574259968524
350 -th epoch marginal likelihood -45.35124261625998
400 -th epoch marginal likelihood -46.05893403939048
450 -th epoch marginal likelihood -46.75815946038287
500 -th epoch marginal likelihood -47.44928513058065
Done

0031-th step: f(x) = [-0.00295954 -0.98483911] (action = 6937)
0032-th step: f(x) = [-0.06762287 -0.95078624] (action = 6426)
   Pareto set updated.
   the number of Pareto frontiers = 18

0033-th step: f(x) = [-0.23687603 -0.8884927 ] (action = 6017)
   Pareto set updated.
   the number of Pareto frontiers = 19

0034-th step: f(x) = [-0.00295954 -0.98483911] (action = 7037)
0035-th step: f(x) = [-0.9830327  -0.00352624] (action = 3164)
0036-th step: f(x) = [-0.83371008 -0.35362632] (action = 4488)
   Pareto set updated.
   the number of Pareto frontiers = 20

0037-th step: f(x) = [-0.49811725 -0.7454381 ] (action = 5406)
   Pareto set updated.
   the number of Pareto frontiers = 21

0038-th step: f(x) = [-9.00606888e-04 -9.80950206e-01] (action = 6835)
   Pareto set updated.
   the number of Pareto frontiers = 22

0039-th step: f(x) = [-0.98483911 -0.00295954] (action = 3263)
0040-th step: f(x) = [-0.00557976 -0.98649648] (action = 7038)
Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -60.35218224451241
50 -th epoch marginal likelihood -62.31324230703647
100 -th epoch marginal likelihood -64.03507521142387
150 -th epoch marginal likelihood -65.58859324220903
200 -th epoch marginal likelihood -66.99580206729125
250 -th epoch marginal likelihood -68.30020077573657
300 -th epoch marginal likelihood -69.54647337575287
350 -th epoch marginal likelihood -70.76184092943669
400 -th epoch marginal likelihood -71.95882264318004
450 -th epoch marginal likelihood -73.14338125074447
500 -th epoch marginal likelihood -74.31855291263867
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -62.25021556098837
50 -th epoch marginal likelihood -63.99696283844089
100 -th epoch marginal likelihood -65.48521482593569
150 -th epoch marginal likelihood -66.82111661606083
200 -th epoch marginal likelihood -68.08675696269277
250 -th epoch marginal likelihood -69.31967194576625
300 -th epoch marginal likelihood -70.53336812110848
350 -th epoch marginal likelihood -71.73451334728779
400 -th epoch marginal likelihood -72.92618059866014
450 -th epoch marginal likelihood -74.10947899659575
500 -th epoch marginal likelihood -75.28474615660663
Done

0041-th step: f(x) = [-9.80950206e-01 -9.00606888e-04] (action = 3265)
   Pareto set updated.
   the number of Pareto frontiers = 23

0042-th step: f(x) = [-0.8884927  -0.23687603] (action = 4183)
   Pareto set updated.
   the number of Pareto frontiers = 24

0043-th step: f(x) = [-0.00146848 -0.97868044] (action = 6834)
   Pareto set updated.
   the number of Pareto frontiers = 25

0044-th step: f(x) = [-0.93445881 -0.11566871] (action = 3877)
   Pareto set updated.
   the number of Pareto frontiers = 26

0045-th step: f(x) = [-0.98107174 -0.00727443] (action = 3165)
0046-th step: f(x) = [-0.00352624 -0.9830327 ] (action = 6836)
0047-th step: f(x) = [-0.77770464 -0.45044788] (action = 4692)
   Pareto set updated.
   the number of Pareto frontiers = 27

0048-th step: f(x) = [-0.00352624 -0.9830327 ] (action = 7036)
0049-th step: f(x) = [-0.98649648 -0.00557976] (action = 3162)
0050-th step: f(x) = [-0.63212056 -0.63212056] (action = 5100)
   Pareto set updated.
   the number of Pareto frontiers = 28

Plotting the Pareto solution

[22]:
plot_pareto_front(res_EHVI)
../_images/notebook_tutorial_multi_objective_41_0.png

Volume of dominated region

[23]:
res_EHVI.pareto.volume_in_dominance([-1,-1],[0,0])
[23]:
np.float64(0.3200467412741881)

TS (Thompson Sampling)

In Thompson Sampling for the single objective case, at each candidate (test_X), sampling is performed from the posterior distribution of the objective function, and the candidate with the largest value is recommended as the next search point. In the multi-objective case, one candidate is randomly selected as the next search point from among the candidates with the maximum value based on the Pareto rule for the sampled values, i.e., the Pareto-optimal candidates.

  • Reference

    • Yahyaa, Saba Q., and Bernard Manderick. “Thompson sampling for multi-objective multi-armed bandits problem.” Proc. Eur. Symp. Artif. Neural Netw., Comput. Intell. Mach. Learn.. 2015.

[24]:
policy = physbo.search.discrete_multi.Policy(test_X=test_X, num_objectives=2)
policy.set_seed(0)

policy.random_search(max_num_probes=10, simulator=simu)
res_TS = policy.bayes_search(max_num_probes=40, simulator=simu, score='TS', interval=10, num_rand_basis=5000)
0001-th step: f(x) = [-0.99973003 -0.62334035] (action = 836)
   Pareto set updated.
   the number of Pareto frontiers = 1

0002-th step: f(x) = [-0.99789981 -0.99866427] (action = 9404)
   Pareto set updated.
   the number of Pareto frontiers = 2

0003-th step: f(x) = [-0.99090897 -0.46609239] (action = 4664)
   Pareto set updated.
   the number of Pareto frontiers = 1

0004-th step: f(x) = [-0.92633083 -0.29208351] (action = 4780)
   Pareto set updated.
   the number of Pareto frontiers = 1

0005-th step: f(x) = [-0.67969326 -0.99981691] (action = 9566)
   Pareto set updated.
   the number of Pareto frontiers = 2

0006-th step: f(x) = [-0.45601619 -0.99848443] (action = 8852)
   Pareto set updated.
   the number of Pareto frontiers = 2

0007-th step: f(x) = [-0.92670204 -0.71508873] (action = 6088)
0008-th step: f(x) = [-0.58233995 -0.99952931] (action = 7060)
0009-th step: f(x) = [-0.99848229 -0.96780195] (action = 473)
0010-th step: f(x) = [-0.80479332 -0.99994946] (action = 7573)
Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -3.209523518535507
50 -th epoch marginal likelihood -3.2561436911697434
100 -th epoch marginal likelihood -3.257729815869572
150 -th epoch marginal likelihood -3.259506317055296
200 -th epoch marginal likelihood -3.2618022406678744
250 -th epoch marginal likelihood -3.2650078673751812
300 -th epoch marginal likelihood -3.2702146544567237
350 -th epoch marginal likelihood -3.2831467787386135
400 -th epoch marginal likelihood -3.3349571842670835
450 -th epoch marginal likelihood -3.4598938485764457
500 -th epoch marginal likelihood -3.638891636652417
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood 1.6231643893527536
50 -th epoch marginal likelihood 0.9161844782048458
100 -th epoch marginal likelihood 0.5685391937325868
150 -th epoch marginal likelihood 0.4352074454732371
200 -th epoch marginal likelihood 0.4046905941601331
250 -th epoch marginal likelihood 0.40039478628316516
300 -th epoch marginal likelihood 0.4000108419175117
350 -th epoch marginal likelihood 0.3999892703426049
400 -th epoch marginal likelihood 0.399988546087064
450 -th epoch marginal likelihood 0.3999885330679991
500 -th epoch marginal likelihood 0.3999885329713031
Done

0011-th step: f(x) = [-0.92567449 -0.99858284] (action = 4035)
0012-th step: f(x) = [-0.40231263 -0.99932643] (action = 7860)
   Pareto set updated.
   the number of Pareto frontiers = 3

0013-th step: f(x) = [-0.98603674 -0.99111929] (action = 2004)
0014-th step: f(x) = [-0.99813428 -0.80708194] (action = 5259)
0015-th step: f(x) = [-0.1290265  -0.97076113] (action = 6030)
   Pareto set updated.
   the number of Pareto frontiers = 2

0016-th step: f(x) = [-0.31326331 -0.99785753] (action = 8451)
0017-th step: f(x) = [-0.06477106 -0.98577901] (action = 6537)
   Pareto set updated.
   the number of Pareto frontiers = 3

0018-th step: f(x) = [-0.00727443 -0.98107174] (action = 6735)
   Pareto set updated.
   the number of Pareto frontiers = 3

0019-th step: f(x) = [-0.23644203 -0.9003642 ] (action = 6318)
   Pareto set updated.
   the number of Pareto frontiers = 4

0020-th step: f(x) = [-0.6174769 -0.950085 ] (action = 4518)
Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -10.078833143340244
50 -th epoch marginal likelihood -11.372542035317903
100 -th epoch marginal likelihood -12.096279974270505
150 -th epoch marginal likelihood -12.690922552401627
200 -th epoch marginal likelihood -13.219727233175465
250 -th epoch marginal likelihood -13.681451256767232
300 -th epoch marginal likelihood -14.074623220134443
350 -th epoch marginal likelihood -14.402312179038432
400 -th epoch marginal likelihood -14.671730361070669
450 -th epoch marginal likelihood -14.892691354177359
500 -th epoch marginal likelihood -15.075844833346665
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -15.112224858853768
50 -th epoch marginal likelihood -16.181986185590105
100 -th epoch marginal likelihood -16.833787053279423
150 -th epoch marginal likelihood -17.438417148847172
200 -th epoch marginal likelihood -18.007972646158954
250 -th epoch marginal likelihood -18.51649515565874
300 -th epoch marginal likelihood -18.945546768437563
350 -th epoch marginal likelihood -19.28948877533065
400 -th epoch marginal likelihood -19.55626174975576
450 -th epoch marginal likelihood -19.762790969117418
500 -th epoch marginal likelihood -19.927950829796334
Done

0021-th step: f(x) = [-0.47482314 -0.76211783] (action = 5407)
   Pareto set updated.
   the number of Pareto frontiers = 5

0022-th step: f(x) = [-0.99728354 -0.22242321] (action = 3050)
   Pareto set updated.
   the number of Pareto frontiers = 6

0023-th step: f(x) = [-0.70361786 -0.5838437 ] (action = 5297)
   Pareto set updated.
   the number of Pareto frontiers = 7

0024-th step: f(x) = [-0.65048192 -0.65048192] (action = 5500)
   Pareto set updated.
   the number of Pareto frontiers = 8

0025-th step: f(x) = [-0.5757763  -0.69787234] (action = 5503)
   Pareto set updated.
   the number of Pareto frontiers = 9

0026-th step: f(x) = [-0.49811725 -0.7454381 ] (action = 5406)
   Pareto set updated.
   the number of Pareto frontiers = 10

0027-th step: f(x) = [-0.19329537 -0.90599453] (action = 6119)
   Pareto set updated.
   the number of Pareto frontiers = 11

0028-th step: f(x) = [-0.99990551 -0.74008536] (action = 2630)
0029-th step: f(x) = [-0.35569141 -0.83424136] (action = 5812)
   Pareto set updated.
   the number of Pareto frontiers = 12

0030-th step: f(x) = [-0.52191048 -0.72845916] (action = 5405)
   Pareto set updated.
   the number of Pareto frontiers = 13

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -33.03566521657211
50 -th epoch marginal likelihood -34.21087943010022
100 -th epoch marginal likelihood -35.26691136227762
150 -th epoch marginal likelihood -36.1692116919876
200 -th epoch marginal likelihood -36.9095962531232
250 -th epoch marginal likelihood -37.52053460682146
300 -th epoch marginal likelihood -38.05614980685903
350 -th epoch marginal likelihood -38.55795777844784
400 -th epoch marginal likelihood -39.04407269367799
450 -th epoch marginal likelihood -39.51955099606786
500 -th epoch marginal likelihood -39.98554713717896
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -40.362135886235095
50 -th epoch marginal likelihood -41.21185747261464
100 -th epoch marginal likelihood -41.71091427454593
150 -th epoch marginal likelihood -42.17891729040115
200 -th epoch marginal likelihood -42.63020005251695
250 -th epoch marginal likelihood -43.067870534527344
300 -th epoch marginal likelihood -43.494469044584584
350 -th epoch marginal likelihood -43.91164175202283
400 -th epoch marginal likelihood -44.32037337251974
450 -th epoch marginal likelihood -44.72129928652454
500 -th epoch marginal likelihood -45.11490990259672
Done

0031-th step: f(x) = [-0.67356913 -0.590682  ] (action = 5098)
   Pareto set updated.
   the number of Pareto frontiers = 14

0032-th step: f(x) = [-0.22412685 -0.89875721] (action = 6218)
   Pareto set updated.
   the number of Pareto frontiers = 14

0033-th step: f(x) = [-0.08294372 -0.9457967 ] (action = 6325)
   Pareto set updated.
   the number of Pareto frontiers = 14

0034-th step: f(x) = [-0.52496048 -0.73019147] (action = 5205)
0035-th step: f(x) = [-0.89875721 -0.22412685] (action = 4382)
   Pareto set updated.
   the number of Pareto frontiers = 14

0036-th step: f(x) = [-0.84649506 -0.40332189] (action = 3988)
   Pareto set updated.
   the number of Pareto frontiers = 15

0037-th step: f(x) = [-0.80711969 -0.40208972] (action = 4590)
   Pareto set updated.
   the number of Pareto frontiers = 15

0038-th step: f(x) = [-0.69201544 -0.56755251] (action = 4997)
   Pareto set updated.
   the number of Pareto frontiers = 15

0039-th step: f(x) = [-0.28270771 -0.86857621] (action = 5915)
   Pareto set updated.
   the number of Pareto frontiers = 16

0040-th step: f(x) = [-0.0706017  -0.95094348] (action = 6526)
   Pareto set updated.
   the number of Pareto frontiers = 17

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -56.21546310712146
50 -th epoch marginal likelihood -58.25622836432893
100 -th epoch marginal likelihood -59.75108821359915
150 -th epoch marginal likelihood -61.078458173593916
200 -th epoch marginal likelihood -62.26921857098807
250 -th epoch marginal likelihood -63.345215370503524
300 -th epoch marginal likelihood -64.3448690638929
350 -th epoch marginal likelihood -65.30367860992325
400 -th epoch marginal likelihood -66.24167890691578
450 -th epoch marginal likelihood -67.16646905837175
500 -th epoch marginal likelihood -68.08025664281062
Done

Start the initial hyper parameter searching ...
Done

Start the hyper parameter learning ...
0 -th epoch marginal likelihood -65.71713782535159
50 -th epoch marginal likelihood -66.80270167547336
100 -th epoch marginal likelihood -67.74510791293163
150 -th epoch marginal likelihood -68.65801740864794
200 -th epoch marginal likelihood -69.55912214517568
250 -th epoch marginal likelihood -70.44948901839517
300 -th epoch marginal likelihood -71.3294562629428
350 -th epoch marginal likelihood -72.19939545215031
400 -th epoch marginal likelihood -73.05968426337662
450 -th epoch marginal likelihood -73.91069526436273
500 -th epoch marginal likelihood -74.75279082216392
Done

0041-th step: f(x) = [-0.85800445 -0.30791078] (action = 4286)
   Pareto set updated.
   the number of Pareto frontiers = 18

0042-th step: f(x) = [-0.95545924 -0.05507465] (action = 3673)
   Pareto set updated.
   the number of Pareto frontiers = 18

0043-th step: f(x) = [-0.92175727 -0.15807186] (action = 4179)
   Pareto set updated.
   the number of Pareto frontiers = 19

0044-th step: f(x) = [-0.13297899 -0.92804454] (action = 6222)
   Pareto set updated.
   the number of Pareto frontiers = 20

0045-th step: f(x) = [-0.15807186 -0.92175727] (action = 6021)
   Pareto set updated.
   the number of Pareto frontiers = 21

0046-th step: f(x) = [-0.7462514 -0.4997207] (action = 4894)
   Pareto set updated.
   the number of Pareto frontiers = 22

0047-th step: f(x) = [-0.40399998 -0.80773592] (action = 5510)
   Pareto set updated.
   the number of Pareto frontiers = 23

0048-th step: f(x) = [-0.63329589 -0.63329589] (action = 5200)
   Pareto set updated.
   the number of Pareto frontiers = 23

0049-th step: f(x) = [-0.98131247 -0.01990033] (action = 3565)
   Pareto set updated.
   the number of Pareto frontiers = 24

0050-th step: f(x) = [-0.78401544 -0.46604924] (action = 4992)
   Pareto set updated.
   the number of Pareto frontiers = 25

Plotting the Pareto solution

[25]:
plot_pareto_front(res_TS)
../_images/notebook_tutorial_multi_objective_47_0.png

Volume of dominated region

[26]:
res_TS.pareto.volume_in_dominance([-1,-1],[0,0])
[26]:
np.float64(0.31732213827454625)