moocore.epsilon_additive#

moocore.epsilon_additive(data, /, ref, *, maximise=False)[source]#

Additive epsilon metric.

data and ref must all be larger than 0 for epsilon_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 the read_datasets() function, remove the last (set) column

  • ref (ArrayLike) – Reference point set as a numpy array or list. Must have same number of columns as a single point in the dataset

  • maximise (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