Make the structure of the sampling function more general to allow the user to specify the estimator for the expectations and reproducibility. Also propose some implementations a few commonly used estimators.
This PR introduces:
Modify the sampling function to take two additional arguments: the fitness extractor and the descriptor extractor
Provide 4 expectation extractors: average, median, mode and closest, and 3 reproducibility extractors: std, mad and iqr
Define a new sampling_reproducibility function that returns both the expectations and reproducibility of fitness and descriptor
Update the sampling testing to test these additions
Checks
[ ] a clear description of the PR has been added
[ ] sufficient tests have been written
[ ] relevant section added to the documentation
[ ] example notebook added to the repo
[ ] clean docstrings and comments have been written
[ ] if any issue/observation has been discovered, a new issue has been opened
Future improvements
The functions used by MAP-Elites Low-spread could be define as extractor in sampling.py as well to avoid code duplication.
Related issues: \
Make the structure of the sampling function more general to allow the user to specify the estimator for the expectations and reproducibility. Also propose some implementations a few commonly used estimators.
This PR introduces:
Checks
Future improvements
The functions used by MAP-Elites Low-spread could be define as extractor in sampling.py as well to avoid code duplication.