Setting the optimize configuration

DistributionFits.AbstractDistributionFitOptimizerType
AbstractDistributionFitOptimizer
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 optimizer used in 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 DistribuitonFits.jl has to either

  • explicitly invoke using Optim, or
  • call set_optimizer with the concrete subtype of AbstractDistributionFitOptimizer for which the corresponding optimize method is implemented.
source