processsupport 0.1.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.
- processsupport-0.1.0/CHANGELOG.md +12 -0
- processsupport-0.1.0/LICENSE +21 -0
- processsupport-0.1.0/MANIFEST.in +5 -0
- processsupport-0.1.0/PKG-INFO +78 -0
- processsupport-0.1.0/README.md +56 -0
- processsupport-0.1.0/VERSION +1 -0
- processsupport-0.1.0/docs/README.md +14 -0
- processsupport-0.1.0/docs/api.md +119 -0
- processsupport-0.1.0/docs/design/SDD.md +37 -0
- processsupport-0.1.0/docs/design/methods.json +374 -0
- processsupport-0.1.0/docs/design/protocol.json +70 -0
- processsupport-0.1.0/docs/design/support-transport.md +75 -0
- processsupport-0.1.0/docs/design/transport-generator.json +122 -0
- processsupport-0.1.0/docs/frameworks/frameworks.md +21 -0
- processsupport-0.1.0/docs/guides/guides.md +29 -0
- processsupport-0.1.0/docs/operators/operators.md +89 -0
- processsupport-0.1.0/docs/releasing.md +20 -0
- processsupport-0.1.0/pyproject.toml +33 -0
- processsupport-0.1.0/requirements-build.txt +3 -0
- processsupport-0.1.0/requirements-test.txt +5 -0
- processsupport-0.1.0/scripts/test.ps1 +14 -0
- processsupport-0.1.0/scripts/test.sh +8 -0
- processsupport-0.1.0/scripts/verify_wheel.py +73 -0
- processsupport-0.1.0/setup.cfg +4 -0
- processsupport-0.1.0/src/processsupport/__init__.py +6 -0
- processsupport-0.1.0/src/processsupport/_validation.py +64 -0
- processsupport-0.1.0/src/processsupport/alignment.py +86 -0
- processsupport-0.1.0/src/processsupport/baselines.py +119 -0
- processsupport-0.1.0/src/processsupport/blasting.py +38 -0
- processsupport-0.1.0/src/processsupport/energy.py +34 -0
- processsupport-0.1.0/src/processsupport/kinetics.py +175 -0
- processsupport-0.1.0/src/processsupport/observer.py +61 -0
- processsupport-0.1.0/src/processsupport/particles.py +65 -0
- processsupport-0.1.0/src/processsupport/quality.py +97 -0
- processsupport-0.1.0/src/processsupport/reconciliation.py +102 -0
- processsupport-0.1.0/src/processsupport/results.py +75 -0
- processsupport-0.1.0/src/processsupport/settling.py +98 -0
- processsupport-0.1.0/src/processsupport/spatial.py +225 -0
- processsupport-0.1.0/src/processsupport/support.py +91 -0
- processsupport-0.1.0/src/processsupport/transport.py +1226 -0
- processsupport-0.1.0/src/processsupport/uncertainty.py +165 -0
- processsupport-0.1.0/src/processsupport.egg-info/PKG-INFO +78 -0
- processsupport-0.1.0/src/processsupport.egg-info/SOURCES.txt +48 -0
- processsupport-0.1.0/src/processsupport.egg-info/dependency_links.txt +1 -0
- processsupport-0.1.0/src/processsupport.egg-info/requires.txt +8 -0
- processsupport-0.1.0/src/processsupport.egg-info/top_level.txt +1 -0
- processsupport-0.1.0/tests/test_operators.py +232 -0
- processsupport-0.1.0/tests/test_review_boundaries.py +137 -0
- processsupport-0.1.0/tests/test_spatial_quality.py +69 -0
- processsupport-0.1.0/tests/test_transport.py +274 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.01.000] - 2026-12-06
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Independent physical-support, availability, spatial, process-model and uncertainty operators.
|
|
8
|
+
- Constrained support-aware transport-response estimation, identification diagnostics and explicit refusal states.
|
|
9
|
+
- Numerical oracle tests, serializable fitted state and a documented public integration interface.
|
|
10
|
+
|
|
11
|
+
The release establishes implementation behavior within the tested numerical contracts. Consumer studies establish empirical generalization under their own data and evaluation protocols.
|
|
12
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Felipe Santibáñez-Leal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: processsupport
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Auditable physical-support operators and constrained transport-response estimation
|
|
5
|
+
Author: Felipe Santibáñez-Leal
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/fsantibanezleal/CAOS_ProcessSupport
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: numpy>=2.0
|
|
16
|
+
Requires-Dist: scipy>=1.14
|
|
17
|
+
Provides-Extra: spatial
|
|
18
|
+
Requires-Dist: PyKrige==1.7.3; extra == "spatial"
|
|
19
|
+
Provides-Extra: test
|
|
20
|
+
Requires-Dist: pytest<10,>=9.1; extra == "test"
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# ProcessSupport
|
|
24
|
+
|
|
25
|
+
Physical-support operators and constrained transport-response estimation for reproducible process data analysis. The independent Python distribution is `processsupport`; the repository contains the reusable numerical library, its tests and documentation. Display version 0.01.000 corresponds to distribution version 0.1.0.
|
|
26
|
+
|
|
27
|
+
The library preserves what an observation represents, when it was available and which physical quantities a model predicts. It supplies support-weighted composites, release-aware alignment, quality profiles, metric IDW and real PyKrige adapters, dimensional process references, constrained reconciliation, a Joseph-form linear observer, robust healthy-reference scores, finite-rank intervals and joint transport-response estimation.
|
|
28
|
+
|
|
29
|
+
## Install and calculate
|
|
30
|
+
|
|
31
|
+
Install the exact version with an isolated environment's Python. The optional `spatial` extra includes PyKrige 1.7.3. NumPy and SciPy are required; no neural training stack is imported.
|
|
32
|
+
|
|
33
|
+
```powershell
|
|
34
|
+
python -m pip install "processsupport==0.1.0"
|
|
35
|
+
# Optional spatial interpolation engine:
|
|
36
|
+
python -m pip install "processsupport[spatial]==0.1.0"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from processsupport.support import composite
|
|
41
|
+
from processsupport.reconciliation import reconcile
|
|
42
|
+
|
|
43
|
+
grade = composite([1, 3], [1, 3], unit="%", basis="dry-solids",
|
|
44
|
+
weight_basis="mass", row_ids=["interval-a", "interval-b"])
|
|
45
|
+
assert grade.value == 2.5
|
|
46
|
+
flows = reconcile([10, 4, 5], [[1, 0, 0], [0, 1, 0], [0, 0, 1]],
|
|
47
|
+
[[1, -1, -1]], [0])
|
|
48
|
+
print(flows.value) # [9.66666667, 4.33333333, 5.33333333]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
These are authored numerical examples, not measurements from a mine. `NumericalResult` retains NumPy arrays and diagnostics; `to_dict()` is JSON-safe. `ScientificRefusal` names an unsupported calculation instead of manufacturing a substitute answer. An unbounded interval uses an explicit state and null bounds. Unknown release time never becomes zero delay.
|
|
52
|
+
|
|
53
|
+
## Transport-response estimation
|
|
54
|
+
|
|
55
|
+
`processsupport.transport.SupportTransportRegressor` jointly fits a nonnegative normalized lag kernel and a linear response against known observation supports and optionally available physical balances. It uses eight starts, augmented least squares and analytic-gradient constrained SLSQP blocks. It retains convergence, physical output violations, identification rank, block-bootstrap and mean-lag profile evidence separately.
|
|
56
|
+
|
|
57
|
+
A predictive fit does not establish recovered residence time. Required bootstrap/profile diagnostics must finish before physical interpretation is admitted; weak excitation, unknown support, unseen regimes and numerical nonconvergence remain explicit refusals. There is no global-optimum, plant accuracy, novelty or superiority claim.
|
|
58
|
+
|
|
59
|
+
## Repository areas
|
|
60
|
+
|
|
61
|
+
- `src/processsupport/`: numerical core and serializable results.
|
|
62
|
+
- `tests/`: hand-calculated and independently manufactured numerical oracles, unit transformations and negative controls.
|
|
63
|
+
- `docs/`: [API](docs/api.md), [operator theory](docs/operators/operators.md), [design](docs/design/SDD.md), [frameworks](docs/frameworks/frameworks.md) and [own-data guide](docs/guides/guides.md).
|
|
64
|
+
- `scripts/`: matching PowerShell and shell local test entry points.
|
|
65
|
+
- `requirements-test.txt`: exact versions used for local scientific validation.
|
|
66
|
+
- `pyproject.toml`, `VERSION`, `CHANGELOG.md`: package metadata and coherent release version.
|
|
67
|
+
|
|
68
|
+
The library includes no dataset archive, pretrained model, frontend, API service or deployment. Consumer applications own data admission, leakage-safe evaluation, browser exports and scientific publications. Code is MIT licensed; external datasets and artifacts retain their own rights.
|
|
69
|
+
|
|
70
|
+
## Validate locally
|
|
71
|
+
|
|
72
|
+
```powershell
|
|
73
|
+
python -m pip install -r requirements-test.txt
|
|
74
|
+
python -m pytest tests -q -p no:cacheprovider
|
|
75
|
+
python -m compileall -q src
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The numerical tests establish implementation behavior on their stated fixtures. They do not establish generalization across ore bodies, plants or operating regimes. See the [complete documentation](docs/README.md) before applying a reference model to physical data.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# ProcessSupport
|
|
2
|
+
|
|
3
|
+
Physical-support operators and constrained transport-response estimation for reproducible process data analysis. The independent Python distribution is `processsupport`; the repository contains the reusable numerical library, its tests and documentation. Display version 0.01.000 corresponds to distribution version 0.1.0.
|
|
4
|
+
|
|
5
|
+
The library preserves what an observation represents, when it was available and which physical quantities a model predicts. It supplies support-weighted composites, release-aware alignment, quality profiles, metric IDW and real PyKrige adapters, dimensional process references, constrained reconciliation, a Joseph-form linear observer, robust healthy-reference scores, finite-rank intervals and joint transport-response estimation.
|
|
6
|
+
|
|
7
|
+
## Install and calculate
|
|
8
|
+
|
|
9
|
+
Install the exact version with an isolated environment's Python. The optional `spatial` extra includes PyKrige 1.7.3. NumPy and SciPy are required; no neural training stack is imported.
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
python -m pip install "processsupport==0.1.0"
|
|
13
|
+
# Optional spatial interpolation engine:
|
|
14
|
+
python -m pip install "processsupport[spatial]==0.1.0"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from processsupport.support import composite
|
|
19
|
+
from processsupport.reconciliation import reconcile
|
|
20
|
+
|
|
21
|
+
grade = composite([1, 3], [1, 3], unit="%", basis="dry-solids",
|
|
22
|
+
weight_basis="mass", row_ids=["interval-a", "interval-b"])
|
|
23
|
+
assert grade.value == 2.5
|
|
24
|
+
flows = reconcile([10, 4, 5], [[1, 0, 0], [0, 1, 0], [0, 0, 1]],
|
|
25
|
+
[[1, -1, -1]], [0])
|
|
26
|
+
print(flows.value) # [9.66666667, 4.33333333, 5.33333333]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
These are authored numerical examples, not measurements from a mine. `NumericalResult` retains NumPy arrays and diagnostics; `to_dict()` is JSON-safe. `ScientificRefusal` names an unsupported calculation instead of manufacturing a substitute answer. An unbounded interval uses an explicit state and null bounds. Unknown release time never becomes zero delay.
|
|
30
|
+
|
|
31
|
+
## Transport-response estimation
|
|
32
|
+
|
|
33
|
+
`processsupport.transport.SupportTransportRegressor` jointly fits a nonnegative normalized lag kernel and a linear response against known observation supports and optionally available physical balances. It uses eight starts, augmented least squares and analytic-gradient constrained SLSQP blocks. It retains convergence, physical output violations, identification rank, block-bootstrap and mean-lag profile evidence separately.
|
|
34
|
+
|
|
35
|
+
A predictive fit does not establish recovered residence time. Required bootstrap/profile diagnostics must finish before physical interpretation is admitted; weak excitation, unknown support, unseen regimes and numerical nonconvergence remain explicit refusals. There is no global-optimum, plant accuracy, novelty or superiority claim.
|
|
36
|
+
|
|
37
|
+
## Repository areas
|
|
38
|
+
|
|
39
|
+
- `src/processsupport/`: numerical core and serializable results.
|
|
40
|
+
- `tests/`: hand-calculated and independently manufactured numerical oracles, unit transformations and negative controls.
|
|
41
|
+
- `docs/`: [API](docs/api.md), [operator theory](docs/operators/operators.md), [design](docs/design/SDD.md), [frameworks](docs/frameworks/frameworks.md) and [own-data guide](docs/guides/guides.md).
|
|
42
|
+
- `scripts/`: matching PowerShell and shell local test entry points.
|
|
43
|
+
- `requirements-test.txt`: exact versions used for local scientific validation.
|
|
44
|
+
- `pyproject.toml`, `VERSION`, `CHANGELOG.md`: package metadata and coherent release version.
|
|
45
|
+
|
|
46
|
+
The library includes no dataset archive, pretrained model, frontend, API service or deployment. Consumer applications own data admission, leakage-safe evaluation, browser exports and scientific publications. Code is MIT licensed; external datasets and artifacts retain their own rights.
|
|
47
|
+
|
|
48
|
+
## Validate locally
|
|
49
|
+
|
|
50
|
+
```powershell
|
|
51
|
+
python -m pip install -r requirements-test.txt
|
|
52
|
+
python -m pytest tests -q -p no:cacheprovider
|
|
53
|
+
python -m compileall -q src
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The numerical tests establish implementation behavior on their stated fixtures. They do not establish generalization across ore bodies, plants or operating regimes. See the [complete documentation](docs/README.md) before applying a reference model to physical data.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.01.000
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# ProcessSupport documentation
|
|
2
|
+
|
|
3
|
+
ProcessSupport is an independent numerical library for physical observations, their support and their availability. It is a reusable engine rather than a dataset, a controller or a promise of plant accuracy.
|
|
4
|
+
|
|
5
|
+
- [Public API and error contract](api.md): exact arguments, numerical results, serialization and refused states.
|
|
6
|
+
- [Architecture and design](design/SDD.md): responsibilities, numerical invariants and requirement-to-test evidence.
|
|
7
|
+
- [Physical and statistical operators](operators/operators.md): definitions, dimensional conventions, assumptions and worked calculations.
|
|
8
|
+
- [Transport-response estimation](design/support-transport.md): the reviewed objective, alternating solver, identification, uncertainty and comparison protocol.
|
|
9
|
+
- [Independent generator recipe](design/transport-generator.json): explicitly authored synthetic evidence and evaluation-only truth.
|
|
10
|
+
- [Using your own data](guides/guides.md): source identities, units, supports, releases and a reproducible installation.
|
|
11
|
+
- [Framework adapters](frameworks/frameworks.md): real SciPy and PyKrige calls and numerical limitations.
|
|
12
|
+
|
|
13
|
+
The library contains no authentic source data or pretrained mining model. Applications remain responsible for admitting source licenses, constructing leakage-safe tasks and executing their full comparative studies.
|
|
14
|
+
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# ProcessSupport API 0.1.0
|
|
2
|
+
|
|
3
|
+
This is the frozen integration interface for the independent numerical library. Numerical arrays use NumPy float64. No function reads a model, source or split from a global directory. Units, source-row identities, physical support and information availability are caller-declared, validated and retained. Empty, nonfinite, incompatible, singular, unidentifiable and unsupported inputs never become a fabricated solution.
|
|
4
|
+
|
|
5
|
+
## Results and failures
|
|
6
|
+
|
|
7
|
+
Successful functions return `NumericalResult(value, diagnostics, source_ids, status, unit, basis)`. Python `value` retains numerical arrays; `predictions` is an alias for numerical prediction arrays. `to_dict()` recursively converts arrays and scalars to JSON-safe objects. Nonfinite bounds are represented with explicit interval states and null bounds, never JSON NaN or Infinity. The estimator's `fit` returns the fitted estimator, with `fit_result_` and its diagnostics; `predict` returns a `NumericalResult`.
|
|
8
|
+
|
|
9
|
+
Invalid scientific semantics raise `ScientificRefusal(code, message, field=None, details=None, reference=None)`. Its `to_dict()` is JSON-safe. A refusal may carry an explicitly named unconstrained or predictive reference; it is not an accepted constrained estimate. An absent optional engine raises `DependencyUnavailable`, a subtype of `ScientificRefusal`. Invalid Python types and shapes are also reported as typed refusals. Callers must not silently replace them with synthetic data.
|
|
10
|
+
|
|
11
|
+
## Support and availability
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
support.composite(values, weights, *, unit, basis, weight_basis,
|
|
15
|
+
missing_policy="reject", row_ids=None, source_ids=(),
|
|
16
|
+
value_bases=None, censoring=None)
|
|
17
|
+
alignment.asof(observation_times, release_times, values, decision_times, *,
|
|
18
|
+
max_age_s, timebase, row_ids=None, source_ids=(),
|
|
19
|
+
availability_status=None, retrospective=False)
|
|
20
|
+
quality.profile(values, time_s, *, train_indices=None, reference=None,
|
|
21
|
+
window=10, drift_z=3.0, missing_policy="preserve",
|
|
22
|
+
max_fill_gap=0, row_ids=None, source_ids=())
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`asof` accepts numeric verified UTC or relative seconds. A bounded release is supplied as its documented upper bound with status `bounded-upper`; an unknown release is excluded. Local/DST-ambiguous and unknown timebases refuse. The selected row is the latest observed row already released at that decision; ties with conflicting values refuse. Age is measured from observation end. Retrospective mode remains explicitly offline and still excludes unknown release records. The quality reference is fitted only on explicit training indices or supplied as the frozen returned reference.
|
|
26
|
+
|
|
27
|
+
## Spatial and physical reference operators
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
spatial.idw(coordinates, values, queries, *, frame, power=2.0, neighbors=16,
|
|
31
|
+
support_weights=None, row_ids=None, source_ids=(),
|
|
32
|
+
replicate_policy="matching-only")
|
|
33
|
+
spatial.kriging(coordinates, values, queries, *, frame, dimension=2,
|
|
34
|
+
variogram_model="spherical", variogram_parameters=None,
|
|
35
|
+
nlags=6, row_ids=None, source_ids=())
|
|
36
|
+
blasting.kuznetsov(rock_factor, rock_volume_m3, explosive_kg,
|
|
37
|
+
relative_strength_pct, *, size_unit="cm", source_ids=())
|
|
38
|
+
energy.bond(f80, p80, work_index, *, size_unit="um",
|
|
39
|
+
work_index_unit="kWh/t", source_ids=())
|
|
40
|
+
particles.fit_rosin_rammler(sizes, cumulative_fraction, *, size_unit="um",
|
|
41
|
+
max_nfev=2000, source_ids=())
|
|
42
|
+
kinetics.fit_flotation(times, recovery, *, family="first-order",
|
|
43
|
+
time_unit="min", max_nfev=2000,
|
|
44
|
+
bootstrap_samples=200, seed=11, source_ids=())
|
|
45
|
+
kinetics.fit_leach(times, conversion, *, family="reaction-control",
|
|
46
|
+
time_unit="min", max_nfev=2000, source_ids=())
|
|
47
|
+
settling.fit(times, heights, *, initial_height_m, solids_fraction,
|
|
48
|
+
family="constant-velocity", regime="hindered", area_m2=1.0,
|
|
49
|
+
max_nfev=2000, source_ids=())
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The spatial frame follows the declared frame object: kind, id, axis_units, trajectory_assumption and source_ids. Coordinates must share metre axes and an explicit two- or three-dimensional geometry. `kriging` calls actual PyKrige OrdinaryKriging or OrdinaryKriging3D, never discards depth and never adds an undocumented nugget. Conflicting coincident samples refuse without a declared replicate/noise policy. Reference fits return curve arrays as `value`, parameters and numerical diagnostics under `diagnostics`.
|
|
53
|
+
|
|
54
|
+
`settling.fit` takes `solids_fraction` as the initial solids volume fraction. A mass fraction cannot be substituted without both solid and liquid densities and a separate explicit conversion. Returned diagnostics name the volume basis.
|
|
55
|
+
|
|
56
|
+
## Reconciliation, observer and baseline
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
reconciliation.reconcile(measured, covariance, A, b, *, nonnegative=False,
|
|
60
|
+
tolerance=1e-8, units=None, constraint_units=None,
|
|
61
|
+
source_ids=())
|
|
62
|
+
observer.kalman(F, H, Q, R, observations, initial_state, initial_covariance, *,
|
|
63
|
+
nonnegative=False, dt_s=1.0, source_ids=())
|
|
64
|
+
baselines.persistence(observation_times, release_times, values, decision_times,
|
|
65
|
+
*, max_age_s, timebase, row_ids=None, source_ids=())
|
|
66
|
+
baselines.fit_healthy_reference(train_features, *, feature_names=None,
|
|
67
|
+
feature_units=None, source_ids=())
|
|
68
|
+
baselines.healthy_distance(reference, query_features, *, clip=5.0,
|
|
69
|
+
source_ids=())
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Reconciliation returns an affine feasible vector and retains standardized residuals, raw closure and a gross-error flag. Covariance must be symmetric positive definite and the independent constraint rows full rank. The observer uses the Joseph update and refuses a materially negative posterior when nonnegativity is requested. It retains the unconstrained reference without clipping its state. The healthy reference records medians, IQR/1.349, nonconstant mask and ordered features/units; no remaining feature is a typed refusal. Anomaly threshold selection stays with the caller's separate calibration split.
|
|
73
|
+
|
|
74
|
+
## Intervals
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
uncertainty.split_conformal(calibration_residuals, predictions, *, alpha=0.10,
|
|
78
|
+
source_ids=())
|
|
79
|
+
uncertainty.aci(predictions, calibration_residuals, released_targets, *,
|
|
80
|
+
decision_times_s, target_release_times_s, availability_status,
|
|
81
|
+
forecast_ids, timebase, alpha=0.10, gamma=0.01,
|
|
82
|
+
zero_latency=False, source_ids=())
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
ACI is deterministic replay from the supplied initial calibration. It stores each original interval, predicts before consuming same-instant feedback by default, and updates each released outcome exactly once in release order. Alpha is never clipped. `alpha <= 0` is unbounded and `alpha >= 1` is empty. Split-conformal rank above the calibration count is unbounded. JSON bounds are null for these states. Unknown online timebase refuses; unknown releases never update.
|
|
86
|
+
|
|
87
|
+
## Transport-response estimator
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
SupportTransportRegressor(ridge=0.1, balance_weight=1.0, smoothness=0.01,
|
|
91
|
+
seed=11, max_iter=100, kernel_max_iter=200,
|
|
92
|
+
ablation="none")
|
|
93
|
+
estimator.fit(X, Y, *, support, observation_sigma, regime_ids,
|
|
94
|
+
train_indices, validation_indices=(), balance_matrix=None,
|
|
95
|
+
balance_target=None, balance_sigma=None, source_ids=None,
|
|
96
|
+
feature_names=None, feature_units=None, output_names=None,
|
|
97
|
+
output_units=None, availability=None, dependency_groups=None,
|
|
98
|
+
observation_ids=None)
|
|
99
|
+
estimator.predict(X, *, support, regime_ids, availability=None,
|
|
100
|
+
feature_names=None, feature_units=None,
|
|
101
|
+
source_ids=(), require_identified=False, observation_ids=None)
|
|
102
|
+
estimator.bootstrap(X, Y, *, groups, n_bootstrap=200, seed=11, **fit_kwargs)
|
|
103
|
+
estimator.profile_mean_lag(X, Y, *, regime, grid=None, **fit_kwargs)
|
|
104
|
+
estimator.to_dict()
|
|
105
|
+
SupportTransportRegressor.from_dict(state)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`X[n,L,p]`, `Y[m,q]`, known `support[m,n]`, `observation_sigma[m,q]`, regime IDs of length n, optional `balance_matrix[k,q]`, `balance_target[n,k]` and `balance_sigma[n,k]` preserve their physical meanings. Train and validation indices refer to observation rows of H/Y. Scaling and balance rows use only grid rows covered by TRAIN supports. Overlapping train/held-out supports refuse. Validation values never optimize a start; candidate selection remains outside this estimator.
|
|
109
|
+
|
|
110
|
+
The augmented response matrix is checked before allocation and refuses a projected size above 128 MiB. This bound covers the matrix itself, not total process memory. Input-unit re-expression is handled by the training-fitted feature scale. Output coefficients remain physical, so converting every output by a common factor c requires ridge divided by c squared, alongside coherent conversion of targets, uncertainty and balances. An unchanged numeric ridge is not an output-unit-invariance claim.
|
|
111
|
+
|
|
112
|
+
Known ordered `feature_units` and `output_units` are required despite their null defaults in the signature: omission is a typed `missing-units` refusal. A default never supplies an invented physical unit. Reconciliation without unit metadata is explicitly abstract affine algebra; its diagnostic says `abstract-unspecified`. Physical consumers must declare units and validate material bases before calling it.
|
|
113
|
+
|
|
114
|
+
`availability` is either null, explicitly recording an offline-only fit, or a mapping containing history release times and grid decision times in verified seconds. An online call must supply known releases no later than the corresponding decision. Unknown support refuses. Missing balance information is refused when balance_weight is positive; balance_weight zero allows the explicitly named no-balance fit.
|
|
115
|
+
|
|
116
|
+
Fit diagnostics separate convergence, prediction and identification. A positive local rank diagnostic is provisional until the complete bootstrap and profile are available. `require_identified=True` requires all three diagnostics; weak rank, ambiguity or an unfinished diagnostic refuses the physical interpretation. A single lag has no free transport parameter and never establishes recovered residence time. Unseen regimes and changed training-constant features refuse. Negative flow predictions are retained and flagged as physical output refusals, never clipped. Bootstrap and profile are explicit calls so orchestration can run their predeclared full budgets independently of fit. Their outputs never imply universal coverage or plant validity. Serialization records version, ordered names/units, scaling/masks, original observation IDs, source/training identities, kernels, parameters, objective traces, constraints and identification diagnostics.
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
Post-fit bootstrap and profile calls verify the original TRAIN observation IDs, support, numerical training values, regimes, available balances and unit order against the fitted state's hashes. Expanding a diagnostic into held-out rows or changing the physical problem is a typed refusal. Two to199bootstrap refits are explicit exploratory partial results; only200successful refits complete that diagnostic. Each regime requires its distinct fixed13-point mean-lag profile. Completing one regime never certifies an unprofiled regime. Restored states retain the same known-unit and unique-name checks as fitting. Generic2Dmetric geometry does not assert observed collar lineage; the consumer supplies that evidence.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# ProcessSupport numerical design
|
|
2
|
+
|
|
3
|
+
Version 1.0.0. The numerical component is independently installable as processsupport 0.1.0. Its boundary accepts explicitly declared observations, histories, support weights, physical units and available information. It returns numerical results with diagnostics or a typed refusal. It neither retrieves hidden simulator truth nor invokes a product pipeline.
|
|
4
|
+
|
|
5
|
+
## Ownership and non-goals
|
|
6
|
+
|
|
7
|
+
The core owns weighted support, causal alignment, quality profiles, metric interpolation, physical reference models, constrained reconciliation, a linear inventory observer, healthy-reference distances, conformal intervals and transport-response estimation. Learned tree, Gaussian-process, convolutional and autoencoder pipelines remain external consumers. A spatial drawing with assumed depth is never a surveyed trajectory. A successful fit is never evidence of plant control safety or recovered physical transport.
|
|
8
|
+
|
|
9
|
+
## Contracts
|
|
10
|
+
|
|
11
|
+
The public signatures and typed failure/result contract are in [api.md](../api.md). Observation, aligned-case and model-io version 1.0.0 meanings are retained: original source IDs, ordered features/units, explicit availability status and support identity. Unknown availability remains offline-only. A result's `to_dict` contains JSON-safe values; unbounded and empty intervals have explicit states and null endpoints.
|
|
12
|
+
|
|
13
|
+
## Numerical requirements and verification
|
|
14
|
+
|
|
15
|
+
| ID | Requirement | Gate |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| PS-01 | THE composite SHALL use positive declared compatible support and retain row contributions. | tests/test_operators.py::test_support_hand_calculation_and_lineage |
|
|
18
|
+
| PS-02 | WHEN a decision occurs, THE aligner SHALL exclude future, unknown and stale releases. | tests/test_operators.py::test_asof_release_boundary_unknown_stale |
|
|
19
|
+
| PS-03 | THE reconciliation SHALL solve the declared covariance-weighted affine problem without hiding raw discrepancies. | tests/test_operators.py::test_affine_reconciliation_independent_solution |
|
|
20
|
+
| PS-04 | IF covariance or physical state is invalid, THEN THE core SHALL refuse rather than silently clip. | tests/test_operators.py::test_reconcile_infeasible_and_singular_refuse; tests/test_operators.py::test_joseph_observer_analytic_update_and_negative_refusal |
|
|
21
|
+
| PS-05 | THE physical reference fits SHALL recover independently manufactured particle, kinetic and dimensional examples. | tests/test_operators.py::test_particle_quantile_manufactured_oracle; test_flotation_actual_fit_and_bootstrap; test_leach_independent_inverse_oracle; test_bond_units_and_exact_reference |
|
|
22
|
+
| PS-06 | THE settling fit SHALL preserve the explicit solids and water inventory. | tests/test_operators.py::test_settling_conservation_and_compression_refusal |
|
|
23
|
+
| PS-07 | THE anomaly reference SHALL fit only supplied training data and retain zero-information masks. | tests/test_operators.py::test_healthy_distance_unit_equivariance_constant_mask |
|
|
24
|
+
| PS-08 | THE interval core SHALL preserve exact finite ranks, original intervals and once-only delayed updates. | tests/test_operators.py::test_conformal_exact_rank_and_unsupported_rank; test_delayed_aci_uses_original_interval_once |
|
|
25
|
+
| PS-09 | THE transport solver SHALL use the reviewed constrained alternating objective and independently verified analytic derivatives. | tests/test_transport.py::test_gradient_matches_finite_difference; test_simplex_and_monotone_blocks |
|
|
26
|
+
| PS-10 | IF transport is unsupported, weakly identified or unconverged, THEN THE estimator SHALL refuse the affected interpretation. | tests/test_transport.py::test_unknown_support_refuses; test_weak_identification_refuses; test_nonconvergence_not_hidden |
|
|
27
|
+
| PS-11 | THE fitted state SHALL preserve names, units, split identities and numerical predictions across serialization. | tests/test_transport.py::test_serialization_and_test_truth_never_enters_fit |
|
|
28
|
+
|
|
29
|
+
## Algorithm and oracle
|
|
30
|
+
|
|
31
|
+
The complete [support-transport design](support-transport.md) governs the objective, eight starts, least-squares response block, SLSQP simplex blocks, nonincreasing objective, convergence criteria, unregularized identification Jacobian, block bootstrap and mean-lag profile. Independent tests use direct hand calculations and manufactured functions, rather than using the estimator to generate its own expected outputs. The generator recipe is separately authored and is never an estimator helper.
|
|
32
|
+
|
|
33
|
+
All output flows remain physical. Feature scaling is fitted only on grid rows covered by TRAIN support. Validation labels do not select starts. Training and held-out supports may not overlap. Optional balances must actually be available, with declared positive uncertainty. Regularization and smoothness rows never count as data identification. Prediction and physical identification are separate result fields.
|
|
34
|
+
|
|
35
|
+
## Boundaries and acceptance
|
|
36
|
+
|
|
37
|
+
Each numerical function validates finite arrays, shapes, domains, declared units and its applicable support/availability semantics. Numerical tolerance constants are dimensionless or explicitly relative to a declared scale. The library makes no filesystem choice, network call or model-provider substitution. Optional PyKrige absence is an explicit dependency refusal. The local wheel must be installed into a consumer environment and the full numerical suite must pass before integration acceptance. Publication, complete product comparisons and operational validation are separate evidence.
|