Skip to content

Commit e8307cf

Browse files
committed
Refine README overview and citations
1 parent 30689d7 commit e8307cf

2 files changed

Lines changed: 169 additions & 132 deletions

File tree

README.md

Lines changed: 84 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -11,68 +11,83 @@ It defines problems once and reuses them across UQ workflows.
1111

1212
## What UQPyL solves
1313

14-
UQPyL targets uncertainty problems in computational modeling: how uncertain parameters affect outputs, which inputs matter most, how to calibrate models against observations, and how to search for robust or optimal decisions.
14+
UQPyL provides a shared problem interface for common uncertainty quantification workflows.
1515

16-
These workflows are common across model-based domains, especially in hydrology, water resources, and water engineering.
16+
Define the model or decision problem once, then reuse it for:
1717

18-
| Task | Examples | What UQPyL provides |
19-
|---|---|---|
20-
| Explore parameter spaces | Generate candidate hydrological parameter sets. | Design of experiment methods for reproducible sampling. |
21-
| Understand input influence | Identify which parameters dominate flow, load, or other model outputs. | Sensitivity and uncertainty analysis methods. |
22-
| Search for good parameters | Calibrate parameters or optimize engineering decisions. | Single-objective, multi-objective, and expensive-model optimization algorithms. |
23-
| Estimate plausible parameters | Sample parameter distributions under uncertainty. | MCMC-style inference methods. |
24-
| Calibrate simulation models | Compare simulated series with observations. | Calibration methods based on `ModelProblem`. |
25-
| Reduce expensive evaluations | Build a cheaper approximation of a slow model run. | Surrogate models and surrogate-assisted workflows. |
18+
- design of experiments
19+
- sensitivity and uncertainty analysis
20+
- optimization
21+
- Bayesian-style inference
22+
- model calibration
23+
- surrogate modeling
24+
25+
After a problem is defined, all UQPyL modules can work with the same object and remain connected across workflows.
26+
27+
<p align="center">
28+
<img src="./docs_v2/assets/architecture.png" alt="UQPyL architecture overview" width="1000"/>
29+
</p>
2630

27-
## Core idea: define once, reuse everywhere
31+
## Problem abstraction
32+
33+
`Problem` is the main entry point of UQPyL. It turns a model, benchmark function, or decision task into a reusable object that other modules can use.
2834

29-
UQPyL does not own your model logic. Instead, you wrap your model or decision problem as a shared `problem` definition with:
35+
To build a `Problem`, define:
3036

31-
| Part | Meaning |
37+
| Part | Role |
3238
|---|---|
33-
| Input space | Variables, bounds, labels, and variable types. |
34-
| Evaluation rule | How a batch of inputs becomes objectives, constraints, or extract required simulation data. |
35-
| Optimization direction | Whether each objective is minimized or maximized. |
36-
| Runtime identity | A name and metadata used by saved runs and summaries. |
39+
| Input space | Number of variables, bounds, labels, and variable types. |
40+
| Evaluation rule | How input samples become objectives and optional constraints. |
41+
| Additional information | Optimization direction, problem name, and metadata for algorithms, outputs, logs, and saved results. |
3742

38-
Once defined, the same object can be reused by DOE, analysis, optimization, inference, surrogate workflows, and calibration. Some workflows also need explicit model-aware information such as simulations and observations.
43+
For example:
3944

40-
## Problem abstraction
45+
```python
46+
import numpy as np
47+
48+
from UQPyL.problem import Problem
4149

42-
The `problem` module is the conceptual entry point of UQPyL.
4350

44-
| Abstraction Python Class | Role |
45-
|---|---|
46-
| `Problem` | For methods that only need final objective or constraint values. |
47-
| `ModelProblem` | For methods that need explicit model-process semantics such as `sim` or `obs`. |
51+
def objFunc(X):
52+
X = np.atleast_2d(X)
53+
return np.sum(X**2, axis=1, keepdims=True)
4854

49-
Both abstractions share the same foundation:
5055

51-
| Building block | Role |
52-
|---|---|
53-
| `Space` | Defines variables, bounds, labels, and variable types. |
54-
| `Eval` | Standard return object for evaluated results. |
56+
problem = Problem(
57+
# Input space
58+
nInput=2, lb=-1.0, ub=1.0,
59+
60+
# Evaluation rule
61+
nObj=1, objFunc=objFunc,
62+
63+
# Additional information
64+
optType="min", name="Sphere2D",
65+
)
66+
```
67+
68+
This is enough for workflows that only need evaluated objectives or constraints, including DOE, analysis, optimization, inference, and surrogate modeling.
5569

56-
The module also includes benchmark problems such as `Sphere`, `Ackley` and so on for single-objective optimization; `ZDT`, and `DTLZ` for multi-objective optimization.
70+
For many hydrological simulation problems, the workflow needs more than final objective values. Calibration and uncertainty analysis may need the simulated and observed time series, and the valid observation mask to remain available throughout the method.
5771

58-
Use `Problem` when methods only need final objectives or constraints from candidate inputs. `Problem` can still be used for model-based problems when those final values are enough. Use `ModelProblem` only when methods need explicit simulations, observations or simulated-versus-observed comparison. In the current design, this mainly applies to calibration module (`IES`, `ES`, `GLUE`, `SUFI2`).
72+
`ModelProblem` extends `Problem` for this case. It adds:
73+
74+
| Extra part | Role |
75+
|---|---|
76+
| `simFunc` | Runs the model and returns simulated series or fields. |
77+
| `obs` / `mask` | Stores observed data and marks valid entries for simulation-observation comparison. |
78+
79+
Use `Problem` by default. Use `ModelProblem` when a method needs simulation-process semantics, such as calibration methods that compare `sim` with `obs`. See the [documentation](https://uqpyl.readthedocs.io) for detailed usage.
5980

6081
<p align="center">
6182
<img src="./docs_v2/assets/Problem.webp" alt="Problem and ModelProblem comparison" width="1000"/>
6283
</p>
6384

64-
For hydrological models, the hard part is often model connection rather than the algorithm itself. For that layer, we recommend [hydroPilot](https://github.com/smasky/hydroPilot).
85+
For hydrological applications, the hard part is often not the UQ algorithm itself, but connecting an external model, preparing inputs, running simulations, and collecting outputs. [hydroPilot](https://github.com/smasky/hydroPilot) is designed for that model-operation layer. It can be used with UQPyL when you want hydroPilot to manage hydrological model runs and UQPyL to handle sampling, analysis, calibration, optimization, inference, or surrogate modeling.
6586

6687
## Architecture overview
6788

6889
UQPyL is organized around one shared `problem` abstraction and a set of functional modules built around it.
6990

70-
<p align="center">
71-
<img src="./docs_v2/assets/architecture.png" alt="UQPyL architecture overview" width="1000"/>
72-
</p>
73-
74-
The figure summarizes the main idea: represent a modeling task as a shared `problem` definition, then reuse that definition across DOE, analysis, optimization, inference, calibration, and surrogate workflows, with unified outputs and optional runtime storage. You can freely organize your workflows.
75-
7691
| Type | Module | Purpose |
7792
|---|---|---|
7893
| Core | `problem` | Define parameter spaces, evaluation rules, objectives, constraints, simulations, and related metadata. |
@@ -82,21 +97,9 @@ The figure summarizes the main idea: represent a modeling task as a shared `prob
8297
| Function | `inference` | Run MCMC-style parameter inference. |
8398
| Function | `calibration` | Calibrate simulation models against observations. |
8499
| Function | `surrogate` | Train and evaluate surrogate models for expensive evaluations. |
100+
| Support | `runtime`, `viz` | Save structured run results, logs, intermediate states, and provide visualization utilities. |
85101

86-
Visualization, runtime storage, logs, and readers are exposed through the functional modules rather than treated as primary entry points.
87-
88-
## Typical workflows
89-
90-
Common workflows patterns all lead to structured outputs and optional runtime storage.
91-
92-
```text
93-
Problem -> DOE -> Analysis -> outputs
94-
Problem -> DOE -> Analysis -> Inference -> outputs
95-
ModelProblem -> Calibration -> outputs
96-
Problem -> DOE -> Surrogate -> Optimization
97-
```
98-
99-
## Quick start examples
102+
## Quick start
100103

101104
### Optimization with `Problem`
102105

@@ -160,17 +163,9 @@ X = np.linspace(0.5, 1.5, 32).reshape(-1, 1)
160163
result = GLUE(metric="rmse").run(problem, X, threshold=0.2)
161164
```
162165

163-
Methods return structured result objects such as `OptResult`, `AnaResult`, `InfResult`, or `CalResult`.
164-
165166
## Modules at a glance
166167

167-
| Goal | Start with |
168-
|---|---|
169-
| Sample a parameter space | `doe` |
170-
| Identify influential inputs | `analysis` |
171-
| Search for good parameters | `optimization` with `SCE_UA` |
172-
| Fit model parameters to observations | `calibration` with `ModelProblem` |
173-
| Build a fast approximation of an expensive model | `surrogate` |
168+
The table lists representative methods, not the full API. See the [documentation](https://uqpyl.readthedocs.io) for complete module-specific usage and API details.
174169

175170
| Module | Representative methods |
176171
|---|---|
@@ -181,8 +176,6 @@ Methods return structured result objects such as `OptResult`, `AnaResult`, `InfR
181176
| `calibration` | `GLUE`, `SUFI2`, `ES`, `IES` |
182177
| `surrogate` | `RBF`, `GPR`, `KRG`, `LinearRegression`, `PolynomialRegression`, `AutoTuner` |
183178

184-
For many single-objective hydrological and engineering calibration problems, `SCE_UA` is a good starting point.
185-
186179
## Runtime output and saving
187180

188181
Most runnable methods expose three common runtime controls.
@@ -239,13 +232,11 @@ from UQPyL.analysis import Sobol
239232
from UQPyL.doe import SaltelliDesign
240233
from UQPyL.problem import Problem
241234

242-
243235
def objFunc(X):
244236
X = np.atleast_2d(X)
245237
y = np.sin(X[:, 0]) + 7 * np.sin(X[:, 1])**2 + 0.1 * X[:, 2]**4 * np.sin(X[:, 0])
246238
return y[:, None]
247239

248-
249240
problem = Problem(
250241
nInput=3, nObj=1,
251242
lb=-np.pi, ub=np.pi,
@@ -281,11 +272,36 @@ pip install .
281272

282273
## Citation
283274

284-
Citation information for **UQPyL 2** will be updated.
275+
For UQPyL 2.0, please cite the preprint:
276+
277+
Wu, M., Sun, R., Xu, P., Yang, X., Hu, P., & Duan, Q. UQPyL 2.0: An Open-Source Python Package for Uncertainty Quantification and Optimization. Available at SSRN: https://ssrn.com/abstract=5393295 or http://dx.doi.org/10.2139/ssrn.5393295
278+
279+
```bibtex
280+
@misc{wu2025uqpyl2,
281+
title = {UQPyL 2.0: An Open-Source Python Package for Uncertainty Quantification and Optimization},
282+
author = {Wu, Mengtian and Sun, Ruochen and Xu, Pengcheng and Yang, Xu and Hu, Pengjie and Duan, Qingyun},
283+
year = {2025},
284+
note = {SSRN preprint},
285+
doi = {10.2139/ssrn.5393295},
286+
url = {https://ssrn.com/abstract=5393295}
287+
}
288+
```
289+
290+
For UQPyL 1.0, please cite:
285291

286-
For UQPyL 1.0, see:
292+
Wang, C., Duan, Q., Tong, C. H., Di, Z., & Gong, W. (2016). A GUI platform for uncertainty quantification of complex dynamical models. *Environmental Modelling & Software*, 76, 1-12. https://doi.org/10.1016/j.envsoft.2015.11.004
287293

288-
- <https://www.sciencedirect.com/science/article/pii/S1364815215300955>
294+
```bibtex
295+
@article{wang2016uqpyl,
296+
title = {A GUI platform for uncertainty quantification of complex dynamical models},
297+
author = {Wang, Chen and Duan, Qingyun and Tong, Charles H. and Di, Zhenhua and Gong, Wei},
298+
journal = {Environmental Modelling & Software},
299+
volume = {76},
300+
pages = {1--12},
301+
year = {2016},
302+
doi = {10.1016/j.envsoft.2015.11.004}
303+
}
304+
```
289305

290306
## Contributing
291307

0 commit comments

Comments
 (0)