is_nondominated#
- moocore.is_nondominated(data, maximise=False, keep_weakly=False)[source]#
 Identify dominated points according to Pareto optimality.
Given \(n\) points of dimension \(m\), the current implementation uses the well-known \(O(n \log n)\) dimension-sweep algorithm [1] for \(m \leq 3\) and the naive \(O(m n^2)\) algorithm for \(m \geq 4\). The best-known \(O(n(\log_2 n)^{m-2})\) algorithm for \(m \geq 4\) [1] is not implemented yet.
- Parameters:
 data (
ArrayLike) – Array of numerical values, where each row gives the coordinates of a point in objective space. If the array is created by theread_datasets()function, remove the last column.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 boolean values, with one value per objective. Also accepts a 1D numpy array with value 0/1 for each objective.keep_weakly (
bool, default:False) – IfFalse, returnFalsefor any duplicates of nondominated points except the first one.
- Returns:
 ndarray– Returns a boolean array of the same length as the number of rows of data, whereTruemeans that the point is not dominated by any other point.
See also
filter_dominatedto filter out dominated points.
pareto_rankto rank points according to Pareto dominance.
References
Examples
>>> S = np.array([[1, 1], [0, 1], [1, 0], [1, 0]]) >>> moocore.is_nondominated(S) array([False, True, True, False]) >>> moocore.filter_dominated(S) array([[0, 1], [1, 0]]) >>> moocore.is_nondominated(S, keep_weakly=True) array([False, True, True, True]) >>> moocore.filter_dominated(S, keep_weakly=True) array([[0, 1], [1, 0], [1, 0]])