Skip to content

Commit

Permalink
Merge pull request #367 from damar-wicaksono/dev-350
Browse files Browse the repository at this point in the history
Rename `spatial_dimension` to `input_dimension`
  • Loading branch information
damar-wicaksono authored Nov 4, 2024
2 parents bd1e85a + 836c598 commit 529eb47
Show file tree
Hide file tree
Showing 102 changed files with 723 additions and 705 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- The property `spatial_dimension` of `ProbInput` and `UQTestFunBareABC` is
renamed to `input_dimension` for clarity (as opposed to `output_dimension`).
- The property `name` of UQ test function instances has been renamed to
`function_id` that implies uniqueness although it is not strictly enforced.
- The parameter in the Gramacy 1D sine function is now removed. Noise can
Expand Down
16 changes: 9 additions & 7 deletions docs/development/adding-test-function-implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ A concrete implementation of this base class requires the following:

- a static method named `evaluate()`
- several class-level properties, namely: `_tags`, `_description`,
`_available_inputs`, `_available_parameters`, `_default_spatial_dimension`,
`_available_inputs`, `_available_parameters`, `_default_input_dimension`,
`_default_input`, and `_default_parameters`.

The full definition of the class for the Branin test function is shown below.
Expand All @@ -303,7 +303,7 @@ class Branin(UQTestFunABC):
_description = "Branin function from Dixon and Szegö (1978)" # Short description
_available_inputs = AVAILABLE_INPUT_SPECS # As defined above
_available_parameters = AVAILABLE_PARAMETERS # As defined above
_default_spatial_dimension = 2 # Spatial dimension of the function
_default_input_dimension = 2 # input dimension of the function
_default_input = "Dixon1978" # Optional, if only one input is available
_default_parameters = "Dixon1978" # Optional, if only one set of parameters is available

Expand Down Expand Up @@ -346,11 +346,13 @@ built-in functions from a Python terminal.
```python
>>> import uqtestfuns as uqtf
>>> uqtf.list_functions()
No. Constructor Spatial Dimension Application Description
----- ------------------ ------------------- -------------------------- ----------------------------------------------------------------------------
1 Ackley() M optimization, metamodeling Ackley function from Ackley (1987)
2 Borehole() 8 metamodeling, sensitivity Borehole function from Harper and Gupta (1983)
3 Branin() 2 optimization Branin function from Dixon and Szegö (1978)
No. Constructor Input Dim. Parameterized Application Description
----- ----------------------------- ------------ --------------- -------------------------------------- ----------------------------------------------------------------------------
1 Ackley() M True optimization, metamodeling Optimization test function from Ackley (1987)
2 Alemazkoor20D() 20 False metamodeling High-dimensional low-degree polynomial from Alemazkoor & Meidani (2018)
3 Alemazkoor2D() 2 False metamodeling Low-dimensional high-degree polynomial from Alemazkoor & Meidani (2018)
4 Borehole() 8 False metamodeling, sensitivity Borehole function from Harper and Gupta (1983)
5 Branin() 2 True optimization Branin function from Dixon and Szegö (1978)
...
```

Expand Down
16 changes: 8 additions & 8 deletions docs/fundamentals/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ kernelspec:
The table below listed the available test functions typically used
in the testing and comparison of numerical integration method.

| Name | Spatial Dimension | Constructor |
|:------------------------------------------------------------:|:-----------------:|:-------------------:|
| {ref}`Bratley et al. (1992) A <test-functions:bratley1992a>` | M | `Bratley1992a()` |
| {ref}`Bratley et al. (1992) B <test-functions:bratley1992b>` | M | `Bratley1992b()` |
| {ref}`Bratley et al. (1992) C <test-functions:bratley1992c>` | M | `Bratley1992c()` |
| {ref}`Bratley et al. (1992) D <test-functions:bratley1992d>` | M | `Bratley1992d()` |
| {ref}`Sobol'-G <test-functions:sobol-g>` | M | `SobolG()` |
| {ref}`Welch et al. (1992) <test-functions:welch1992>` | 20 | `Welch1992()` |
| Name | Input Dimension | Constructor |
|:------------------------------------------------------------:|:---------------:|:-------------------:|
| {ref}`Bratley et al. (1992) A <test-functions:bratley1992a>` | M | `Bratley1992a()` |
| {ref}`Bratley et al. (1992) B <test-functions:bratley1992b>` | M | `Bratley1992b()` |
| {ref}`Bratley et al. (1992) C <test-functions:bratley1992c>` | M | `Bratley1992c()` |
| {ref}`Bratley et al. (1992) D <test-functions:bratley1992d>` | M | `Bratley1992d()` |
| {ref}`Sobol'-G <test-functions:sobol-g>` | M | `SobolG()` |
| {ref}`Welch et al. (1992) <test-functions:welch1992>` | 20 | `Welch1992()` |

In a Python terminal, you can list all the available functions relevant
for metamodeling applications using ``list_functions()`` and filter the results
Expand Down
62 changes: 31 additions & 31 deletions docs/fundamentals/metamodeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,37 @@ kernelspec:
The table below listed the available test functions typically used
in the comparison of metamodeling approaches.

| Name | Spatial Dimension | Constructor |
|:----------------------------------------------------------------------:|:-----------------:|:--------------------:|
| {ref}`Ackley <test-functions:ackley>` | M | `Ackley()` |
| {ref}`Alemazkoor & Meidani (2018) 2D <test-functions:alemazkoor-2d>` | 2 | `Alemazkoor2D()` |
| {ref}`Alemazkoor & Meidani (2018) 20D <test-functions:alemazkoor-20d>` | 20 | `Alemazkoor20D()` |
| {ref}`Borehole <test-functions:borehole>` | 8 | `Borehole()` |
| {ref}`Damped Cosine <test-functions:damped-cosine>` | 1 | `DampedCosine()` |
| {ref}`Damped Oscillator <test-functions:damped-oscillator>` | 7 | `DampedOscillator()` |
| {ref}`Flood <test-functions:flood>` | 8 | `Flood()` |
| {ref}`Forrester et al. (2008) <test-functions:forrester>` | 1 | `Forrester2008()` |
| {ref}`(1st) Franke <test-functions:franke-1>` | 2 | `Franke1()` |
| {ref}`(2nd) Franke <test-functions:franke-2>` | 2 | `Franke2()` |
| {ref}`(3rd) Franke <test-functions:franke-3>` | 2 | `Franke3()` |
| {ref}`(4th) Franke <test-functions:franke-4>` | 2 | `Franke4()` |
| {ref}`(5th) Franke <test-functions:franke-5>` | 2 | `Franke5()` |
| {ref}`(6th) Franke <test-functions:franke-6>` | 2 | `Franke6()` |
| {ref}`Friedman (6D) <test-functions:friedman-6d>` | 6 | `Friedman6D()` |
| {ref}`Friedman (10D) <test-functions:friedman-10d>` | 10 | `Friedman10D()` |
| {ref}`Gramacy (2007) 1D Sine <test-functions:gramacy-1d-sine>` | 1 | `Gramacy1DSine()` |
| {ref}`McLain S1 <test-functions:mclain-s1>` | 2 | `McLainS1()` |
| {ref}`McLain S2 <test-functions:mclain-s2>` | 2 | `McLainS2()` |
| {ref}`McLain S3 <test-functions:mclain-s3>` | 2 | `McLainS3()` |
| {ref}`McLain S4 <test-functions:mclain-s4>` | 2 | `McLainS4()` |
| {ref}`McLain S5 <test-functions:mclain-s5>` | 2 | `McLainS5()` |
| {ref}`Oakley & O'Hagan (2002) 1D <test-functions:oakley-1d>` | 1 | `Oakley1D()` |
| {ref}`OTL Circuit <test-functions:otl-circuit>` | 6 / 20 | `OTLCircuit()` |
| {ref}`Piston Simulation <test-functions:piston>` | 7 / 20 | `Piston()` |
| {ref}`Webster et al. (1996) 2D <test-functions:webster-2d>` | 2 | `Webster2D()` |
| {ref}`Sulfur <test-functions:sulfur>` | 9 | `Sulfur()` |
| {ref}`Welch1992 <test-functions:welch1992>` | 20 | `Welch1992()` |
| {ref}`Wing Weight <test-functions:wing-weight>` | 10 | `WingWeight()` |
| Name | Input Dimension | Constructor |
|:----------------------------------------------------------------------:|:---------------:|:--------------------:|
| {ref}`Ackley <test-functions:ackley>` | M | `Ackley()` |
| {ref}`Alemazkoor & Meidani (2018) 2D <test-functions:alemazkoor-2d>` | 2 | `Alemazkoor2D()` |
| {ref}`Alemazkoor & Meidani (2018) 20D <test-functions:alemazkoor-20d>` | 20 | `Alemazkoor20D()` |
| {ref}`Borehole <test-functions:borehole>` | 8 | `Borehole()` |
| {ref}`Damped Cosine <test-functions:damped-cosine>` | 1 | `DampedCosine()` |
| {ref}`Damped Oscillator <test-functions:damped-oscillator>` | 7 | `DampedOscillator()` |
| {ref}`Flood <test-functions:flood>` | 8 | `Flood()` |
| {ref}`Forrester et al. (2008) <test-functions:forrester>` | 1 | `Forrester2008()` |
| {ref}`(1st) Franke <test-functions:franke-1>` | 2 | `Franke1()` |
| {ref}`(2nd) Franke <test-functions:franke-2>` | 2 | `Franke2()` |
| {ref}`(3rd) Franke <test-functions:franke-3>` | 2 | `Franke3()` |
| {ref}`(4th) Franke <test-functions:franke-4>` | 2 | `Franke4()` |
| {ref}`(5th) Franke <test-functions:franke-5>` | 2 | `Franke5()` |
| {ref}`(6th) Franke <test-functions:franke-6>` | 2 | `Franke6()` |
| {ref}`Friedman (6D) <test-functions:friedman-6d>` | 6 | `Friedman6D()` |
| {ref}`Friedman (10D) <test-functions:friedman-10d>` | 10 | `Friedman10D()` |
| {ref}`Gramacy (2007) 1D Sine <test-functions:gramacy-1d-sine>` | 1 | `Gramacy1DSine()` |
| {ref}`McLain S1 <test-functions:mclain-s1>` | 2 | `McLainS1()` |
| {ref}`McLain S2 <test-functions:mclain-s2>` | 2 | `McLainS2()` |
| {ref}`McLain S3 <test-functions:mclain-s3>` | 2 | `McLainS3()` |
| {ref}`McLain S4 <test-functions:mclain-s4>` | 2 | `McLainS4()` |
| {ref}`McLain S5 <test-functions:mclain-s5>` | 2 | `McLainS5()` |
| {ref}`Oakley & O'Hagan (2002) 1D <test-functions:oakley-1d>` | 1 | `Oakley1D()` |
| {ref}`OTL Circuit <test-functions:otl-circuit>` | 6 / 20 | `OTLCircuit()` |
| {ref}`Piston Simulation <test-functions:piston>` | 7 / 20 | `Piston()` |
| {ref}`Webster et al. (1996) 2D <test-functions:webster-2d>` | 2 | `Webster2D()` |
| {ref}`Sulfur <test-functions:sulfur>` | 9 | `Sulfur()` |
| {ref}`Welch1992 <test-functions:welch1992>` | 20 | `Welch1992()` |
| {ref}`Wing Weight <test-functions:wing-weight>` | 10 | `WingWeight()` |

In a Python terminal, you can list all the available functions relevant
for metamodeling applications using ``list_functions()`` and filter the results
Expand Down
8 changes: 4 additions & 4 deletions docs/fundamentals/optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ kernelspec:
The table below listed the available test functions typically used
in the comparison of global optimization methods.

| Name | Spatial Dimension | Constructor |
|:-----------------------------------------------------------:|:-----------------:|:--------------------:|
| {ref}`Ackley <test-functions:ackley>` | M | `Ackley()` |
| {ref}`Forrester et al. (2008) <test-functions:forrester>` | 1 | `Forrester2008()` |
| Name | Input Dimension | Constructor |
|:-----------------------------------------------------------:|:---------------:|:--------------------:|
| {ref}`Ackley <test-functions:ackley>` | M | `Ackley()` |
| {ref}`Forrester et al. (2008) <test-functions:forrester>` | 1 | `Forrester2008()` |

In a Python terminal, you can list all the available functions relevant
for optimization applications using ``list_functions()`` and filter the results
Expand Down
24 changes: 12 additions & 12 deletions docs/fundamentals/reliability.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ kernelspec:
The table below listed the available test functions typically used
in the comparison of reliability analysis methods.

| Name | Spatial Dimension | Constructor |
|:-----------------------------------------------------------------------------------:|:-----------------:|:-------------------------------:|
| {ref}`Cantilever Beam (2D) <test-functions:cantilever-beam-2d>` | 2 | `CantileverBeam2D ` |
| {ref}`Circular Pipe Crack <test-functions:circular-pipe-crack>` | 2 | `CircularPipeCrack()` |
| {ref}`Convex Failure Domain <test-functions:convex-fail-domain>` | 2 | `ConvexFailDomain()` |
| {ref}`Damped Oscillator Reliability <test-functions:damped-oscillator-reliability>` | 8 | `DampedOscillatorReliability()` |
| {ref}`Four-branch <test-functions:four-branch>` | 2 | `FourBranch()` |
| {ref}`Gayton Hat <test-functions:gayton-hat>` | 2 | `GaytonHat()` |
| {ref}`Hyper-sphere Bound <test-functions:hyper-sphere>` | 2 | `HyperSphere()` |
| {ref}`RS - Circular Bar <test-functions:rs-circular-bar>` | 2 | `RSCircularBar()` |
| {ref}`RS - Quadratic <test-functions:rs-quadratic>` | 2 | `RSQuadratic()` |
| {ref}`Speed Reducer Shaft <test-functions:speed-reducer-shaft>` | 5 | `SpeedReducerShaft()` |
| Name | Input Dimension | Constructor |
|:-----------------------------------------------------------------------------------:|:---------------:|:-------------------------------:|
| {ref}`Cantilever Beam (2D) <test-functions:cantilever-beam-2d>` | 2 | `CantileverBeam2D ` |
| {ref}`Circular Pipe Crack <test-functions:circular-pipe-crack>` | 2 | `CircularPipeCrack()` |
| {ref}`Convex Failure Domain <test-functions:convex-fail-domain>` | 2 | `ConvexFailDomain()` |
| {ref}`Damped Oscillator Reliability <test-functions:damped-oscillator-reliability>` | 8 | `DampedOscillatorReliability()` |
| {ref}`Four-branch <test-functions:four-branch>` | 2 | `FourBranch()` |
| {ref}`Gayton Hat <test-functions:gayton-hat>` | 2 | `GaytonHat()` |
| {ref}`Hyper-sphere Bound <test-functions:hyper-sphere>` | 2 | `HyperSphere()` |
| {ref}`RS - Circular Bar <test-functions:rs-circular-bar>` | 2 | `RSCircularBar()` |
| {ref}`RS - Quadratic <test-functions:rs-quadratic>` | 2 | `RSQuadratic()` |
| {ref}`Speed Reducer Shaft <test-functions:speed-reducer-shaft>` | 5 | `SpeedReducerShaft()` |

In a Python terminal, you can list all the available functions relevant
for metamodeling applications using ``list_functions()`` and filter the results
Expand Down
Loading

0 comments on commit 529eb47

Please sign in to comment.