cavalab / brush

An interpretable machine learning library
http://cavalab.org/brush/
GNU General Public License v3.0
2 stars 0 forks source link

Coherence and error handling #43

Closed gAldeia closed 4 months ago

gAldeia commented 1 year ago

Improving coherence of size and depth and error handling when sampling in search space

The size and depth of the program were calculated as the size and depth of the underlying tree structure holding the nodes, but this didn't take into account the weights and multiplication operators in weighted nodes.

Also, mutation and crossover may fail if the search space does not hold a non-empty solution space, and we needed to handle this more gracefully than just ignoring it.

This pull request improved the source code in order to solve these problems.

This branch was originally intended to implement a multi-armed bandit (MAB) schema to optimize mutation weights during the evolution, but we felt the need of having better estimates of the size and depth of the program, and we found some particular cases where the search space could fail (implying that mutation would fail as well). The modifications made to achieve a good code to start working on MAB involved several redesigns that should not be kept apart from the main branch.

All documentation in the PR is up to date with these changes, and it passes all cpp and python tests.


Major changes

Minor changes

Bug fixes