uncertain_coupling_graph module¶
An uncertain coupling graph.
- class gemseo_umdo.visualizations.uncertain_coupling_graph.UncertainCouplingGraph(disciplines, uncertain_space, variable_names=None)[source]
Bases:
object
An uncertain coupling graph.
A coupling graph whose disciplines are represented by nodes and coupling variables by edges whose thickness is proportional to its dispersion.
The dispersion is computed using a
DispersionMeasure
such as the coefficient of variation (CV) or the quartile coefficient of dispersion (QCD).To be used as:
Instantiate an
UncertainCouplingGraph
.Sample the multidisciplinary system using
sample()
.Generate the coupling graph for a given dispersion measure, using
visualize()
.
If you want to change the dispersion measure or filter the variables, repeat Step 3 with another dispersion measure or a list of variable names.
If you want to improve the estimations of the statistics, repeat Step 2 with additional evaluations and Step 3.
- Parameters:
disciplines (Sequence[MDODiscipline]) – The coupled disciplines.
uncertain_space (ParameterSpace) – The space of the uncertain variables.
variable_names (Iterable[str] | None) – The names of the coupling variables of interest. If
None
, use all the coupling variables.
- class DispersionMeasure(value)[source]
Bases:
StrEnum
A dispersion measure.
- CV = 'CV'
- QCD = 'QCD'
- sample(n_samples, algo_name='OT_OPT_LHS', **algo_options)[source]
Sample the multidisciplinary system.
- visualize(maximum_thickness=30, dispersion_measure=DispersionMeasure.QCD, variable_names=None, show=True, file_path='', clean_up=True)[source]
Generate the uncertain coupling graph.
- Parameters:
maximum_thickness (int) –
The maximum thickness of a line.
By default it is set to 30.
dispersion_measure (DispersionMeasure) –
A standardized measure of dispersion.
By default it is set to “QCD”.
variable_names (Iterable[str] | None) – The names of the coupling variables of interest. If
None
, use all the coupling variables of interest defined at instantiation.show (bool) –
Whether to display the graph with the default application associated to the file extension.
By default it is set to True.
file_path (str | Path) –
The file path with extension to save the graph. If
""
, use the class name with PNG format.By default it is set to “”.
clean_up (bool) –
Whether to remove the source files.
By default it is set to True.
- Returns:
The view of the uncertain coupling graph.
- Return type:
GraphView