Setting the optimize configuration
DistributionFits.AbstractDistributionFitOptimizer — TypeAbstractDistributionFitOptimizer
OptimOptimizer <: AbstractDistributionFitOptimizer
set_optimizer(::AbstractDistributionFitOptimizer)DistributionFits.jl uses the following interface to opimize an univariate function f on bounded interval [lower,upper]:
optimize(f, ::AbstractDistributionFitOptimizer, lower, upper)Returning an object with fields minimizer and converged.
DistributionFits.set_optimizer(::AbstractDistributionFitOptimizer) sets the specific AbstractDistributionFitOptimizer that is used throughout the package for calling the optimize function. Specializing this function with a concrete type, allows using different optimization packages.
By default, when the Optim.jl package is in scope, the OptimOptimizer is set, which implements the interface by using Optim's optimize function.
Hence, the module using DistributionFits.jl has to either
- explicitly invoke
using Optim, or - call
set_optimizerwith the concrete subtype ofAbstractDistributionFitOptimizerfor which the correspondingoptimizemethod is implemented.
Developers implementing usage of a different specific optimizer see code in ext/DistributionFitsOptimExt.