9
$\begingroup$

Reading this question:

How do I estimate the Pareto front in my multiobjective optimization problem?

I found @Daniel Lichtbau's interesting answer. Yet I don't know how such an "internal function" can be called and used.

$\endgroup$

1 Answer 1

11
$\begingroup$

Update: Internal`ListMin is now available as ResourceFunction["ParetoListMinima"] in Wolfram Resource Function Respository.

ResourceFunction["ParetoListMinima"]

Original answer:

lists = RandomInteger[10, {20, 3}];
pareto = Internal`ListMin[lists];

Row[{Panel[Grid[lists /. Thread[pareto -> (Style[#, Red, Bold] & /@ # & /@ pareto)]]],
  ListPointPlot3D[{lists, pareto}, PlotStyle -> {Blue, Red}, 
    ImageSize -> 400, PlotRangePadding -> 1, BoxRatios -> 1, 
    AspectRatio -> 1] /. Point -> (Sphere[#, .5] &)}]

Mathematica graphics

lists = RandomInteger[10, {20, 2}];
pareto = Internal`ListMin[lists];

Row[{Panel[Grid[lists /. Thread[pareto -> (Style[#, Red, Bold] & /@ # & /@ pareto)]]], 
  ListPlot[{lists, pareto}, PlotStyle -> {Blue, Red},PlotMarkers -> {\[FilledSquare], 20}, 
   ImageSize -> 400, Frame -> True, PlotRangePadding -> 1, AspectRatio -> 1]}]

Mathematica graphics

If the input list is a Dataset you can use

lists =Dataset[ RandomInteger[10, {20, 3}]];
pareto = Internal`ListMin[Normal@lists];

Row[{Panel[Grid[Normal@lists /. Thread[pareto -> (Style[#, Red, Bold] & /@ # & /@ pareto)]]],
  ListPointPlot3D[{Normal@lists, pareto}, PlotStyle -> {Blue, Red}, 
    ImageSize -> 400, PlotRangePadding -> 1, BoxRatios -> 1, 
    AspectRatio -> 1] /. Point -> (Sphere[#, .5] &)}]

Mathematica graphics

$\endgroup$
5
  • $\begingroup$ Thanks, this is just about what I'm looking for. The only problem is that I am using a "Dataset" function instead of a real list. I'll quickly add an example! $\endgroup$ May 3, 2016 at 9:48
  • 1
    $\begingroup$ @MirkoAveta, please see the last example. $\endgroup$
    – kglr
    May 3, 2016 at 9:57
  • $\begingroup$ Than you very much!!! $\endgroup$ May 3, 2016 at 9:58
  • $\begingroup$ I directly copied your first example code and ran it on V13.2. Why should the sphere marked in red display in blue? (V13.3 is fine). @kglr $\endgroup$
    – Vancheers
    Nov 22, 2023 at 3:24
  • $\begingroup$ @Vancheers, I am using V13.3.1. I don't know what changed in v13.2 (V13.3) that caused (fixed) the issue. $\endgroup$
    – kglr
    Nov 22, 2023 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.