Skip to content

Commit 1e3dcac

Browse files
committed
Update: docstrings
1 parent 09aab16 commit 1e3dcac

2 files changed

Lines changed: 35 additions & 22 deletions

File tree

uncertaintyx/fit/eiv/jax.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Copyright (c) Brockmann Consult GmbH, 2026.
22
# License: MIT
3+
"""
4+
Errors-in-variables implementation based on the effective
5+
variance method (EVM). Refer to:
6+
7+
A. Tarantola (2005). Inverse Problem Theory and Methods for
8+
Model Parameter Estimation. Society for Industrial and Applied
9+
Mathematics. https://doi.org/10.1137/1.9780898717921
10+
11+
Watson et al. (1984). The effective variance weighting
12+
for least squares calculations applied to the mass balance
13+
receptor model. Atmospheric Environment (1967), 18, 1347-1355.
14+
https://doi.org/10.1016/0004-6981(84)90043-X.
15+
16+
D. York (1968). Least squares fitting of a straight line
17+
with correlated errors. Earth and Planetary Science Letters,
18+
5, 320-324. https://doi.org/10.1016/S0012-821X(68)80059-7.
19+
20+
D. York (1966). Least squares fitting of a straight line.
21+
Canadian Journal of Physics, 44, 1079-1086.
22+
https://doi.org/10.1139/p66-090.
23+
"""
24+
325
from typing import Any
426
from typing import Callable
527

@@ -209,20 +231,7 @@ class EIV(Fitting):
209231
variance method (EVM).
210232
211233
This implementation is intended for large scale problems
212-
with up to millions of data points. Refer to:
213-
214-
Watson et al. (1984). The effective variance weighting
215-
for least squares calculations applied to the mass balance
216-
receptor model. Atmospheric Environment (1967), 18, 1347-1355.
217-
https://doi.org/10.1016/0004-6981(84)90043-X.
218-
219-
D. York (1968). Least squares fitting of a straight line
220-
with correlated errors. Earth and Planetary Science Letters,
221-
5, 320-324. https://doi.org/10.1016/S0012-821X(68)80059-7.
222-
223-
D. York (1966). Least squares fitting of a straight line.
224-
Canadian Journal of Physics, 44, 1079-1086.
225-
https://doi.org/10.1139/p66-090.
234+
with up to millions of data points.
226235
"""
227236

228237
def fit(

uncertaintyx/fit/eiv/numpy.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Copyright (c) Brockmann Consult GmbH, 2026.
22
# License: MIT
3+
"""
4+
Errors-in-variables implementation based on orthogonal
5+
distance regression (ODR). Refer to:
6+
7+
Boggs et al. (1992). User's Reference Guide for ODRPACK
8+
Version 2.01. Software for Weighted Orthogonal Distance
9+
Regression. https://doi.org/10.6028/NIST.IR.4834.
10+
11+
Boggs et al. (1989). Algorithm 676: ODRPACK: software for
12+
weighted orthogonal distance regression. ACM Trans. Math.
13+
Softw. 15, 348–364. https://doi.org/10.1145/76909.76913.
14+
"""
315

416
import numpy as np
517
import odrpack
@@ -16,14 +28,6 @@ class EIV(Fitting):
1628
1729
This implementation is intended for problems with up to
1830
:math:`10^4` to :math:`10^5` data points. Refer to:
19-
20-
Boggs et al. (1992). User's Reference Guide for ODRPACK
21-
Version 2.01. Software for Weighted Orthogonal Distance
22-
Regression. https://doi.org/10.6028/NIST.IR.4834.
23-
24-
Boggs et al. (1989). Algorithm 676: ODRPACK: software for
25-
weighted orthogonal distance regression. ACM Trans. Math.
26-
Softw. 15, 348–364. https://doi.org/10.1145/76909.76913.
2731
"""
2832

2933
def fit(

0 commit comments

Comments
 (0)