any_dominated#
- moocore.any_dominated(data, maximise=False, keep_weakly=False)[source]#
Test whether the input data contains any (weakly-)dominated point.
This function is equivalent to
np.logical_not(moocore.is_nondominated(x)).any()
, but faster.See also
For details about parameters and the calculation, see
is_nondominated()
.- Returns:
bool
– ReturnsTrue
if the input array contains at least one point that is weakly-dominated by another point in the array. Withkeep_weakly=True
, the point must be dominated not just a duplicate.
Examples
>>> S = np.array([[1, 1], [0, 1], [1, 0], [1, 0]]) >>> moocore.is_nondominated(S) array([False, True, True, False]) >>> moocore.any_dominated(S) True >>> moocore.any_dominated(moocore.filter_dominated(S)) False >>> S = np.array([[0, 1], [1, 0], [1, 0]]) >>> moocore.is_nondominated(S, keep_weakly=True) array([ True, True, True]) >>> moocore.any_dominated(S, keep_weakly=True) False