Skip to main content

Pareto reflection based multi-objective optimization

Project description

Python Test & Lint Python Version

documentation//notebooks

Paref - using and building problem tailored MOO

A multi-objective optimization (MOO) problem comes with an idea of what properties identified (Pareto) points must satisfy. The fact that these characteristics are fulfilled is what makes a MOO successful in the first place. Why not construct a MOO algorithm which searches exactly for those properties? With the language of PAreto REFlections this is now possible. This package contains...

  • a series of ready-to-use MOO algorithms corresponding to frequently targeted properties
  • a framework for you to implement your problem tailored MOO algorithm
  • generic and intuitive interfaces for MOO algorithms, black-box functions and more, so solving a MOO problem with user-defined properties with Paref requires only minimal effort

See the official documentation for more information.

Content

Installation

The official release is available at PyPi:

pip install paref

Usage

Solving an MOO problem with Paref consists of the following steps

  1. Define design and target space
  2. Define desired properties of Pareto points
  3. Initialize corresponding MOO algorithm
  4. Implement and initialize bbf
  5. Apply problem tailored MOO algorithm to blackbox function

This may look as follows:

  1. We use a mathematical test function with three input dimensions all between zero and one (i.e. design space is given by three-dimensional unit cube) and with two output dimensions (i.e. target space is the real plane)
  2. We want to have an idea of the "dimension" of the Pareto front (i.e. the Pareto points representing the minima in components) with minimum number of evaluations
  3. Accordingly, we choose the FindEdgePoints algorithm:
from paref.moo_algorithms.multi_dimensional.find_edge_points import FindEdgePoints

moo = FindEdgePoints()
  1. We implement and initialize the blackbox function in the Paref blackbox function interface
import numpy as np
from paref.black_box_functions.design_space.bounds import Bounds
from paref.interfaces.moo_algorithms.blackbox_function import BlackboxFunction


class TestFunction(BlackboxFunction):
    def __call__(self, x: np.ndarray) -> np.ndarray:
        y = np.array([np.sum(x ** 2), x[0]])
        self._evaluations.append([x, y])
        return y

    @property
    def dimension_design_space(self) -> int:
        return 3

    @property
    def dimension_target_space(self) -> int:
        return 2

    @property
    def design_space(self) -> Bounds:
        return Bounds(upper_bounds=np.ones(self.dimension_design_space),
                      lower_bounds=-np.zeros(self.dimension_design_space))


blackbox_function = TestFunction()
  1. We apply the MOO algorithm to the blackbox function with a maximum number of five iterations and print the so found Pareto front:
from paref.moo_algorithms.stopping_criteria.max_iterations_reached import MaxIterationsReached

moo(blackbox_function=blackbox_function,
    stopping_criteria=MaxIterationsReached(max_iterations=5))
print(f"Calculated Pareto front: {blackbox_function.pareto_front}")

What are properties of Pareto points?

A MOO problem comes with an idea of what properties identified (Pareto) points must satisfy. The fact that these characteristics are fulfilled is what makes a MOO successful in the first place.

In mathematical terms, we understand properties of Pareto points as being element of a (mostly implicit defined) subset of the Pareto front.

They include but are certainly not limited to the following:

Property Graphic Example Algorithm(s) Sequence Pareto reflection
Being an edge point Edge point FindEdgePoints FindEdgePointsSequence
Filling a gap Fill gap FillGap
Being evenly distributed Edge point FindEdgePoints followed by FillGapsOfParetoFront
Being constrained to a defined area Fill gap RestrictByPoint

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paref-0.1.8.tar.gz (27.8 kB view hashes)

Uploaded Source

Built Distribution

paref-0.1.8-py3-none-any.whl (47.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page