moocore.epsilon_additive#
- moocore.epsilon_additive(data, /, ref, *, maximise=False)[source]#
Additive epsilon metric.
data
andref
must all be larger than 0 forepsilon_mult()
.See also
For details of the calculation, see Epsilon metric.
- Parameters:
data (
ArrayLike
) – Numpy array of numerical values, where each row gives the coordinates of a point in objective space. If the array is created from theread_datasets()
function, remove the last (set) columnref (
ArrayLike
) – Reference point set as a numpy array or list. Must have same number of columns as a single point in the datasetmaximise (
bool
|list
[bool
], default:False
) – Whether the objectives must be maximised instead of minimised. Either a single boolean value that applies to all objectives or a list of booleans, with one value per objective. Also accepts a 1d numpy array with value 0/1 for each objective
- Returns:
float
– A single numerical value
Examples
>>> dat = np.array([[3.5,5.5], [3.6,4.1], [4.1,3.2], [5.5,1.5]]) >>> ref = np.array([[1, 6], [2,5], [3,4], [4,3], [5,2], [6,1]]) >>> moocore.epsilon_additive(dat, ref = ref) 2.5 >>> moocore.epsilon_mult(dat, ref = ref) 3.5