[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Motivation and Context / Related issue
Why is this change required?
This change introduces the SignificantFigure layer into the Nevergrad optimization library, addressing a specific need for precise control over the numerical precision of parameters during the optimization process. The current version of Nevergrad does not offer an in-built method to enforce a specific number of significant figures in its parametrization process. This limitation can lead to challenges in scenarios where the precision of parameters, defined by the number of significant digits, is crucial, such as in scientific computations, financial models, or engineering simulations.
What problem does it solve?
The SignificantFigure layer solves the problem of rounding parameter values to a defined number of significant figures. This is particularly useful when working with parameters that can vary over wide ranges, where the precision in terms of decimal places may not be consistent across different magnitudes. The introduction of this layer ensures that the parameters are handled consistently, irrespective of their scale, enhancing the robustness and accuracy of the optimization results.
Furthermore, this change enables Nevergrad users to more closely align the optimization process with domain-specific requirements regarding numerical precision, thereby expanding the library's applicability and utility in various technical and scientific fields.
How Has This Been Tested (if it applies)
tested localy
Checklist
if this functionality is needed in nevergrad, I will complete all the necessary items required for merge (nevergrad/contributing.html)
[ ] The documentation is up-to-date with the changes I made.
[x] I have read the CONTRIBUTING document and completed the CLA (see CLA).
[ ] All tests passed, and additional code has been covered with new tests.
add: class SignificantFigure(Int): Rounds data to a specified number of significant figures.
Types of changes
Motivation and Context / Related issue
Why is this change required?
This change introduces the SignificantFigure layer into the Nevergrad optimization library, addressing a specific need for precise control over the numerical precision of parameters during the optimization process. The current version of Nevergrad does not offer an in-built method to enforce a specific number of significant figures in its parametrization process. This limitation can lead to challenges in scenarios where the precision of parameters, defined by the number of significant digits, is crucial, such as in scientific computations, financial models, or engineering simulations.
What problem does it solve?
The SignificantFigure layer solves the problem of rounding parameter values to a defined number of significant figures. This is particularly useful when working with parameters that can vary over wide ranges, where the precision in terms of decimal places may not be consistent across different magnitudes. The introduction of this layer ensures that the parameters are handled consistently, irrespective of their scale, enhancing the robustness and accuracy of the optimization results.
Furthermore, this change enables Nevergrad users to more closely align the optimization process with domain-specific requirements regarding numerical precision, thereby expanding the library's applicability and utility in various technical and scientific fields.
How Has This Been Tested (if it applies)
tested localy
Checklist
if this functionality is needed in nevergrad, I will complete all the necessary items required for merge (nevergrad/contributing.html)