set.seed(42)
df <- data.frame(
cost = runif(50, 10, 100),
performance = runif(50, 0, 1)
)
head(df)
#> cost performance
#> 1 92.33254 0.33342721
#> 2 94.33679 0.34674825
#> 3 35.75256 0.39848541
#> 4 84.74029 0.78469278
#> 5 67.75710 0.03893649
#> 6 56.71864 0.74879539is_optimal <- pareto_2d(
x = df$cost,
y = df$performance,
x_bigger_better = FALSE,
y_bigger_better = TRUE
)
# How many optimal points did we find?
sum(is_optimal)
#> [1] 4result <- plot_pareto(
df,
x_col = "cost",
y_col = "performance",
x_bigger_better = FALSE,
y_bigger_better = TRUE,
show_all_points = TRUE
)
result$plot
Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.
This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.