Skip to content

Commit

Permalink
doc: unified docstrings of Whittaker-like classes
Browse files Browse the repository at this point in the history
  • Loading branch information
MothNik committed May 20, 2024
1 parent 78610f4 commit 4f1eb69
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions chemotools/baseline/_air_pls.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class AirPls(
polynomial_order : int, optional default=1
The degree of the polynomial used to fit the baseline. A value of 1 corresponds
to a linear fit, while higher values correspond to higher-order polynomials.
Higher values will result in a smoother baseline.
Currently, values ``>= 3`` are highly discouraged due to numerical instability
that might obscure the smoothing effect.
nr_iterations : int, optional default=15
The number of iterations used to calculate the baseline. Increasing the number
Expand Down
7 changes: 7 additions & 0 deletions chemotools/baseline/_ar_pls.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ class ArPls(
The lambda parameter that controls the smoothness of the baseline. Higher values
will result in a smoother baseline.
differences : int, default=2
The order of the differences used for the penalty terms that enforces smoothness
of the baseline.
Higher values will result in a smoother baseline.
Currently, values ``>= 3`` are highly discouraged due to numerical instability
that might obscure the smoothing effect.
ratio : float, default=0.01
The convergence threshold for the weight updating scheme. Lower values will
result in a more accurate baseline at the cost of computation time and even
Expand Down
2 changes: 1 addition & 1 deletion chemotools/smooth/_whittaker_smooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class WhittakerSmooth(
Please refer to the Notes section for further details.
differences : int, default=1
The number of differences to use for the Whittaker smooth. If the aim is to
The order of differences to use for the Whittaker smooth. If the aim is to
obtain a smooth estimate of the ``m``-th order derivative, this should be set to
at least ``m + 2``.
Currently, values ``>= 3`` are highly discouraged due to numerical instability
Expand Down

0 comments on commit 4f1eb69

Please sign in to comment.