Skip to content

v0.5.0

Latest
Compare
Choose a tag to compare
@timmens timmens released this 26 Aug 14:10
· 2 commits to main since this release
786247c

Summary

This is a major release with several breaking changes and deprecations. In this
release we started implementing two major enhancement proposals and renamed the package
from estimagic to optimagic (while keeping the estimagic namespace for the estimation
capabilities).

The implementation of the two enhancement proposals is not complete and will likely
take until version 0.6.0. However, all breaking changes and deprecations (with the
exception of a minor change in benchmarking) are already implemented such that updating
to version 0.5.0 is future proof.

Pull Requests

  • #500 removes the dashboard, the support for simopt optimizers and the
    derivative_plot (@janosg)
  • #502 renames estimagic to optimagic (@janosg)
  • #504 aligns maximize and minimize more closely with scipy. All related
    deprecations and breaking changes are listed below. As a result, scipy code that uses
    minimize with the arguments x0, fun, jac and method will run without changes
    in optimagic. Similarly, to OptimizeResult gets some aliases so it behaves more
    like SciPy's.
  • #506 introduces the new Bounds object and deprecates lower_bounds,
    upper_bounds, soft_lower_bounds and soft_upper_bounds (@janosg)
  • #507 updates the infrastructure so we can make parallel releases under the names
    optimagic and estimagic (@timmens)
  • #508 introduces the new ScalingOptions object and deprecates the
    scaling_options argument of maximize and minimize (@timmens)
  • #512 implements the new interface for objective functions and derivatives
    (@janosg)
  • #513 implements the new optimagic.MultistartOptions object and deprecates the
    multistart_options argument of maximize and minimize (@timmens)
  • #514 and #516 introduce the NumdiffResult object that is returned from
    first_derivative and second_derivative. It also fixes several bugs in the
    pytree handling in first_derivative and second_derivative and deprecates
    Richardson Extrapolation and the key (@timmens)
  • #517 introduces the new NumdiffOptions object for configuring numerical
    differentiation during optimization or estimation (@timmens)
  • #519 rewrites the logging code and introduces new LogOptions objects
    (@schroedk)
  • #521 introduces the new internal algorithm interface.
    (@janosg and @mpetrosian)
  • #522 introduces the new Constraint objects and deprecates passing
    dictionaries or lists of dictionaries as constraints (@timmens)

Breaking changes

  • When providing a path for the argument logging of the functions
    maximize and minimize and the file already exists, the default
    behavior is to raise an error now. Replacement or extension
    of an existing file must be explicitly configured.
  • The argument if_table_exists in log_options has no effect anymore and a
    corresponding warning is raised.
  • OptimizeResult.history is now a optimagic.History object instead of a
    dictionary. Dictionary style access is implemented but deprecated. Other dictionary
    methods might not work.
  • The result of first_derivative and second_derivative is now a
    optimagic.NumdiffResult object instead of a dictionary. Dictionary style access is
    implemented but other dictionary methods might not work.
  • The dashboard is removed
  • The derivative_plot is removed.
  • Optimizers from Simopt are removed.
  • Passing callables with the old internal algorithm interface as algorithm to
    minimize and maximize is not supported anymore. Use the new
    Algorithm objects instead. For examples see: https://tinyurl.com/24a5cner

Deprecations

  • The criterion argument of maximize and minimize is renamed to fun (as in
    SciPy).
  • The derivative argument of maximize and minimize is renamed to jac (as
    in SciPy)
  • The criterion_and_derivative argument of maximize and minimize is renamed
    to fun_and_jac to align it with the other names.
  • The criterion_kwargs argument of maximize and minimize is renamed to
    fun_kwargs to align it with the other names.
  • The derivative_kwargs argument of maximize and minimize is renamed to
    jac_kwargs to align it with the other names.
  • The criterion_and_derivative_kwargs argument of maximize and minimize is
    renamed to fun_and_jac_kwargs to align it with the other names.
  • Algorithm specific convergence and stopping criteria are renamed to align them more
    with NlOpt and SciPy names.
    • convergence_relative_criterion_tolerance -> convergence_ftol_rel
    • convergence_absolute_criterion_tolerance -> convergence_ftol_abs
    • convergence_relative_params_tolerance -> convergence_xtol_rel
    • convergence_absolute_params_tolerance -> convergence_xtol_abs
    • convergence_relative_gradient_tolerance -> convergence_gtol_rel
    • convergence_absolute_gradient_tolerance -> convergence_gtol_abs
    • convergence_scaled_gradient_tolerance -> convergence_gtol_scaled
    • stopping_max_criterion_evaluations -> stopping_maxfun
    • stopping_max_iterations -> stopping_maxiter
  • The arguments lower_bounds, upper_bounds, soft_lower_bounds and
    soft_upper_bounds are deprecated and replaced by optimagic.Bounds. This affects
    maximize, minimize, estimate_ml, estimate_msm, slice_plot and several
    other functions.
  • The log_options argument of minimize and maximize is deprecated. Instead,
    LogOptions objects can be passed under the logging argument.
  • The class OptimizeLogReader is deprecated and redirects to
    SQLiteLogReader.
  • The scaling_options argument of maximize and minimize is deprecated. Instead a
    ScalingOptions object can be passed under the scaling argument that was previously
    just a bool.
  • Objective functions that return a dictionary with the special keys "value",
    "contributions" and "root_contributions" are deprecated. Instead, likelihood and
    least-squares functions are marked with a mark.likelihood or mark.least_squares
    decorator. There is a detailed how-to guide that shows the new behavior. This affects
    maximize, minimize, slice_plot and other functions that work with objective
    functions.
  • The multistart_options argument of minimize and maximize is deprecated. Instead,
    a MultistartOptions object can be passed under the multistart argument.
  • Richardson Extrapolation is deprecated in first_derivative and second_derivative
  • The key argument is deprecated in first_derivative and second_derivative
  • Passing dictionaries or lists of dictionaries as constraints to maximize or
    minimize is deprecated. Use the new Constraint objects instead.