ProbInput
ProbInput()A class to represent probabilistic input data.
Attributes
| Name | Type | Description |
|---|---|---|
| params | dict[str, float | int | str] | None | Dictionary of deterministic parameters. |
| stochasts | dict[str, object] | None | Dictionary of stochastic distributions. |
| charvals | dict[str, float] | None | Dictionary of characteristic values. |
| calc_options | dict[str, float | int | str] | None | Dictionary of calculation options. |
| hlist | list[float] | None | List of water levels. |
Methods
| Name | Description |
|---|---|
| create_stochast | Create a stochastic distribution. |
| from_dataframe | Create a ProbInput instance from a pandas DataFrame. |
| validate_stdev | Validate the standard deviation of a stochastic variable. |
create_stochast
ProbInput.create_stochast(dist_type, mu, sigma, shift, afknot_l, afknot_r)Create a stochastic distribution.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| dist_type | str | Type of the distribution (e.g., “normaal”, “lognormaal”). | required |
| mu | float | Mean value of the distribution. | required |
| sigma | float | Standard deviation of the distribution. | required |
| shift | float | Shift value of the distribution. | required |
| afknot_l | float | Left truncation value. | required |
| afknot_r | float | Right truncation value. | required |
Returns
| Name | Type | Description |
|---|---|---|
| ot.Distribution or ot.TruncatedDistribution | Created distribution. |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If the distribution type is unknown. |
from_dataframe
ProbInput.from_dataframe(df)Create a ProbInput instance from a pandas DataFrame.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| df | pd.DataFrame | DataFrame containing the probabilistic piping input data. | required |
Returns
| Name | Type | Description |
|---|---|---|
| ProbInput | An instance of the ProbInput class. |
validate_stdev
ProbInput.validate_stdev(stochast, mean, spread, spread_type, stdev)Validate the standard deviation of a stochastic variable.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| stochast | str | Name of the stochastic variable. | required |
| mean | float | Mean value of the stochastic variable. | required |
| spread | float | Spread value of the stochastic variable. | required |
| spread_type | str | Type of spread (e.g., “standaardafwijking” or “variatiecoefficient”). | required |
| stdev | float | Standard deviation of the stochastic variable. | required |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If the spread and standard deviation are inconsistent. |