| is_nondominated | R Documentation |
Identify nondominated points with is_nondominated() and remove dominated
ones with filter_dominated().
any_dominated() quickly detects if a set contains any dominated point.
is_nondominated(x, maximise = FALSE, keep_weakly = FALSE)
filter_dominated(x, maximise = FALSE, keep_weakly = FALSE)
any_dominated(x, maximise = FALSE, keep_weakly = FALSE)
x |
|
maximise |
|
keep_weakly |
|
Given n points of dimension m, the current implementation always
uses the best-known O(n \log n) dimension-sweep algorithm
\citepKunLucPre1975jacm for m \leq 3. For m \geq 4, functions
is_nondominated() and filter_dominated() use the best-known O(n
\log^{m-2} n) algorithm \citepKunLucPre1975jacm when n > 16, and
the naive O(m n^2) algorithm otherwise. Function any_dominated()
always uses the naive algorithm for m \geq 4.
is_nondominated() returns a logical vector of the same length
as the number of rows of data, where TRUE means that the
point is not dominated by any other point.
filter_dominated() returns a matrix or data.frame with only mutually nondominated points.
any_dominated() returns TRUE if x contains any (weakly-)dominated points, FALSE otherwise.
Manuel López-Ibáñez
pareto_rank()
S = matrix(c(1,1,0,1,1,0,1,0), ncol = 2, byrow = TRUE)
is_nondominated(S)
is_nondominated(S, maximise = TRUE)
filter_dominated(S)
filter_dominated(S, keep_weakly = TRUE)
any_dominated(S)
any_dominated(S, keep_weakly = TRUE)
any_dominated(filter_dominated(S))
path_A1 <- file.path(system.file(package="moocore"),"extdata","ALG_1_dat.xz")
set <- read_datasets(path_A1)[,1:2]
is_nondom <- is_nondominated(set)
cat("There are ", sum(is_nondom), " nondominated points\n")
if (requireNamespace("graphics", quietly = TRUE)) {
plot(set, col = "blue", type = "p", pch = 20)
ndset <- filter_dominated(set)
points(ndset[order(ndset[,1]),], col = "red", pch = 21)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.