AdaptiveSignalPOD

class AdaptiveSignalPOD(*args)

Adaptive algorithm for signal data type.

Available constructor:

AdaptiveSignalPOD(inputDOE, outputDOE, physicalModel, nMorePoints, detection, noiseThres, saturationThres, boxCox)

Parameters:
inputDOE2-d sequence of float

Vector of the input values. The first column must correspond with the defect sizes.

outputDOE2-d sequence of float

Vector of the signals, of dimension 1.

physicalModelopenturns.Function

True model used to compute the real signal value to be added to the DOE.

nMorePointspositive int

The number of points to add to the DOE, computed by the physicalModel.

detectionfloat

Detection value of the signal.

noiseThresfloat

Value for low censored data. Default is None.

saturationThresfloat

Value for high censored data. Default is None

boxCoxbool or float

Enable or not the Box Cox transformation. If boxCox is a float, the Box Cox transformation is enabled with the given value. Default is False.

Warning

The first column of the input sample must corresponds with the defect sizes.

Notes

This class aims at building the POD based on a kriging model where the design of experiments is iteratively enriched. The initial design of experiments is given as input parameters. The enrichment criterion is based on the integrated mean squared of the POD. The criterion is computed on several candidate points and the one that minimizes the criterion is added to the current design of experiments. The sample of candidate points is created using a low discrepancy sequence (Sobol’) if the input distribution has an independant copula, otherwise a Monte Carlo experiment is used. This is a time consuming technique because it requires to compute the mean and variance of the POD for all candidate points. The stopping criterion is only based on the number of points that must be added to the design of experiments.

No assumptions are required for the residuals with this method. The POD are computed by simulating conditional predictions. For each, a Monte Carlo simulation is performed. The accuracy of the Monte Carlo simulation is taken into account using the TCL.

The return POD model corresponds with an interpolate function built with the POD values computed for the given defect sizes. The default values are 20 defect sizes between the minimum and maximum value of the defect sample. The defect sizes can be changed using the method setDefectSizes. It is adviced to run a preliminary POD study in order to know the interesting range of defect sizes. This enables reducing the computing time.

The default kriging model is built with a linear basis only for the defect size and constant otherwise. The covariance model is an anisotropic squared exponential model. Parameters are estimated using the Mutli start TNC algorithm with 100 computations.

In the algorithm, when a point is added to the design of experiments, the kriging model is not always optimized. The covariance model scale coefficients are optimized only if the Q2 value is lower than 0.95.

For advanced use, all parameters can be defined thanks to dedicated set methods.

A progress bar is shown if the verbosity is enabled. It can be disabled using the method setVerbose.

Methods

computeDetectionSize(probabilityLevel[, ...])

Compute the detection size for a given probability level.

drawBoxCoxLikelihood([name])

Draw the loglikelihood versus the Box Cox parameter.

drawPOD([probabilityLevel, confidenceLevel, ...])

Draw the POD curve.

drawValidationGraph([name])

Draw the validation graph of the metamodel.

getBasis()

Accessor to the kriging basis.

getBoxCoxParameter()

Accessor to the Box Cox parameter.

getCandidateSize()

Accessor to the number of candidate points.

getCovarianceModel()

Accessor to the kriging covariance model.

getDefectSizes()

Accessor to the defect size where POD is computed.

getDistribution()

Accessor to the parameters distribution.

getGraphActive()

Accessor to the graph verbosity.

getInitialStartSize()

Accessor to the size of the multi start algorithm.

getInputDOE()

Accessor to the final input values of the DOE.

getKrigingResult()

Accessor to the kriging result.

getOutputDOE()

Accessor to the final output values of the DOE.

getPODCLModel([confidenceLevel])

Accessor to the POD model at a given confidence level.

getPODModel()

Accessor to the POD model.

getQ2()

Accessor to the Q2 value.

getSamplingSize()

Accessor to the Monte Carlo sampling size.

getSimulationSize()

Accessor to the simulation size.

getVerbose()

Accessor to the verbosity.

run()

Launch the algorithm and build the POD models.

setBasis(basis)

Accessor to the kriging basis.

setCandidateSize(size)

Accessor to the number of candidate points.

setCovarianceModel(covarianceModel)

Accessor to the kriging covariance model.

setDefectSizes(size)

Accessor to the defect size where POD is computed.

setDistribution(distribution)

Accessor to the parameters distribution.

setGraphActive(graphVerbose[, ...])

Accessor to the graph verbosity.

setInitialStartSize(size)

Accessor to the size of the multi start algorithm.

setSamplingSize(size)

Accessor to the Monte Carlo sampling size.

setSimulationSize(size)

Accessor to the simulation size.

setVerbose(verbose)

Accessor to the verbosity.

computeDetectionSize(probabilityLevel, confidenceLevel=None)

Compute the detection size for a given probability level.

Parameters:
probabilityLevelfloat

The probability level for which the defect size is computed.

confidenceLevelfloat

The confidence level associated to the given probability level the defect size is computed. Default is None.

Returns:
resultcollection of openturns.PointWithDescription

A PointWithDescription containing the detection size computed at the given probability level and confidence level if provided.

drawBoxCoxLikelihood(name=None)

Draw the loglikelihood versus the Box Cox parameter.

Parameters:
namestring

name of the figure to be saved with transparent option sets to True and bbox_inches=’tight’. It can be only the file name or the full path name. Default is None.

Returns:
figmatplotlib.figure

Matplotlib figure object.

axmatplotlib.axes

Matplotlib axes object.

Notes

This method is available only when the parameter boxCox is set to True.

drawPOD(probabilityLevel=None, confidenceLevel=None, defectMin=None, defectMax=None, nbPt=100, name=None)

Draw the POD curve.

Parameters:
probabilityLevelfloat

The probability level for which the defect size is computed. Default is None.

confidenceLevelfloat

The confidence level associated to the given probability level the defect size is computed. Default is None.

defectMin, defectMaxfloat

Define the interval where the curve is plotted. Default : min and max values of the input sample.

nbPtint

The number of points to draw the curves. Default is 100.

namestring

name of the figure to be saved with transparent option sets to True and bbox_inches=’tight’. It can be only the file name or the full path name. Default is None.

Returns:
figmatplotlib.figure

Matplotlib figure object.

axmatplotlib.axes

Matplotlib axes object.

drawValidationGraph(name=None)

Draw the validation graph of the metamodel.

Parameters:
namestring

name of the figure to be saved with transparent option sets to True and bbox_inches=’tight’. It can be only the file name or the full path name. Default is None.

Returns:
figmatplotlib.figure

Matplotlib figure object.

axmatplotlib.axes

Matplotlib axes object.

getBasis()

Accessor to the kriging basis.

Returns:
basisopenturns.Basis

The basis used as trend in the kriging model. Default is a linear basis for the defect and constant for the other parameters.

getBoxCoxParameter()

Accessor to the Box Cox parameter.

Returns:
lambdaBoxCoxfloat

The Box Cox parameter used to transform the data. If the transformation is not enabled None is returned.

getCandidateSize()

Accessor to the number of candidate points.

Returns:
sizeint

The number of candidate points on which the criterion is computed.

getCovarianceModel()

Accessor to the kriging covariance model.

Returns:
covarianceModelopenturns.CovarianceModel

The covariance model in the kriging model. Default is an anisotropic Squared exponential covariance model.

getDefectSizes()

Accessor to the defect size where POD is computed.

Returns:
defectSizesequence of float

The defect sizes where the Monte Carlo simulation is performed to compute the POD.

getDistribution()

Accessor to the parameters distribution.

Returns:
distributionopenturns.ComposedDistribution

The input parameters distribution used for the Monte Carlo simulation. Default is a Uniform distribution for all parameters.

getGraphActive()

Accessor to the graph verbosity.

Returns:
graphVerbosebool

Enable or disable the display of the POD graph at each iteration. Default is False.

getInitialStartSize()

Accessor to the size of the multi start algorithm.

Returns:
sizeint

The number of multi start using the TNC algorithm to find the covariance parameters. Default is 100.

getInputDOE()

Accessor to the final input values of the DOE.

getKrigingResult()

Accessor to the kriging result.

Returns:
resultopenturns.KrigingResult

The kriging result.

getOutputDOE()

Accessor to the final output values of the DOE.

getPODCLModel(confidenceLevel=0.95)

Accessor to the POD model at a given confidence level.

Parameters:
confidenceLevelfloat

The confidence level the POD must be computed. Default is 0.95

Returns:
PODModelClopenturns.Function

The function which computes the probability of detection for a given defect value at the confidence level given as parameter.

getPODModel()

Accessor to the POD model.

Returns:
PODModelopenturns.Function

The function which computes the probability of detection for a given defect value.

getQ2()

Accessor to the Q2 value.

Returns:
Q2float

The Q2 value computed analytically using Dubrule (1983) technique.

getSamplingSize()

Accessor to the Monte Carlo sampling size.

Returns:
sizeint

The size of the Monte Carlo simulation used to compute the POD for each defect size.

getSimulationSize()

Accessor to the simulation size.

Returns:
sizeint

The size of the simulation used to compute the confidence interval.

getVerbose()

Accessor to the verbosity.

Returns:
verbosebool

Enable or disable the verbosity. Default is True.

run()

Launch the algorithm and build the POD models.

Notes

This method launches the iterative algorithm. First the censored data are filtered if needed. The Box Cox transformation is performed if it is enabled. Then the enrichment of the design of experiments is performed. Once the algorithm stops, it builds the POD models : conditional samples are simulated for each defect size, then the distributions of the probability estimator (for MC simulation) are built. Eventually, a sample of this distribution is used to compute the mean POD and the POD at the confidence level.

setBasis(basis)

Accessor to the kriging basis.

Parameters:
basisopenturns.Basis

The basis used as trend in the kriging model.

setCandidateSize(size)

Accessor to the number of candidate points.

Parameters:
sizeint

The number of candidate points on which the criterion is computed

setCovarianceModel(covarianceModel)

Accessor to the kriging covariance model.

Parameters:
covarianceModelopenturns.CovarianceModel

The covariance model in the kriging model.

setDefectSizes(size)

Accessor to the defect size where POD is computed.

Parameters:
defectSizesequence of float

The defect sizes where the Monte Carlo simulation is performed to compute the POD.

setDistribution(distribution)

Accessor to the parameters distribution.

Parameters:
distributionopenturns.ComposedDistribution

The input parameters distribution used for the Monte Carlo simulation.

setGraphActive(graphVerbose, probabilityLevel=None, confidenceLevel=None, directory=None)

Accessor to the graph verbosity.

Parameters:
graphVerbosebool

Enable or disable the display of the POD graph at each iteration.

probabilityLevelfloat

The probability level for which the defect size is computed. Default is None.

confidenceLevelfloat

The confidence level associated to the given probability level the defect size is computed. Default is None.

directorystring

Directory where to save the graphs as png files.

setInitialStartSize(size)

Accessor to the size of the multi start algorithm.

Parameters:
sizeint

The number of multi start using the TNC algorithm to find the covariance parameters.

setSamplingSize(size)

Accessor to the Monte Carlo sampling size.

Parameters:
sizeint

The size of the Monte Carlo simulation used to compute the POD for each defect size.

setSimulationSize(size)

Accessor to the simulation size.

Parameters:
sizeint

The size of the simulation used to compute the confidence interval.

setVerbose(verbose)

Accessor to the verbosity.

Parameters:
verbosebool

Enable or disable the verbosity.