Skip to content

This repository contains an implementation of LIPO, LIPO-E, AdaLIPO, and AdaLIPO-E.

License

Notifications You must be signed in to change notification settings

gaetanserre/LIPO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LIPO, AdaLIPO, LIPO+, and AdaLIPO+ implementation

This repository contains an implementation of the following algorithms:

LIPO+ and AdaLIPO+ are empirical enhancements introduced of LIPO and AdaLIPO, introduced in the paper Experimental Improvements of Global Optimization Algorithms for Lipschitz Functions. A demo of these algorithms is available on the IPOL website.

Usage

You need to create a class for your function to maximize. This class must be named Function and follow the following interface:

import numpy as np

class Function:
  def __init__(self) -> None:
    self.bounds = bounds # (min, max) tuple for each dimension (numpy array)
    self.k = k # Lipschitz constant (float)
    pass

  def __call__(self, x: np.ndarray) -> float:
    # Closed form of the function to maximize
    pass

The file containing the class must be in the functions folder.

Several examples are available in the functions folder.

Then, you can run the algorithm with the following command:

python src/main.py --function <path_to_your_function_class> -n <number_of_function_eval>

Some optional arguments are available, you can see them with the --help flag.

About

This repository contains an implementation of LIPO, LIPO-E, AdaLIPO, and AdaLIPO-E.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages