QuantileRegressionPOD¶

class QuantileRegressionPOD(*args)

Quantile regression based POD.

Available constructor:

QuantileRegressionPOD(inputSample, outputSample, detection, noiseThres, saturationThres, boxCox)

Parameters
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

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.

Notes

This class aims at building the POD based on a quantile regression model. The return POD model corresponds with an interpolate function built with the defect values computed for the given quantile as parameters. The default is 21 quantile values from 0.05 to 0.98. They can be user-defined using the method setQuantile.

The confidence level is computed by bootstrap. The POD model at the given confidence level is also an interpolate function based on the defect quantile value computed at the given confidence level.

The computeDetectionSize method calls the real quantile regression at the given probability level.

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

Methods

 computeDetectionSize(self, probabilityLevel) Compute the detection size for a given probability level. drawBoxCoxLikelihood(self[, name]) Draw the loglikelihood versus the Box Cox parameter. drawLinearModel(self, probabilityLevel[, name]) Draw the quantile regression prediction versus the true data. drawPOD(self[, probabilityLevel, …]) Draw the POD curve. Accessor to the Box Cox parameter. getPODCLModel(self[, confidenceLevel]) Accessor to the POD model at a given confidence level. getPODModel(self) Accessor to the POD model. getQuantile(self) Accessor to the quantile list for the regression. getR2(self, quantile) Accessor to the pseudo R2 value. Accessor to the simulation size. getVerbose(self) Accessor to the verbosity. run(self) Build the POD models. setQuantile(self, quantile) Accessor to the quantile list for the regression. setSimulationSize(self, size) Accessor to the simulation size. setVerbose(self, verbose) Accessor to the verbosity.
computeDetectionSize(self, 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(self, 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.

drawLinearModel(self, probabilityLevel, name=None)

Draw the quantile regression prediction versus the true data.

Parameters
probabilityLevelfloat

The probability level for which the quantile regression is performed

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.

drawPOD(self, 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(self)

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

Accessor to the POD model.

Returns
PODModelopenturns.Function

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

getQuantile(self)

Accessor to the quantile list for the regression.

getR2(self, quantile)

Accessor to the pseudo R2 value.

Parameters
quantilefloat

The quantile value for which the regression is performed.

Returns
R2float

The pseudo R2 value.

getSimulationSize(self)

Accessor to the simulation size.

Returns
sizeint

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

getVerbose(self)

Accessor to the verbosity.

Returns
verbosebool

Enable or disable the verbosity. Default is True.

run(self)

Build the POD models.

Notes

This method build the quantile regression model. First the censored data are filtered if needed. The Box Cox transformation is performed if it is enabled. Then it builds the POD model for given data and computes using bootstrap all the defects quantile needed to build the POD model at the confidence level.

setQuantile(self, quantile)

Accessor to the quantile list for the regression.

Parameters
quantilesequence of float

The quantile value for which the regression is performed and the corresponding defect size is computed.

setSimulationSize(self, size)

Accessor to the simulation size.

Parameters
sizeint

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

setVerbose(self, verbose)

Accessor to the verbosity.

Parameters
verbosebool

Enable or disable the verbosity.