Parameter space¶
The class ParameterSpace¶
Variable space defining both deterministic and uncertain variables.
Overview¶
The ParameterSpace
class describes a set of parameters of interest
which can be either deterministic or uncertain.
This class inherits from DesignSpace
.
Capabilities¶
The DesignSpace.add_variable()
aims to add deterministic variables from:
a variable name,
an optional variable size (default: 1),
an optional variable type (default: float),
an optional lower bound (default: - infinity),
an optional upper bound (default: + infinity),
an optional current value (default: None).
The add_random_variable()
aims to add uncertain
variables (a.k.a. random variables) from:
a variable name,
a distribution name (see
get_available_distributions()
),an optional variable size,
optional distribution parameters (
parameters
set as a tuple of positional arguments forOTDistribution
or a dictionary of keyword arguments forSPDistribution
, or keyword arguments for standard probability distribution such asOTNormalDistribution
andSPNormalDistribution
).
The ParameterSpace
also provides the following methods:
compute_samples()
: returns several samples of the uncertain variables,evaluate_cdf()
: evaluate the cumulative density function for the different variables and their differentget_range()
returns the numerical range of the different uncertain parameters,get_support()
: returns the mathematical support of the different uncertain variables,is_uncertain()
: checks if a parameter is uncertain,is_deterministic()
: checks if a parameter is deterministic.
Classes:
|
Parameter space. |
|
Create new instance of RandomVariable(distribution, size, parameters) |
- class gemseo.algos.parameter_space.ParameterSpace(hdf_file=None, copula='independent_copula', name=None)[source]
Parameter space.
- uncertain_variables
The names of the uncertain variables.
- Type
List(str)
- distributions
The marginal probability distributions of the uncertain variables.
- Type
Dict(str,Distribution)
- distribution
The joint probability distribution of the uncertain variables.
- Type
- Parameters
copula (str) –
A name of copula defining the dependency between random variables.
By default it is set to independent_copula.
hdf_file (Optional[Union[str,Path]]) –
By default it is set to None.
name (Optional[str]) –
By default it is set to None.
- Return type
None
Methods:
add_random_variable
(name, distribution[, size])Add a random variable from a probability distribution.
add_variable
(name[, size, var_type, l_b, ...])Add a variable to the design space.
array_to_dict
(x_array)Convert the current point into a dictionary indexed by the variables names.
check
()Check the state of the design space.
check_membership
(x_vect[, variables_names])Check whether the variables satisfy the design space requirements.
clear
()compute_samples
([n_samples, as_dict])Sample the random variables and return the realizations.
dict_to_array
(x_dict[, all_vars, all_var_list])Convert an point as dictionary into an array.
evaluate_cdf
(value[, inverse])Evaluate the cumulative density function (or its inverse) of each marginal.
export_hdf
(file_path[, append])Export the design space to an HDF file.
export_to_txt
(output_file[, fields, header_char])Export the design space to a text file.
extend
(other)Extend the design space with another design space.
Define a new
DesignSpace
from the deterministic variables only.extract_uncertain_space
([as_design_space])Define a new
DesignSpace
from the uncertain variables only.filter
(keep_variables[, copy])Filter the design space to keep a subset of variables.
filter_dim
(variable, keep_dimensions)Filter the design space to keep a subset of dimensions for a variable.
get
(k[,d])get_active_bounds
([x_vec, tol])Determine which bound constraints of the current point are active.
get_current_x
([variables_names])Return the current point in the design space.
Return the current point in the design space as a dictionary.
Return the current point normalized.
get_indexed_var_name
(variable_name)Create the names of the components of a variable.
Create the names of the components of all the variables.
get_lower_bound
(name)Return the lower bound of a variable.
get_lower_bounds
([variables_names])Generate an array of the variables' lower bounds.
get_pretty_table
([fields])Build a tabular view of the design space.
get_range
(variable)Return the numerical range of a random variable.
get_size
(name)Get the size of a variable.
get_support
(variable)Return the mathematical support of a random variable.
get_tabular_view
([decimals])Return a tabular view of the parameter space.
get_type
(name)Return the type of a variable.
get_upper_bound
(name)Return the upper bound of a variable.
get_upper_bounds
([variables_names])Generate an array of the variables' upper bounds.
get_variables_indexes
(variables_names)Return the indexes of a design array corresponding to the variables names.
Check if the current design value is defined for all variables.
import_hdf
(file_path)Import a design space from an HDF file.
init_from_dataset
(dataset[, groups, ...])Initialize the parameter space from a dataset.
is_deterministic
(variable)Check if a variable is deterministic.
is_uncertain
(variable)Check if a variable is uncertain.
items
()keys
()normalize_grad
(g_vect)Normalize an unnormalized gradient.
normalize_vect
(x_vect[, minus_lb, use_dist])Normalize a vector of the parameter space.
pop
(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem
()as a 2-tuple; but raise KeyError if D is empty.
project_into_bounds
(x_c[, normalized])Project a vector onto the bounds, using a simple coordinate wise approach.
read_from_txt
(input_file[, header])Create a design space from a text file.
remove_variable
(name)Remove a variable from the probability space.
round_vect
(x_vect)Round the vector where variables are of integer type.
set_current_variable
(name, current_value)Set the current value of a single variable.
set_current_x
(current_x)Set the current point.
set_lower_bound
(name, lower_bound)Set the lower bound of a variable.
set_upper_bound
(name, upper_bound)Set the upper bound of a variable.
setdefault
(k[,d])Cast the current value to complex.
Convert the parameter space into a
DesignSpace
.transform_vect
(vector)Map a point of the design space to a vector with components in \([0,1]\).
unnormalize_grad
(g_vect)Unnormalize a normalized gradient.
unnormalize_vect
(x_vect[, minus_lb, ...])Unnormalize a normalized vector of the parameter space.
untransform_vect
(vector)Map a vector with components in \([0,1]\) to the design space.
update
([E, ]**F)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values
()Attributes:
The deterministic variables.
- add_random_variable(name, distribution, size=1, **parameters)[source]
Add a random variable from a probability distribution.
- Parameters
name (str) – The name of the random variable.
distribution (str) – The name of a class implementing a probability distribution, e.g. ‘OTUniformDistribution’ or ‘SPDistribution’.
size (int) –
The dimension of the random variable.
By default it is set to 1.
**parameters (Union[int, Tuple[str, int, float], Mapping[str, Union[str, int, float]], None, float]) – The parameters of the distribution.
- Return type
None
- add_variable(name, size=1, var_type=DesignVariableType.FLOAT, l_b=None, u_b=None, value=None)
Add a variable to the design space.
- Parameters
name (str) – The name of the variable.
size (int) –
The size of the variable.
By default it is set to 1.
var_type (Union[str, Sequence[str], gemseo.algos.design_space.DesignVariableType, Sequence[gemseo.algos.design_space.DesignVariableType]]) –
Either the type of the variable or the types of its components.
By default it is set to FLOAT.
l_b (Optional[Union[float, numpy.ndarray]]) –
The lower bound of the variable. If None, use \(-\infty\).
By default it is set to None.
u_b (Optional[Union[float, numpy.ndarray]]) –
The upper bound of the variable. If None, use \(+\infty\).
By default it is set to None.
value (Optional[Union[float, numpy.ndarray]]) –
The default value of the variable. If None, do not use a default value.
By default it is set to None.
- Raises
ValueError – Either if the variable already exists or if the size is not a positive integer.
- Return type
None
- array_to_dict(x_array)
Convert the current point into a dictionary indexed by the variables names.
- Parameters
x_array (numpy.ndarray) – The current point.
- Returns
The dictionary version of the current point.
- Return type
Dict[str, numpy.ndarray]
- check()
Check the state of the design space.
- Raises
ValueError – If the design space is empty.
- Return type
None
- check_membership(x_vect, variables_names=None)
Check whether the variables satisfy the design space requirements.
- Parameters
x_vect (Union[Mapping[str, numpy.ndarray], numpy.ndarray]) – The values of the variables.
variables_names (Optional[Sequence[str]]) –
The names of the variables. If None, use the names of the variables of the design space.
By default it is set to None.
- Raises
ValueError – Either if the dimension of the values vector is wrong, if the values are not specified as an array or a dictionary, if the values are outside the bounds of the variables or if the component of an integer variable is an integer.
- Return type
None
- clear() None. Remove all items from D.
- compute_samples(n_samples=1, as_dict=False)[source]
Sample the random variables and return the realizations.
- Parameters
n_samples (int) –
A number of samples.
By default it is set to 1.
as_dict (bool) –
The type of the returned object. If True, return a dictionary. Otherwise, return an array.
By default it is set to False.
- Returns
- The realizations of the random variables,
either stored in an array or in a dictionary whose values are the names of the random variables and the values are the evaluations.
- Return type
Union[Dict[str, numpy.ndarray], numpy.ndarray]
- property deterministic_variables
The deterministic variables.
- dict_to_array(x_dict, all_vars=True, all_var_list=None)
Convert an point as dictionary into an array.
- Parameters
x_dict (Dict[str, numpy.ndarray]) – The point to be converted.
all_vars (bool) –
If True, all the variables to be considered shall be in the provided point.
By default it is set to True.
all_var_list (Optional[Sequence[str]]) –
The variables to be considered. If None, use the variables of the design space.
By default it is set to None.
- Returns
The point as an array.
- Return type
numpy.ndarray
- evaluate_cdf(value, inverse=False)[source]
Evaluate the cumulative density function (or its inverse) of each marginal.
- Parameters
value (Dict[str, numpy.ndarray]) – The values of the uncertain variables passed as a dictionary whose keys are the names of the variables.
inverse (bool) –
The type of function to evaluate. If True, compute the cumulative density function. Otherwise, compute the inverse cumulative density function.
By default it is set to False.
- Returns
- A dictionary where the keys are the names of the random variables
and the values are the evaluations.
- Return type
Dict[str, numpy.ndarray]
- export_hdf(file_path, append=False)
Export the design space to an HDF file.
- Parameters
file_path (Union[str, pathlib.Path]) – The path to the file to export the design space.
append (bool) –
If True, appends the data in the file.
By default it is set to False.
- Return type
None
- export_to_txt(output_file, fields=None, header_char='', **table_options)
Export the design space to a text file.
- Parameters
output_file (Union[str,Path],) – The path to the file.
fields (Optional[Sequence[str]]) –
The fields to be exported. If None, export all fields.
By default it is set to None.
header_char (str) –
The header character.
By default it is set to .
**table_options (Any) – The names and values of additional attributes for the
PrettyTable
view generated byget_pretty_table()
.
- Return type
None
- extend(other)
Extend the design space with another design space.
- Parameters
other (gemseo.algos.design_space.DesignSpace) – The design space to be appended to the current one.
- Return type
None
- extract_deterministic_space()[source]
Define a new
DesignSpace
from the deterministic variables only.- Returns
A
DesignSpace
defined by the deterministic variables only.- Return type
- extract_uncertain_space(as_design_space=False)[source]
Define a new
DesignSpace
from the uncertain variables only.- Parameters
as_design_space (bool) –
If False, return a
ParameterSpace
containing the original uncertain variables as is; otherwise, return aDesignSpace
where the original uncertain variables are made deterministic. In that case, the bounds of a deterministic variable correspond to the limits of the support of the original probability distribution and the current value correspond to its mean.By default it is set to False.
- Returns
A
ParameterSpace
defined by the uncertain variables only.- Return type
Union[gemseo.algos.design_space.DesignSpace, gemseo.algos.parameter_space.ParameterSpace]
- filter(keep_variables, copy=False)
Filter the design space to keep a subset of variables.
- Parameters
keep_variables (Union[str, Iterable[str]]) – The names of the variables to be kept.
copy (bool) –
If True, then a copy of the design space is filtered, otherwise the design space itself is filtered.
By default it is set to False.
- Returns
Either the filtered original design space or a copy.
- Raises
ValueError – If the variable is not in the design space.
- Return type
- filter_dim(variable, keep_dimensions)
Filter the design space to keep a subset of dimensions for a variable.
- Parameters
variable (str) – The name of the variable.
keep_dimensions (Iterable[int]) – The dimensions of the variable to be kept, between \(0\) and \(d-1\) where \(d\) is the number of dimensions of the variable.
- Returns
The filtered design space.
- Raises
ValueError – If a dimension is unknown.
- Return type
- get(k[, d]) D[k] if k in D, else d. d defaults to None.
- get_active_bounds(x_vec=None, tol=1e-08)
Determine which bound constraints of the current point are active.
- Parameters
x_vec (Optional[numpy.ndarray]) –
The point at which to check the bounds. If None, use the current point.
By default it is set to None.
tol (float) –
The tolerance of comparison of a scalar with a bound.
By default it is set to 1e-08.
- Returns
Whether the components of the lower and upper bound constraints are active, the first returned value representing the lower bounds and the second one the upper bounds, e.g.
({'x': array(are_x_lower_bounds_active), 'y': array(are_y_lower_bounds_active)}, {'x': array(are_x_upper_bounds_active), 'y': array(are_y_upper_bounds_active)} )
where:
are_x_lower_bounds_active = [True, False] are_x_upper_bounds_active = [False, False] are_y_lower_bounds_active = [False] are_y_upper_bounds_active = [True]
- Return type
Tuple[Dict[str, numpy.ndarray], Dict[str, numpy.ndarray]]
- get_current_x(variables_names=None)
Return the current point in the design space.
- Parameters
variables_names (Optional[Iterable[str]]) –
The names of the required variables. If None, use the names of the variables of the design space.
By default it is set to None.
- Raises
KeyError – If a variable has no current value.
- Return type
numpy.ndarray
- get_current_x_dict()
Return the current point in the design space as a dictionary.
- Returns
The current point in the design space as a dictionary, whose keys are the names of the variables and values are the values of the variables.
- Return type
Dict[str, numpy.ndarray]
- get_current_x_normalized()
Return the current point normalized.
- Returns
The current point as an array normalized by the bounds of the variables.
- Returns
If the current point cannot be normalized.
- Return type
KeyError
- get_indexed_var_name(variable_name)
Create the names of the components of a variable.
If the size of the variable is equal to 1, this method returns the name of the variable. Otherwise, it concatenates the name of the variable, the separator
SEP
and the index of the component.- Parameters
variable_name (str) – The name of the variable.
- Returns
The names of the components of the variable.
- Return type
Union[str, List[str]]
- get_indexed_variables_names()
Create the names of the components of all the variables.
If the size of the variable is equal to 1, this method uses its name. Otherwise, it concatenates the name of the variable, the separator
SEP
and the index of the component.- Returns
The name of the components of all the variables.
- Return type
List[str]
- get_lower_bound(name)
Return the lower bound of a variable.
- Parameters
name (str) – The name of the variable.
- Returns
The lower bound of the variable (possibly infinite).
- Return type
numpy.ndarray
- get_lower_bounds(variables_names=None)
Generate an array of the variables’ lower bounds.
- Parameters
variables_names (Optional[Sequence[str]]) –
The names of the variables of which the lower bounds are required. If None, use the variables of the design space.
By default it is set to None.
- Returns
The lower bounds of the variables.
- Return type
numpy.ndarray
- get_pretty_table(fields=None)
Build a tabular view of the design space.
- Parameters
fields (Optional[Sequence[str]]) –
The name of the fields to be exported. If None, export all the fields.
By default it is set to None.
- Returns
A tabular view of the design space.
- Return type
- get_range(variable)[source]
Return the numerical range of a random variable.
- Parameters
variable (str) – The name of the random variable.
- Returns
The range of the components of the random variable.
- Return type
List[numpy.ndarray]
- get_size(name)
Get the size of a variable.
- Parameters
name (str) – The name of the variable.
- Returns
The size of the variable, None if it is not known.
- Return type
Optional[int]
- get_support(variable)[source]
Return the mathematical support of a random variable.
- Parameters
variable (str) – The name of the random variable.
- Returns
The support of the components of the random variable.
- Return type
List[numpy.ndarray]
- get_tabular_view(decimals=2)[source]
Return a tabular view of the parameter space.
This view contains statistical information.
- Parameters
decimals (int) –
The number of decimals to print.
By default it is set to 2.
- Returns
The tabular view.
- Return type
str
- get_type(name)
Return the type of a variable.
- Parameters
name (str) – The name of the variable.
- Returns
The type of the variable, None if it is not known.
- Return type
Optional[str]
- get_upper_bound(name)
Return the upper bound of a variable.
- Parameters
name (str) – The name of the variable.
- Returns
The upper bound of the variable (possibly infinite).
- Return type
numpy.ndarray
- get_upper_bounds(variables_names=None)
Generate an array of the variables’ upper bounds.
- Parameters
variables_names (Optional[Sequence[str]]) –
The names of the variables of which the upper bounds are required. If None, use the variables of the design space.
By default it is set to None.
- Returns
The upper bounds of the variables.
- Return type
numpy.ndarray
- get_variables_indexes(variables_names)
Return the indexes of a design array corresponding to the variables names.
- Parameters
variables_names (Iterable[str]) – The names of the variables.
- Returns
The indexes of a design array corresponding to the variables names.
- Return type
numpy.ndarray
- has_current_x()
Check if the current design value is defined for all variables.
- Returns
Whether the current design value is defined for all variables.
- Return type
bool
- import_hdf(file_path)
Import a design space from an HDF file.
- Parameters
file_path (Union[str, pathlib.Path]) – The path to the file containing the description of a design space.
- Return type
None
- static init_from_dataset(dataset, groups=None, uncertain=None, copula='independent_copula')[source]
Initialize the parameter space from a dataset.
- Parameters
dataset (Dataset) – The dataset used for the initialization.
groups (Optional[Iterable[str]]) –
The groups of the dataset to be considered. If None, consider all the groups.
By default it is set to None.
uncertain (Optional[Mapping[str,bool]]) –
Whether the variables should be uncertain or not.
By default it is set to None.
copula (str) –
A name of copula defining the dependency between random variables.
By default it is set to independent_copula.
- Return type
- is_deterministic(variable)[source]
Check if a variable is deterministic.
- Parameters
variable (str) – The name of the variable.
- Returns
True is the variable is deterministic.
- Return type
bool
- is_uncertain(variable)[source]
Check if a variable is uncertain.
- Parameters
variable (str) – The name of the variable.
- Returns
True is the variable is uncertain.
- Return type
bool
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- normalize_grad(g_vect)
Normalize an unnormalized gradient.
This method is based on the chain rule:
\[\frac{df(x)}{dx} = \frac{df(x)}{dx_u}\frac{dx_u}{dx} = \frac{df(x)}{dx_u}\frac{1}{u_b-l_b}\]where \(x_u = \frac{x-l_b}{u_b-l_b}\) is the normalized input vector, \(x\) is the unnormalized input vector and \(l_b\) and \(u_b\) are the lower and upper bounds of \(x\).
Then, the normalized gradient reads:
\[\frac{df(x)}{dx_u} = (u_b-l_b)\frac{df(x)}{dx}\]where \(\frac{df(x)}{dx}\) is the unnormalized one.
- Parameters
g_vect (numpy.ndarray) – The gradient to be normalized.
- Returns
The normalized gradient.
- Return type
numpy.ndarray
- normalize_vect(x_vect, minus_lb=True, use_dist=False)[source]
Normalize a vector of the parameter space.
If use_dist is True, use the cumulative probability distributions of the random variables to scale the components of the random variables between 0 and 1. Otherwise, use the approach defined in
DesignSpace.normalize_vect()
with minus_lb.For the components of the deterministic variables, use the approach defined in
DesignSpace.normalize_vect()
with minus_lb.- Parameters
x_vect (numpy.ndarray) – The values of the design variables.
minus_lb (bool) –
If True, remove the lower bounds at normalization.
By default it is set to True.
use_dist (bool) –
If True, normalize the components of the random variables with their cumulative probability distributions.
By default it is set to False.
- Returns
The normalized vector.
- Return type
numpy.ndarray
- pop(k[, d]) v, remove specified key and return the corresponding value.
If key is not found, d is returned if given, otherwise KeyError is raised.
- popitem() (k, v), remove and return some (key, value) pair
as a 2-tuple; but raise KeyError if D is empty.
- project_into_bounds(x_c, normalized=False)
Project a vector onto the bounds, using a simple coordinate wise approach.
- Parameters
normalized (bool) –
If True, then the vector is assumed to be normalized.
By default it is set to False.
x_c (numpy.ndarray) – The vector to be projected onto the bounds.
- Returns
The projected vector.
- Return type
numpy.ndarray
- static read_from_txt(input_file, header=None)
Create a design space from a text file.
- Parameters
input_file (Union[str, pathlib.Path]) – The path to the file.
header (Optional[Iterable[str]]) –
The names of the fields saved in the file. If None, read them in the file.
By default it is set to None.
- Returns
The design space read from the file.
- Raises
ValueError – If the file does not contain the minimal variables in its header.
- Return type
- remove_variable(name)[source]
Remove a variable from the probability space.
- Parameters
name (str) – The name of the variable.
- Return type
None
- round_vect(x_vect)
Round the vector where variables are of integer type.
- Parameters
x_vect (numpy.ndarray) – The values to be rounded.
- Returns
The rounded values values.
- Raises
ValueError – If the values is not a one- or two-dimensional
- Return type
numpy.ndarray
- set_current_variable(name, current_value)
Set the current value of a single variable.
- Parameters
name – The name of the variable.
current_value – The current value of the variable.
- set_current_x(current_x)
Set the current point.
- Parameters
current_x (Union[numpy.ndarray, Mapping[str, numpy.ndarray], gemseo.algos.opt_result.OptimizationResult]) – The value of the current point.
- Raises
ValueError – If the value has a wrong dimension.
TypeError – If the current point is neither a mapping of NumPy arrays, a NumPy array nor an
OptimizationResult
.
- Return type
None
- set_lower_bound(name, lower_bound)
Set the lower bound of a variable.
- Parameters
name (str) – The name of the variable.
lower_bound (numpy.ndarray) – The value of the lower bound.
- Raises
ValueError – If the variable does not exist.
- Return type
None
- set_upper_bound(name, upper_bound)
Set the upper bound of a variable.
- Parameters
name (str) – The name of the variable.
upper_bound (numpy.ndarray) – The value of the upper bound.
- Raises
ValueError – If the variable does not exist.
- Return type
None
- setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
- to_complex()
Cast the current value to complex.
- Return type
None
- to_design_space()[source]
Convert the parameter space into a
DesignSpace
.The original deterministic variables are kept as is while the original uncertain variables are made deterministic. In that case, the bounds of a deterministic variable correspond to the limits of the support of the original probability distribution and the current value correspond to its mean.
- Returns
A
DesignSpace
where all original variables are made deterministic.- Return type
- transform_vect(vector)[source]
Map a point of the design space to a vector with components in \([0,1]\).
- Parameters
vector (numpy.ndarray) – A point of the design space.
- Returns
A vector with components in \([0,1]\).
- Return type
numpy.ndarray
- unnormalize_grad(g_vect)
Unnormalize a normalized gradient.
This method is based on the chain rule:
\[\frac{df(x)}{dx} = \frac{df(x)}{dx_u}\frac{dx_u}{dx} = \frac{df(x)}{dx_u}\frac{1}{u_b-l_b}\]where \(x_u = \frac{x-l_b}{u_b-l_b}\) is the normalized input vector, \(x\) is the unnormalized input vector, \(\frac{df(x)}{dx_u}\) is the unnormalized gradient \(\frac{df(x)}{dx}\) is the normalized one, and \(l_b\) and \(u_b\) are the lower and upper bounds of \(x\).
- Parameters
g_vect (numpy.ndarray) – The gradient to be unnormalized.
- Returns
The unnormalized gradient.
- Return type
numpy.ndarray
- unnormalize_vect(x_vect, minus_lb=True, no_check=False, use_dist=False)[source]
Unnormalize a normalized vector of the parameter space.
If use_dist is True, use the inverse cumulative probability distributions of the random variables to unscale the components of the random variables. Otherwise, use the approach defined in
DesignSpace.unnormalize_vect()
with minus_lb and no_check.For the components of the deterministic variables, use the approach defined in
DesignSpace.unnormalize_vect()
with minus_lb and no_check.- Parameters
x_vect (numpy.ndarray) – The values of the design variables.
minus_lb (bool) –
If True, remove the lower bounds at normalization.
By default it is set to True.
no_check (bool) –
If True, do not check that the values are in [0,1].
By default it is set to False.
use_dist (bool) –
If True, unnormalize the components of the random variables with their inverse cumulative probability distributions.
By default it is set to False.
- Returns
The unnormalized vector.
- Return type
numpy.ndarray
- untransform_vect(vector)[source]
Map a vector with components in \([0,1]\) to the design space.
- Parameters
vector (numpy.ndarray) – A vector with components in \([0,1]\).
- Returns
A point of the variables space.
- Return type
numpy.ndarray
- update([E, ]**F) None. Update D from mapping/iterable E and F.
If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
- values() an object providing a view on D's values
- class gemseo.algos.parameter_space.RandomVariable(distribution, size, parameters)
Create new instance of RandomVariable(distribution, size, parameters)
Methods:
count
(value, /)Return number of occurrences of value.
index
(value[, start, stop])Return first index of value.
Attributes:
Alias for field number 0
Alias for field number 2
Alias for field number 1
- count(value, /)
Return number of occurrences of value.
- distribution
Alias for field number 0
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- parameters
Alias for field number 2
- size
Alias for field number 1