Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/haozeke/xtsci-function

Function designs and trial functions
https://github.com/haozeke/xtsci-function

Last synced: 22 days ago
JSON representation

Function designs and trial functions

Awesome Lists containing this project

README

        

* About ~xtsci-function~

A repository with a function base class for ease of exploration, with optimizers
and saddle search methods. The repository also includes standard test functions
from statistics and chemistry.

Trial functions implemented:
- [X] Rosenbrock function
- [X] Himmelblau's function
- [X] Eggholder's function
- [X] Muller-Brown function

** Features
- Allows masks for fixing degrees of freedom

** Usage
Until bindings are ready, ~tiny_cli.cpp~ can be edited and run with the ~python~ scripts
to get a visual for the trial functions.

#+begin_src bash
meson setup bbdir
meson compile -C bbdir
./bbdir/CppCore/tiny_cli
# Example
python scripts/plot_2d.py "rosen.npz"
python scripts/plot_2d.py "himmelblau.npz" --num_minima 4 --exclusion_radius 0.03
python scripts/plot_2d.py "mullerbrown.npz" --num_minima 3 --exclusion_radius 0.8
python scripts/plot_2d.py "eggholder.npz" --num_minima 5 --exclusion_radius 100
python scripts/plot_2d.py "branin.npz" --num_minima 4
#+end_src

** Components
The heart of the library is the ~xts::func~ namespace.

- Note that this uses designated initializers, a C++20 feature.

** Tests

For the most part these are computed using reference implementations in ~R~, or
via ~sympy~. These "generating" scripts are also in the ~scripts~ folder.

** Provenance
References are provided, but these were originally conceived for use with
[[https://github.com/HaoZeke/xtsci-optimize][xtsci-optimize]]. Most of these are derived from the work of [[https://www.sfu.ca/~ssurjano/index.html][Surjanovic and
Bingham]] (Virtual Library of Simulation Experiments).

** License
MIT.