pytmpinv 3.0.0__tar.gz → 3.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pytmpinv might be problematic. Click here for more details.
- {pytmpinv-3.0.0/pytmpinv.egg-info → pytmpinv-3.5.0}/PKG-INFO +8 -2
- {pytmpinv-3.0.0 → pytmpinv-3.5.0}/README.md +6 -0
- {pytmpinv-3.0.0 → pytmpinv-3.5.0}/pyproject.toml +2 -2
- {pytmpinv-3.0.0 → pytmpinv-3.5.0/pytmpinv.egg-info}/PKG-INFO +8 -2
- pytmpinv-3.5.0/pytmpinv.egg-info/requires.txt +2 -0
- {pytmpinv-3.0.0 → pytmpinv-3.5.0}/tmpinv/__init__.py +1 -1
- {pytmpinv-3.0.0 → pytmpinv-3.5.0}/tmpinv/tmpinv.py +26 -14
- pytmpinv-3.0.0/pytmpinv.egg-info/requires.txt +0 -2
- {pytmpinv-3.0.0 → pytmpinv-3.5.0}/LICENSE +0 -0
- {pytmpinv-3.0.0 → pytmpinv-3.5.0}/pytmpinv.egg-info/SOURCES.txt +0 -0
- {pytmpinv-3.0.0 → pytmpinv-3.5.0}/pytmpinv.egg-info/dependency_links.txt +0 -0
- {pytmpinv-3.0.0 → pytmpinv-3.5.0}/pytmpinv.egg-info/top_level.txt +0 -0
- {pytmpinv-3.0.0 → pytmpinv-3.5.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytmpinv
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.5.0
|
|
4
4
|
Summary: Tabular Matrix Problems via Pseudoinverse Estimation
|
|
5
5
|
Author-email: The Economist <29724411+econcz@users.noreply.github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -18,7 +18,7 @@ Requires-Python: >=3.10
|
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: numpy>=1.24
|
|
21
|
-
Requires-Dist: pyclsp>=3.
|
|
21
|
+
Requires-Dist: pyclsp>=3.5.0
|
|
22
22
|
Dynamic: license-file
|
|
23
23
|
|
|
24
24
|
# Tabular Matrix Problems via Pseudoinverse Estimation
|
|
@@ -176,6 +176,8 @@ for kw in keys:
|
|
|
176
176
|
|
|
177
177
|
For comprehensive information on the estimator's capabilities, advanced configuration options, and implementation details, please refer to the [pyclsp module](https://pypi.org/project/pyclsp/ "Convex Least Squares Programming"), on which TMPinv is based.
|
|
178
178
|
|
|
179
|
+
To ensure cross-platform reproducibility, all CLSP implementations use a modified condition number function based on singular values, with a relative cutoff equal to `cond_tolerance * the largest singular value`.
|
|
180
|
+
|
|
179
181
|
**TMPinv Parameters:**
|
|
180
182
|
|
|
181
183
|
`S` : *array_like* of shape *(m + p, m + p)*, optional<br>
|
|
@@ -246,6 +248,10 @@ If *True*, a convex programming problem is solved to refine `zhat`. The resultin
|
|
|
246
248
|
If a list/iterable of floats is provided, each candidate is evaluated via a full solve, and the α with the smallest NRMSE is selected.<br>
|
|
247
249
|
If None, α is chosen, based on an error rule: α = min(1.0, NRMSE_{α = 0} / (NRMSE_{α = 0} + NRMSE_{α = 1} + tolerance))
|
|
248
250
|
|
|
251
|
+
`cond_tolerance` : *float* or *None*, default = *None*<br>
|
|
252
|
+
Singular-value cutoff for the custom condition number function.<br>
|
|
253
|
+
If *None*, the implementation uses an internal relative cutoff of `1e-14`.
|
|
254
|
+
|
|
249
255
|
`*args`, `**kwargs` : optional<br>
|
|
250
256
|
CVXPY arguments passed to the CVXPY solver.
|
|
251
257
|
|
|
@@ -153,6 +153,8 @@ for kw in keys:
|
|
|
153
153
|
|
|
154
154
|
For comprehensive information on the estimator's capabilities, advanced configuration options, and implementation details, please refer to the [pyclsp module](https://pypi.org/project/pyclsp/ "Convex Least Squares Programming"), on which TMPinv is based.
|
|
155
155
|
|
|
156
|
+
To ensure cross-platform reproducibility, all CLSP implementations use a modified condition number function based on singular values, with a relative cutoff equal to `cond_tolerance * the largest singular value`.
|
|
157
|
+
|
|
156
158
|
**TMPinv Parameters:**
|
|
157
159
|
|
|
158
160
|
`S` : *array_like* of shape *(m + p, m + p)*, optional<br>
|
|
@@ -223,6 +225,10 @@ If *True*, a convex programming problem is solved to refine `zhat`. The resultin
|
|
|
223
225
|
If a list/iterable of floats is provided, each candidate is evaluated via a full solve, and the α with the smallest NRMSE is selected.<br>
|
|
224
226
|
If None, α is chosen, based on an error rule: α = min(1.0, NRMSE_{α = 0} / (NRMSE_{α = 0} + NRMSE_{α = 1} + tolerance))
|
|
225
227
|
|
|
228
|
+
`cond_tolerance` : *float* or *None*, default = *None*<br>
|
|
229
|
+
Singular-value cutoff for the custom condition number function.<br>
|
|
230
|
+
If *None*, the implementation uses an internal relative cutoff of `1e-14`.
|
|
231
|
+
|
|
226
232
|
`*args`, `**kwargs` : optional<br>
|
|
227
233
|
CVXPY arguments passed to the CVXPY solver.
|
|
228
234
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pytmpinv"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.5.0"
|
|
4
4
|
description = "Tabular Matrix Problems via Pseudoinverse Estimation"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -27,7 +27,7 @@ classifiers = [
|
|
|
27
27
|
]
|
|
28
28
|
dependencies = [
|
|
29
29
|
"numpy>=1.24",
|
|
30
|
-
"pyclsp>=3.
|
|
30
|
+
"pyclsp>=3.5.0"
|
|
31
31
|
]
|
|
32
32
|
|
|
33
33
|
[project.urls]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytmpinv
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.5.0
|
|
4
4
|
Summary: Tabular Matrix Problems via Pseudoinverse Estimation
|
|
5
5
|
Author-email: The Economist <29724411+econcz@users.noreply.github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -18,7 +18,7 @@ Requires-Python: >=3.10
|
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: numpy>=1.24
|
|
21
|
-
Requires-Dist: pyclsp>=3.
|
|
21
|
+
Requires-Dist: pyclsp>=3.5.0
|
|
22
22
|
Dynamic: license-file
|
|
23
23
|
|
|
24
24
|
# Tabular Matrix Problems via Pseudoinverse Estimation
|
|
@@ -176,6 +176,8 @@ for kw in keys:
|
|
|
176
176
|
|
|
177
177
|
For comprehensive information on the estimator's capabilities, advanced configuration options, and implementation details, please refer to the [pyclsp module](https://pypi.org/project/pyclsp/ "Convex Least Squares Programming"), on which TMPinv is based.
|
|
178
178
|
|
|
179
|
+
To ensure cross-platform reproducibility, all CLSP implementations use a modified condition number function based on singular values, with a relative cutoff equal to `cond_tolerance * the largest singular value`.
|
|
180
|
+
|
|
179
181
|
**TMPinv Parameters:**
|
|
180
182
|
|
|
181
183
|
`S` : *array_like* of shape *(m + p, m + p)*, optional<br>
|
|
@@ -246,6 +248,10 @@ If *True*, a convex programming problem is solved to refine `zhat`. The resultin
|
|
|
246
248
|
If a list/iterable of floats is provided, each candidate is evaluated via a full solve, and the α with the smallest NRMSE is selected.<br>
|
|
247
249
|
If None, α is chosen, based on an error rule: α = min(1.0, NRMSE_{α = 0} / (NRMSE_{α = 0} + NRMSE_{α = 1} + tolerance))
|
|
248
250
|
|
|
251
|
+
`cond_tolerance` : *float* or *None*, default = *None*<br>
|
|
252
|
+
Singular-value cutoff for the custom condition number function.<br>
|
|
253
|
+
If *None*, the implementation uses an internal relative cutoff of `1e-14`.
|
|
254
|
+
|
|
249
255
|
`*args`, `**kwargs` : optional<br>
|
|
250
256
|
CVXPY arguments passed to the CVXPY solver.
|
|
251
257
|
|
|
@@ -96,16 +96,17 @@ class TMPinvResult:
|
|
|
96
96
|
return self.model[idx].summarize(display=display)
|
|
97
97
|
|
|
98
98
|
def TMPinvSolve(
|
|
99
|
-
S:
|
|
100
|
-
M:
|
|
101
|
-
b_row:
|
|
102
|
-
b_col:
|
|
103
|
-
b_val:
|
|
104
|
-
i:
|
|
105
|
-
j:
|
|
106
|
-
zero_diagonal:
|
|
107
|
-
reduced:
|
|
108
|
-
symmetric:
|
|
99
|
+
S: Sequence[Sequence[float]] | None = None,
|
|
100
|
+
M: Sequence[Sequence[float]] | None = None,
|
|
101
|
+
b_row: Sequence[float] | None = None,
|
|
102
|
+
b_col: Sequence[float] | None = None,
|
|
103
|
+
b_val: Sequence[float] | None = None,
|
|
104
|
+
i: int = 1,
|
|
105
|
+
j: int = 1,
|
|
106
|
+
zero_diagonal: bool = False,
|
|
107
|
+
reduced: tuple[int, int] | None = None,
|
|
108
|
+
symmetric: bool = False,
|
|
109
|
+
cond_tolerance: float | None = None,
|
|
109
110
|
*args, **kwargs
|
|
110
111
|
) -> TMPinvResult:
|
|
111
112
|
"""
|
|
@@ -150,6 +151,9 @@ def TMPinvSolve(
|
|
|
150
151
|
Applies to TMPinvResult.x only. For TMPinvResult.model symmetry,
|
|
151
152
|
add explicit symmetry constraints to M in a full-model solve instead
|
|
152
153
|
of using this flag.
|
|
154
|
+
cond_tolerance : float or None, default = None
|
|
155
|
+
Singular-value cutoff for the custom condition number function.
|
|
156
|
+
If None, the implementation uses an internal relative cutoff of 1e-14.
|
|
153
157
|
|
|
154
158
|
Returns
|
|
155
159
|
-------
|
|
@@ -233,7 +237,8 @@ def TMPinvSolve(
|
|
|
233
237
|
p=p,
|
|
234
238
|
i=i,
|
|
235
239
|
j=j,
|
|
236
|
-
|
|
240
|
+
zero_diagonal=zero_diagonal,
|
|
241
|
+
cond_tolerance=cond_tolerance,
|
|
237
242
|
**kw)
|
|
238
243
|
result.x = result.model.x
|
|
239
244
|
|
|
@@ -339,7 +344,8 @@ def TMPinvSolve(
|
|
|
339
344
|
p=p_end - p_start,
|
|
340
345
|
i=i,
|
|
341
346
|
j=j,
|
|
342
|
-
|
|
347
|
+
zero_diagonal=False,
|
|
348
|
+
cond_tolerance=cond_tolerance,
|
|
343
349
|
**kw)
|
|
344
350
|
result.model.append(tmp)
|
|
345
351
|
result.x[m_start:m_end, p_start:p_end] = tmp.x
|
|
@@ -358,7 +364,8 @@ def tmpinv(
|
|
|
358
364
|
tuple[float | None, float | None] | None = None,
|
|
359
365
|
replace_value: float | None = np.nan,
|
|
360
366
|
tolerance: float = np.sqrt(np.finfo(float).eps),
|
|
361
|
-
iteration_limit: int
|
|
367
|
+
iteration_limit: int = 50,
|
|
368
|
+
cond_tolerance: float | None = None,
|
|
362
369
|
*args, **kwargs
|
|
363
370
|
) -> TMPinvResult:
|
|
364
371
|
"""
|
|
@@ -378,6 +385,9 @@ def tmpinv(
|
|
|
378
385
|
machine epsilon.
|
|
379
386
|
iteration_limit : int, default = 50
|
|
380
387
|
Maximum number of iterations allowed in the refinement loop.
|
|
388
|
+
cond_tolerance : float or None, default = None
|
|
389
|
+
Singular-value cutoff for the custom condition number function.
|
|
390
|
+
If None, the implementation uses an internal relative cutoff of 1e-14.
|
|
381
391
|
*args, **kwargs : additional arguments
|
|
382
392
|
Passed directly to TMPinvSolve().
|
|
383
393
|
|
|
@@ -457,7 +467,9 @@ def tmpinv(
|
|
|
457
467
|
finite_rows]),
|
|
458
468
|
:])[:,nonzero_cols],
|
|
459
469
|
M=M, tolerance=tolerance,
|
|
460
|
-
iteration_limit=iteration_limit,
|
|
470
|
+
iteration_limit=iteration_limit,
|
|
471
|
+
cond_tolerance=cond_tolerance,
|
|
472
|
+
**kw)
|
|
461
473
|
|
|
462
474
|
# (result) Replace out-of-bound values with `replace_value`
|
|
463
475
|
x = result.x.reshape(-1, 1)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|