Skip to content

Commit 5152d1a

Browse files
committed
maint: prepare v0.21
1 parent abe11da commit 5152d1a

File tree

3 files changed

+53
-3
lines changed

3 files changed

+53
-3
lines changed

docs/development/changelog.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--- lsqfitgp/docs/changelog.md
22
3-
Copyright (c) 2023, Giacomo Petrillo
3+
Copyright (c) 2023, 2024, Giacomo Petrillo
44
55
This file is part of lsqfitgp.
66
@@ -24,6 +24,55 @@
2424
# Changelog
2525

2626

27+
## 0.21 Release early, release often, then hide in a foreign country and wait one year (2024-10-14)
28+
29+
Thanks to waiting one year, Google and the Python Software Foundation have substantially improved `jax` and Python, making `lsqfitgp` faster and supported on Windows, through no effort of my own.
30+
31+
### Release highlights
32+
33+
* Improved `gvar` formatting.
34+
* Data transformations in `bayestree.bcf`.
35+
36+
### Improved formatting of uncertainties
37+
38+
Improved gvar formatting. Disabled by default, can be enabled with the context manager `gvar_format`. The new format has more options than the one provided by `gvar`. In particular the default setting has 1.5 error digits instead of 2, and never shows non-significant digits.
39+
40+
* Fractional error digits: with 1.5 digits, 2 error digits are shown up to $\sqrt{10}$, then 1. So 12.3 +/- 1.5 becomes `'12.3(1.5)`, while 12.3 +/- 4.5 becomes `'12(4)'`.
41+
* Never show non-significant digits: the `gvar` formatter displays 1200 +/- 500 as `'1(234)'`, showing more digits than the first 2 error digits. The new formatter instead writes `'oo(23o)'`, using `o` as a "small zero" symbol to represent a rounding zero rather than a significant zero. This also allows to avoid exponential notation for small numbers: 1234 +/- 567 is shown as `'1.23(57)e+03'` with the default formatter, and as `'12oo(6oo)'` with the new formatter.
42+
43+
The new formatter can also be used manually without gvars through `uformat`.
44+
45+
### BCF
46+
47+
* Data transformations, with free parameters inferred together with the other hyperparameters, thus accounting for the additional degrees of freedom due to the transformation. The predefined transformations are standardization and Yeo-Johnson. The user can pass arbitrary callables, and easily stack their own transformations with the predefined ones.
48+
* The hyperparameters are always expressed in the transformed model, instead of rescaled for standardization, since now the data transformation is under control of the user.
49+
* `bcf.pred` can sample the predictive posterior, and return results in the transformed space instead of data space.
50+
51+
### `empbayes_fit`
52+
53+
* New parameter `empbayesfit(..., additional_loss=<func>)` to add an user-specified function to the minus log marginal posterior of the hyperparameters used to find the MAP.
54+
* Fix show-stopping bug with old numpy versions if there were more than 1 hyperparameters.
55+
56+
### Dependencies
57+
58+
As usual I run tests with the oldest supported versions of all dependencies. Additionally, I now check that the versions pre-installed on Google Colab are supported.
59+
60+
* Minimum required versions bumped to:
61+
* Python 3.8 -> 3.9
62+
* numpy 1.20 -> 1.22
63+
* scipy 1.5 -> 1.10
64+
* jax 0.4.6 -> 0.4.26
65+
* gvar 11.10.1 -> 12.0
66+
* New supported versions/platforms:
67+
* Python 3.12
68+
* numpy 2
69+
* Windows fully supported instead of experimental
70+
71+
### `StructuredArray`
72+
73+
* Implemented `StructuredArray.nbytes`.
74+
75+
2776
## 0.20.2 This release marks a detente in the ongoing lsqfitgp-jax conflict (2023-10-18)
2877

2978
Recent versions of jax are now supported using scipy's polygamma in place of the one provided by jax. Other changes:

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. lsqfitgp/docs/index.rst
22
..
3-
.. Copyright (c) 2020, 2022, 2023, Giacomo Petrillo
3+
.. Copyright (c) 2020, 2022, 2023, 2024, Giacomo Petrillo
44
..
55
.. This file is part of lsqfitgp.
66
..
@@ -56,6 +56,7 @@ Manual for older versions
5656
-------------------------
5757

5858
* `Latest development version <https://gattocrucco.github.io/lsqfitgp/docs/index.html>`_
59+
* `0.21 <https://gattocrucco.github.io/lsqfitgp/docs-0.21/index.html>`_
5960
* `0.20.2 <https://gattocrucco.github.io/lsqfitgp/docs-0.20.2/index.html>`_
6061
* `0.20 <https://gattocrucco.github.io/lsqfitgp/docs-0.20/index.html>`_
6162
* `0.19 <https://gattocrucco.github.io/lsqfitgp/docs-0.19/index.html>`_

src/lsqfitgp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
See the manual at https://gattocrucco.github.io/lsqfitgp/docs
2424
"""
2525

26-
__version__ = '0.21.dev0'
26+
__version__ = '0.21'
2727

2828
# these first because they modify global state
2929
from . import _patch_jax

0 commit comments

Comments
 (0)