UnivariateLinearModelPOD

class UnivariateLinearModelPOD(*args)

Linear regression based POD.

Available constructors:

UnivariateLinearModelPOD(analysis=analysis, detection=detection)

UnivariateLinearModelPOD(inputSample, outputSample, detection, noiseThres, saturationThres, resDistFact, boxCox)

Parameters:
analysisUnivariateLinearModelAnalysis

Linear analysis object.

inputSample2-d sequence of float

Vector of the defect sizes, of dimension 1.

outputSample2-d sequence of float

Vector of the signals, of dimension 1.

detectionfloat

Detection value of the signal.

noiseThresfloat

Value for low censored data. Default is None.

saturationThresfloat

Value for high censored data. Default is None

resDistFactopenturns.DistributionFactory

Distribution hypothesis followed by the residuals. 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.

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.

getBoxCoxParameter()

Accessor to the Box Cox parameter.

getPODCLModel([confidenceLevel])

Accessor to the POD model at a given confidence level.

getPODModel()

Accessor to the POD model.

getR2()

Accessor to the R2 value.

getSimulationSize()

Accessor to the simulation size.

getVerbose()

Accessor to the verbosity.

run()

Build the POD models.

setSimulationSize(size)

Accessor to the simulation size.

setVerbose(verbose)

Accessor to the verbosity.

Notes

This class aims at building the POD based on a linear regression model. If a linear analysis has been launched, it can be used as prescribed in the first constructor. It can be noticed that, in this case, with the default parameters of the linear analysis, the POD will corresponds with the linear regression model associated to a Gaussian hypothesis on the residuals.

Otherwise, all parameters can be given as in the second constructor.

Following the given distribution in resDistFact, the POD model is built different hypothesis:

If bootstrap is used, a progress bar is shown if the verbosity is enabled. It can be disabled using the method setVerbose.

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.

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.

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.

getR2()

Accessor to the R2 value.

Returns:
R2float

The R2 value.

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()

Build the POD models.

Notes

This method build the linear model for the uncensored or censored case depending of the input parameters. Then it builds the POD model following the given residuals distribution factory.

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.