paref.pareto_reflections.avoid_points#
Classes
|
Avoid certain areas/points (Pareto reflection) |
- class paref.pareto_reflections.avoid_points.AvoidPoints(nadir: ndarray, epsilon_avoiding_points: ndarray, epsilon: Real | ndarray)[source]#
Bases:
ParetoReflectionAvoid certain areas/points (Pareto reflection)
When to use#
This Pareto reflection should be used if Pareto points are desired which have a minimum distance to some points in each component
What it does#
The Pareto points of this map are all the Pareto points which have distance at least epsilon (to be specified) in each component
Mathematical formula#
Denote by D the set of points which should be avoided, let epsilon be some positive real number and n some nadir (i.e. n dominated by all points). Then,
\[p(x) = n\]if x plus epsilon is dominated or equal to d for some d in D and
\[p(x) = x\]else. Notice that each so found Pareto point has distance at least epsilon in each component from every point in D.
Examples
Define the nadir and the points which should be avoided
>>> import numpy as np >>> nadir, epsilon_avoiding_points, epsilon = np.array([3,7]), np.array([[2,1],[1,5]]), 1
Initialize the EpsilonAvoiding
>>> pareto_reflection = AvoidPoints(nadir=nadir, epsilon_avoiding_points=epsilon_avoiding_points, epsilon=epsilon)
Calling it to (1,1), i.e. calculating
\[p(1,1)=(3,7)\]since (1,1) is dominated by (2,1)-1 yields:
>>> pareto_reflection(np.ones(2)) array([3, 7])
Specify the nadir and the to be avoided points
- param nadir:
nadir (dominated by all points) stored in 1 dimensional array of length n
- type nadir:
np.ndarray
- param epsilon_avoiding_points:
avoided points stored in 2-dimensional array with first dimension corresponding to the points
- type epsilon_avoiding_points:
np.ndarray
- param epsilon:
value which is subtracted from avoided points
- type epsilon:
Union[numbers.Real, np.ndarray])
- __call__(x: ndarray)[source]#
Calculate the epsilon avoiding function
- Parameters:
x –
np.ndarray – input vector stored in 1 dimensional array of length n
- Returns:
value of the epsilon avoiding function
- Return type:
float
- property dimension_codomain: int#
- property dimension_domain: int#