2
2
Changelog
3
3
=========
4
4
5
+ Version 1.2.0 (2025-03-17)
6
+ --------------------------
7
+
8
+ This is a minor version with new features, bug fixes, deprecations,
9
+ and documentation improvements.
10
+
11
+ New Features
12
+ ~~~~~~~~~~~~
13
+
14
+ * Added the locally symmetric reweighted penalized least squares (``lsrpls ``) Whittaker smoothing
15
+ algorithm and its penalized spline version ``pspline_lsrpls ``.
16
+ * Added the Bayesian reweighted penalized least squares (``brpls ``) Whittaker smoothing
17
+ algorithm and its penalized spline version ``pspline_brpls ``.
18
+ * Added the 4S peak filling (``peak_filling ``) algorithm, which truncates the data and then iteratively
19
+ selects the minimum of a directional moving average and the current data point.
20
+ * ``Baseline `` and ``Baseline2D `` objects keep the computed pseudo-inverse of the Vandermonde for
21
+ polynomial methods if weights are not given, which speeds up most polynomial methods for repeated
22
+ fits.
23
+
24
+ Bug Fixes
25
+ ~~~~~~~~~
26
+
27
+ * All methods of ``Baseline `` and ``Baseline2D `` are now thread-safe as long as non-data arguments
28
+ are the same for each method call.
29
+ * Fixed incorrect indexing in ``rubberband ``.
30
+ * Removed using ``copy=False `` for numpy.array calls since it raised an error in Numpy versions
31
+ 2.0 or later if a copy had to be made.
32
+ * Fixed an issue converting sparse matrices to banded matrices when solving penalized splines
33
+ where a column could be omitted if the last diagonal value was zero. Only relevant if Numba
34
+ is not installed and using SciPy versions 1.15 and newer.
35
+ * Corrected ``airpls `` weighting; the weighting equation for airpls was misprinted in its journal
36
+ article, so changed to the correct weighting scheme.
37
+ * Improved overflow avoidance for ``iarpls ``, ``airpls ``, and ``drpls ``.
38
+ * Removed internal parallel processing for ``loess `` since it was problematic for both threaded and
39
+ multiprocessing uses.
40
+ * Fixed an issue when flattening 3D arrays with shape (N, M, 1) to (N, M) where the shape would be
41
+ output instead of the flattened array.
42
+
43
+ Other Changes
44
+ ~~~~~~~~~~~~~
45
+
46
+ * Officially list Python 3.13 as supported, as well as the experimental free-threaded
47
+ Python 3.13 build.
48
+ * Updated lowest supported Python version to 3.9
49
+ * Updated lowest supported dependency versions: NumPy 1.20, SciPy 1.6,
50
+ pentapy 1.1, and Numba 0.53
51
+ * Allow inputting ``assymetric_coef `` for ``aspls `` and ``pspline_aspls `` to modify shape of the
52
+ weighting curve.
53
+ * Added ``normalize_weights `` for ``airpls `` to normalize weights between 0 and 1, which is set to
54
+ True by default. The new, corrected ``airpls `` weighting makes all negative residuals have weights
55
+ greater than 1, so this option can help to avoid numerical issues or overflow. Set to False to ensure
56
+ matching the literature implementation.
57
+
58
+ Deprecations/Breaking Changes
59
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60
+
61
+ * All optimizer algorithms other than ``Baseline2D.individual_axes `` now return the parameter
62
+ dictionary from the underlying method within the ``method_params `` key in order to avoid
63
+ key overlap between the optimizer's parameters and the method parameters.
64
+ * The default ``delta `` for ``loess `` was changed from 0 to ``0.01 * (max(x_data) - min(x_data)) ``.
65
+ * The ``delta `` parameter for ``loess `` is now used on the actual input `x_data ` rather
66
+ than the `x_data ` after scaling to the domain [-1, 1] to make it easier to use.
67
+ * The ``optimal_parameter `` key for the ``optimize_extended_range `` method no longer returns the
68
+ log10 of the optimal value when fitting a non polynomial method. For example, it now returns
69
+ 10000 rather than 4 if the optimal ``lam `` value was 10000.
70
+ * Deprecated passing ``tol `` and ``max_iter `` to ``mpls `` and ``pspline_mpls `` since the keywords
71
+ were not internally used. The keywords will be removed in version 1.4.
72
+ * Deprecated the ``pentapy_solver `` attribute of ``Baseline `` and ``Baseline2D `` in
73
+ favor of the ``banded_solver `` attribute to control the solvers used for banded linear systems.
74
+ The attribute will be removed in version 1.4.
75
+ * Deprecated passing additional keyword arguments for padding to multiple methods, and will remove
76
+ the functionality in version 1.4. Keyword arguments for padding should now be grouped into
77
+ the ``pad_kwargs `` parameter instead.
78
+ * Deprecated passing additional keyword arguments for estimating the half-window parameter if none was
79
+ given for morphological methods, and will remove the functionality in version 1.4. Keyword arguments
80
+ for estimating the half-window should now be grouped into the ``window_kwargs `` parameter instead.
81
+ * Deprecated the ``min_rmse `` key from the parameter dictionary output of ``optimize_extended_range ``
82
+ in favor of returning all calculated root mean square values from the fittings through the new ``rmse ``
83
+ key. The ``min_rmse `` key will be removed in version 1.4.
84
+ * **Pending Deprecation **: The functional interface of pybaselines will be deprecated in version 1.3, and
85
+ will be removed in version 2.0. For example, user code using ``whittaker.arpls(...) `` should
86
+ migrate to ``Baseline.arpls(...) ``. The only items that will be kept under the main pybaselines
87
+ namespace will be ``Baseline ``, ``Baseline2D ``, and ``utils ``.
88
+
89
+ Documentation/Examples
90
+ ~~~~~~~~~~~~~~~~~~~~~~
91
+
92
+ * Added new examples to the documentation.
93
+ * Added a page describing best practices for fitting multiple datasets with pybaselines.
94
+ * Render each method on its own page in the documentation.
95
+
96
+
5
97
Version 1.1.0 (2024-02-18)
6
98
--------------------------
7
99
@@ -16,12 +108,12 @@ New Features
16
108
These can be accessed using the new `Baseline2D ` class.
17
109
* Added the `Baseline2D.individual_axes ` method, which allows fitting each row and/or
18
110
column in two dimensional data with any one dimensional method in pybaselines.
19
- * Added a version of the rubberband method to pybaselines.misc which allows fitting
111
+ * Added a version of the rubberband method to pybaselines.classification which allows fitting
20
112
individual segments within data to better fit concave-shaped data.
21
113
* Added the Customized Baseline Correction (custom_bc) method to
22
114
pybaselines.optimizers, which allows fitting baselines with controllable
23
115
levels of stiffness in different regions.
24
- * Added a penalized version of mpls (pspline_mpls) to pybaselines.spline.
116
+ * Added a penalized spline version of mpls (pspline_mpls) to pybaselines.spline.
25
117
* Updated spline.mixture_model to use expectation-maximization rather than the previous
26
118
nieve approach of fitting the histogram of the residuals with the probability density
27
119
function. Should reduce calculation times.
0 commit comments