Recent Releases of kafe2

kafe2 - v2.11.0-pre1

Compared to v2.10.0:

  • Dropped Python 3.8, added Python 3.13.
  • Changed the model function code to consistently use function signatures instead of bytecode. This makes it possible to override a function's signature for use with kafe2 by simply setting the function's __signature__ property.

- Python
Published by JohannesGaessler 9 months ago

kafe2 - v2.10.0

Features

  • Added QR decomposition for numerical stability (https://github.com/PhiLFitters/kafe2/commit/0e27fb4dc9ec09abe5fac49db9d2890c9236bd32), to use the old but faster Cholesky decomposition use the "fast" flag to the cost function (https://github.com/PhiLFitters/kafe2/commit/784e0c0902a398729c88ca4761eedee8fd1d2905)
  • Added warnings when starting values/errors are undefined, as well as for very large and small values bad for numerical stability (56e9a848460a01f542153db192a7f54cd437bb84 and fcd19255032398e8bd8c0c4c7b724b75955dbf8e)
  • At least two significant digits for CL annotations in the Contour Profiler are shown (https://github.com/PhiLFitters/kafe2/commit/265685a5f29927b740cab50c21b0998b42440b13)
  • Added initial documentation of the Contour Profiler (https://github.com/PhiLFitters/kafe2/commit/2a4d7174eadd97504a1c9c5e2d7f19c73e9af95c and https://github.com/PhiLFitters/kafe2/commit/d3cfb140b90a66c05ff5b111732abd714bd41906) # Fixes
  • Removed the dependency on scipy.misc.derivative which is being removed with SciPy v1.12.0. Instead, numdifftools (which is already a kafe2 dependency anyway) is used (https://github.com/PhiLFitters/kafe2/commit/b221b577e92abef3f2430eb5b35604239dc1068c)
  • Fixed example 004 data generation (https://github.com/PhiLFitters/kafe2/commit/7e57077f7fb0e486e2a3d5a0aa2cfc67ff9ba2e4)
  • Fixed a crash when plotting the error band when at least one parameter is fixed (https://github.com/PhiLFitters/kafe2/commit/e3d26cb175fe4421e6127a3084db813812950e97)

Full Changelog: https://github.com/PhiLFitters/kafe2/compare/v2.9.0...v2.10.0

- Python
Published by cverstege 11 months ago

kafe2 - v2.10.0-pre2

Fixed a crash when plotting the error band when at least one parameter is fixed.

- Python
Published by JohannesGaessler about 1 year ago

kafe2 - v2.10.0-pre1

Pre-release for v2.10.0: * Removed the dependency on scipy.misc.derivative which is being removed with SciPy v1.12.0. Instead, numdifftools (which is already a kafe2 dependency anyway) is used (b221b577e92abef3f2430eb5b35604239dc1068c) * At least two significant digits for CL annotations in the Contour Profiler are shown (265685a5f29927b740cab50c21b0998b42440b13) * Fixed example 004 data generation (7e57077f7fb0e486e2a3d5a0aa2cfc67ff9ba2e4) * Added initial documentation of the Contour Profiler (2a4d7174eadd97504a1c9c5e2d7f19c73e9af95c and d3cfb140b90a66c05ff5b111732abd714bd41906)

Full Changelog: https://github.com/PhiLFitters/kafe2/compare/v2.9.0...v2.10.0-pre1

- Python
Published by JohannesGaessler about 1 year ago

kafe2 - v2.9.0

Compared to v2.8.3:

  • Implemented the ability to do pull plots in the same way you can do ratio and residual plots.
  • Extended the wrapper interface to allow the definition of pull, ratio, and residual plots.
  • Added a new example under examples/009_histogram_fit/03_SplusBfit.py.

- Python
Published by JohannesGaessler over 1 year ago

kafe2 - v2.8.3

  • Fixed #241 (Different behavior depending on parameter names in model)

- Python
Published by MitchiLaser over 2 years ago

kafe2 - Iminuit Compatibility

Fixed a problem with fix parameters in Iminuit which was described in #240

- Python
Published by MitchiLaser over 2 years ago

kafe2 - v2.8.1

Relative to v2.8.0:

  • Matplotlib 3.8 compatibility, minimum Matplotlib version is 3.4
  • Added a Makefile
  • Moved packaging configuration to pyproject.toml. With this release, Python 3.6 is no longer supported
  • Added linting for the project and reformatted many files

- Python
Published by MitchiLaser over 2 years ago

kafe2 - v2.8.0 - Summer Term 2023

Compared to v2.7.0:

  • New wrapper functions for CustomFit, HistFit, IndexedFit, and UnbinnedFit.
  • All wrapper functions now accept a model function as its first argument and the data afterwards. The interface in v2.7.0 was accidentally built to the wrong specification, and thus had to be remade. The intent is to use the exact same order of arguments as e.g. SciPy curve_fit.
  • The interface for creating or plotting profiles has been extended. You can now specify explicit upper or lower bounds as well as confidence levels for the intervals. See examples/003profiling/04onesidedlimit.py for an example.
  • HistFit/hist_fit can now accept NumPy histograms as data.
  • Revised the documentation, particularly the theory chapter.
  • Fixed incorrect warning when creating a HistFit.

Compared to v2.8.0-pre1:

  • Ability to fix parameters when using wrapper functions.
  • Ability to construct HistContainer from only bin edges.
  • Better logic for error band and density label defaults.
  • Ability to scale fonts in plots.

- Python
Published by JohannesGaessler over 2 years ago

kafe2 - v2.8.0-pre1

Compared to v2.7.0:

  • New wrapper functions for CustomFit, HistFit, IndexedFit, and UnbinnedFit.
  • All wrapper functions now accept a model function as its first argument and the data afterwards. The interface in v2.7.0 was accidentally built to the wrong specification, and thus had to be remade. The intent is to use the exact same order of arguments as e.g. SciPy curve_fit.
  • The interface for creating or plotting profiles has been extended. You can now specify explicit upper or lower bounds as well as confidence levels for the intervals. See examples/003profiling/04onesidedlimit.py for an example.
  • HistFit/hist_fit can now accept NumPy histograms as data.
  • Revised the documentation, particularly the theory chapter.
  • Fixed incorrect warning when creating a HistFit.

- Python
Published by JohannesGaessler almost 3 years ago

kafe2 - v2.7.0

Relative to v2.7.0-pre1:

  • Fixed kafe2.xy_fit when using correlated relative errors.
  • Fixed setting plot axis ticks for log scale.
  • Updated the documentation.

- Python
Published by JohannesGaessler over 3 years ago

kafe2 - v2.7.0-pre1

Compared to v2.6.2:

  • Added new way to define model functions using SymPy.
  • Added the ability to create plots from data containers.
  • Added wrappers for xy fits and xy fit/data plotting.
  • Added wrapper k2Fit for backwards compatibility with PhyPraKit.
  • Renamed UnbinnedFit argument: model_density_function -> model_function. This can potentially break existing code.
  • Replaced custom exceptions with built-in exceptions wherever possible.
  • Fixed value broadcasting for Plot.customize .
  • Fixed plot x range when creating plots from multiple fits.
  • Fixed crash when calculating asymmtric parameter errors on failed convergence.

- Python
Published by JohannesGaessler over 3 years ago

kafe2 - v2.6.2

Compared to v2.6.1:

  • Fixed some layout issues when saving plots.
  • Fixed scalar model function causing crash.
  • New IndexedFit example.
  • New MultiFit example.
  • Fixed plot saving.
  • Fixed Gauss approximation cost function calculation.
  • Fixed some edge cases with fit.save_state .

- Python
Published by JohannesGaessler over 3 years ago

kafe2 - v2.6.1

Bugfixes:

  • Fixed incorrect uncertainty amount when using non-scalar relative errors in kafe2go.
  • Fixed Plot.save() crashing when setting a custom file name.
  • Added a workaround for a matplotlib v3.5.2 bug that caused kafe2 plots to not be shown.

- Python
Published by JohannesGaessler over 3 years ago

kafe2 - v2.6.0

Compared to v2.5.0:

  • Discontinued use of unittest2.
  • Fixed some convergence issues.
  • HistFit model function can now be absolute rather than a density. The kwarg for the HistFit constructor has therefore been renamed from modeldensityfunction to model_function .
  • Plot classes now have methods .save() and .show() as convenience methods for the quivalent matplotlib functionality.
  • Axis ticks can now be set for plots via Plot.x_ticks and Plot.y_ticks. x ticks can also be set to strings for indexed fits. This feature requires a recent matplotlib version, and therefore by extension a recent Python version. The most recent matplotlib version for Python 3.8 has been confirmed to work.
  • Parameter errors can now be set to control initial step size during minimization.
  • Added checks for user input when adding errors.
  • Users can now get the profile of the cost function for arbitrary intervals.
  • Fixed some float formatting issues in plots.
  • Revised behavior when the user does not specify errors.

- Python
Published by JohannesGaessler almost 4 years ago

kafe2 - v2.5.0

Compared to v2.4.0:

  • Some performance optimizations.
  • Greatly expanded documentation regarding mathematical foundations.
  • Added residual plots
  • Added the ability to save/load fit state
  • Automatically derive latex parameter names if possible, works for parameters named like a greek letter, and with parameters with LaTeX-like index. To use the lambda character name your character varlambda.
  • Minimum number of plot points: 100 -> 200

- Python
Published by JohannesGaessler over 4 years ago

kafe2 - v2.5.0-pre1

Compared to v2.4.0:

  • Some performance optimizations.
  • Greatly expanded documentation regarding mathematical foundations.
  • Added residual plots
  • Added the ability to save/load fit state

- Python
Published by JohannesGaessler over 4 years ago

kafe2 - v2.4.0

No changes compared to the last pre-release. Compared to v2.3.1:

  • Added a new fit type called CustomFit that expects a user-defined cost function instead of data + model.
  • Added a new cost function called GaussApproximation that approximates the Poisson distribution.
  • Performance optimizations for uncorrelated input uncertainties.

- Python
Published by JohannesGaessler over 4 years ago

kafe2 - v2.3.2

A small fix for the current 2.3 version: * Fixed a bug where setting fit parameters of a multi fit resulted in a crash.

- Python
Published by cverstege over 4 years ago

kafe2 - v2.4.0-pre2

Fixed a bug where setting fit parameters of a multi fit resulted in a crash.

- Python
Published by JohannesGaessler over 4 years ago

kafe2 - v2.4.0-pre1

Compared to v2.3.1:

  • Added a new fit type called CustomFit that expects a user-defined cost function instead of data + model.
  • Added a new cost function called GaussApproximation that approximates the Poisson distribution.
  • Performance optimizations for uncorrelated input uncertainties.

- Python
Published by JohannesGaessler over 4 years ago

kafe2 - v2.3.1

Mostly changes to examples and also some bug fixes: * Fixed Multifit asymmetric parameter error calculation logic. * Fixed Multifit local chi2/ndf logic.

- Python
Published by JohannesGaessler over 4 years ago

kafe2 - v2.3.0

Python2 support will be discontinued after v2.3.x . Changes relative to v2.3.0-pre2:

  • Revised Jupyter notebooks
  • Refactored documentation to align more with the Jupyter notebooks.
  • Added README.rst files to example directories for easier navigation on Github.

- Python
Published by JohannesGaessler almost 5 years ago

kafe2 - 2.3.0-pre2

  • Performance optimizations. In particular the inversion of the covariance matrix has been replaced with a cholesky decomposition and scipy.linalg.solve_triangular .
  • Fixed a bug where sometimes old parameter values were being used. Fit results changed slightly.
  • Fixed various minor bugs.

- Python
Published by JohannesGaessler about 5 years ago

kafe2 - v2.3.0-pre1

  • Option to set logarithmic scales for plots.
  • Chi2 cost function now adds the logarithm of the determinant of the covariance matrix to its cost to reduce bias. Can be used by custom cost function too by setting adddeterminantcost=True in the constructor.
  • Some gof/ndf display logic fixes.

- Python
Published by JohannesGaessler about 5 years ago

kafe2 - v2.2.3

  • Added support for iminuit 2.
  • Fixed parameter constraints not increasing ndf.
  • Fixed shared errors for multifits.

- Python
Published by JohannesGaessler about 5 years ago

kafe2 - v2.2.2-1

On December 7th iminuit 2.0 was released. kafe2 does currently not support the new interface. kafe2 won't use iminuit if a version >2 is detected

  • Skip using iminuit if iminuit>2 (until we support the new interface)

If you still want to use iminuit with kafe2, please install iminuit 1.x with pip install 'iminuit<2'

This "2.2.2-1" release fixes an issue from "2.2.2" when retrieving the version from iminuit, when iminuit is <2.

- Python
Published by cverstege about 5 years ago

kafe2 - v2.2.1

Fixed several bugs, mostly related to MultiFit:

  • Fixed a bug where some kafe2-internal caches weren't properly cleared.
  • A debug log message being printed as a user warning when adding shared errors to a MultiFit.
  • Issues when adding more than one shared error.
  • Issues when creating a MultiFit from different fit types.
  • Shared errors sometimes being added to the wrong fit.
  • Shared x errors sometimes using the wrong scale for calculating derivatives.

- Python
Published by JohannesGaessler over 5 years ago

kafe2 - v2.2.0

Relative to the last pre-release:

  • Expanded documentation.
  • Fixed documentation LaTeX build not working.

- Python
Published by JohannesGaessler over 5 years ago

kafe2 - v2.2.0dev1

Fixed a bug where plotting MultiFits created from chi2 fits without shared errors would result in a crash.

- Python
Published by JohannesGaessler over 5 years ago

kafe2 - v2.2.0dev

Pre-release of the last release before publication and therefore last release with subtractive changes to the user interface.

  • All nuisance parameter related code has been removed as it was nonfunctional. It can still be found on the dev branch.
  • Interface for XYFit was simplified: removed projected_foo in favor of the shorter names that are shared with the other fit classes.
  • Implemented errors relative to model.
  • The algorithm for all dynamic errors (relative model errors, x errors) is set with the dynamicerroralgorithm keyword in the fit constructor. The xerroralgorithm keyword has been removed.
  • Fixed GoF values for non-saturated likelihood cost functions.
  • Added chi2_probability as a fir property, is shown in reports and plots.
  • Simpler kafe2go syntax for limiting, fixing, and constraining parameters and for specifying relative data errors.
  • Various internal improvements.
  • Various improvements to documentation.
  • Some new examples, reorganized examples.

- Python
Published by JohannesGaessler over 5 years ago

kafe2 - v2.1.0

  • Fixed usage of TMinuit as backend (supported for Python 3 only).
  • kafe2go support for manual bin heights.
  • Implemented Simpson's rule for evaluating histogram bins. The modeldensityfuncantiderivative keyword has been replaced with the more general binevaluation keyword.

- Python
Published by JohannesGaessler over 5 years ago

kafe2 - v2.0-beta2

This is the second beta release of kafe2.

It includes bugfixes and some simplifying changes to the API. Here is a summary of the most important ones:

  • Fit: add_simple_error was renamed to the simpler add_error and the signature for limit_parameter was changed to accept two independent keyword arguments for the upper and lower limits instead of a tuple
  • Plot: the prefix with_ was dropped from arguments to plot()
  • new properties label and axis_labels were added to the Container classes and model_label was added to Fit
  • histogram bin contents can now be set manually using new method set_bins in HistContainer.
  • the name of the independent variable for xy and hist models is no longer required to be x and is instead taken from the first argument in the model function signature

- Python
Published by dsavoiu almost 6 years ago

kafe2 - v2.0-beta1

This is the first public release of kafe2.

It has undergone a fair amount of testing and should be sufficiently stable for most uses. However, some bugs and limitations may still be present in this version, so please open an issue if you run into any problems.

- Python
Published by dsavoiu about 6 years ago

kafe2 - Pre-release for thesis

Pre-release used for a thesis by @Citiroller. Contains generic multifits. Does not contain generic nuisance parameters.

- Python
Published by JohannesGaessler over 6 years ago