gemseo.algos.doe.doe_quality module#

DOE assessor.

class DOEMeasures(discrepancy, mindist, phip)[source]#

Bases: NamedTuple

The quality measures of a DOE.

Namely \(\phi^p\), minimum-distance and discrepancy measures, accessible with the attributes discrepancy, mindist and phip.

The smaller the quality measures, the better, except for the minimum-distance criterion for which the larger it is the better.

Create new instance of DOEMeasures(discrepancy, mindist, phip)

Parameters:
discrepancy: float#

Alias for field number 0

mindist: float#

Alias for field number 1

phip: float#

Alias for field number 2

class DOEQuality(samples, power=50, discrepancy_type_name='CD', **discrepancy_options)[source]#

Bases: object

The quality of a DOE.

Parameters:
  • samples (RealArray) -- The input samples of the DOE.

  • power (int) --

    The power \(p\) of the \(\phi^p\) criterion.

    By default it is set to 50.

  • discrepancy_type_name (DiscrepancyTypeNameType) --

    The type of discrepancy.

    By default it is set to "CD".

  • **discrepancy_options (Any) -- The options passed to scipy.stats.qmc.discrepancy.

measures: DOEMeasures#

The quality measures of the DOE.

compute_discrepancy(samples, type_name='CD', **options)[source]#

Compute the discrepancy of a sample set (the smaller, the better).

Parameters:
  • samples (RealArray) -- The data samples.

  • type_name (DiscrepancyTypeNameType) --

    The type of discrepancy.

    By default it is set to "CD".

  • **options (Any) -- The options passed to scipy.stats.qmc.discrepancy().

Returns:

The discrepancy.

Return type:

float

compute_mindist_criterion(samples)[source]#

Compute the minimum-distance criterion of a sample set (the higher, the better).

This criterion is also called mindist.

Parameters:

samples (RealArray) -- The data samples.

Returns:

The minimum-distance criterion.

Return type:

float

compute_phip_criterion(samples, power=50)[source]#

Compute the math:phi^p criterion of a sample set (the smaller, the better).

See [MM95].

Parameters:
  • samples (RealArray) -- The data samples.

  • power (float) --

    The power \(p\) of the \(\phi^p\) criterion.

    By default it is set to 50.

Returns:

phi^p criterion.

Return type:

The math