MurrellGroup / MolecularEvolution.jl

A Julia framework for developing phylogenetic models
MIT License
11 stars 4 forks source link

Add Brent's method for minimization #15

Closed nossleinad closed 6 months ago

nossleinad commented 7 months ago

This pull request implements Brent's method for minimization and calls it brents_method_minimize. It also makes it an option as an optimizer for branchlength_optim!. This method can be used for 1D unimodal optimization problems and it doesn't use derivatives.

Additionally, this pull request generalizes golden_section_maximize and brents_method_minimize with univariate_maximize. It dispatches on the two different subtypes, GoldenSectionOptand BrentsMethodOpt, of the new UnivariateOpt-type.

codecov-commenter commented 7 months ago

Codecov Report

Attention: Patch coverage is 98.36066% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 32.99%. Comparing base (6930e8d) to head (3abdcf3).

Files Patch % Lines
src/core/algorithms/branchlength_optim.jl 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #15 +/- ## ========================================== + Coverage 31.23% 32.99% +1.76% ========================================== Files 30 30 Lines 2126 2182 +56 ========================================== + Hits 664 720 +56 Misses 1462 1462 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.