PODSummary

class PODSummary(*args)

Run the analysis and compute POD with several methods.

Available constructor:

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

Parameters:
inputSample2-d sequence of float

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

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.

Methods

drawGraphs([directory, extension, ...])

draw and save all possible graphs

getKrigingPOD()

Accessor to the kriging POD object.

getLinearBinomialPOD()

Accessor to the linear model POD object with no hypothesis on the residuals.

getLinearGaussPOD()

Accessor to the linear model POD object with Gaussian hypothesis.

getLinearKernelSmoothingPOD()

Accessor to the linear model POD object with kernel smoothing on the residuals.

getMethodActive()

Accessor to the dictionnary of active methods.

getPolynomialChaosPOD()

Accessor to the polynomial chaos POD object.

getQuantileRegressionPOD()

Accessor to the quantile regression POD object.

getResults([probabilityLevel, confidenceLevel])

Print all results in the terminal.

getSamplingSize()

Accessor to the Monte Carlo sampling size.

getSimulationSize()

Accessor to the simulation size.

getVerbose()

Accessor to the verbosity.

run()

Run all active methods.

saveResults(name[, probabilityLevel, ...])

Save all analysis test results in a file.

setMethodActive(method, activation)

Accessor to the dictionnary of active methods.

setSamplingSize(size)

Accessor to the Monte Carlo sampling size.

setSimulationSize(size)

Accessor to the simulation size.

setVerbose(verbose)

Accessor to the verbosity.

Warning

The first column of the input sample must corresponds with the defects sample.

Notes

This class aims at running the linear analysis and computing the POD with different models:

  • Linear regression model with Gaussian residuals hypothesis,

  • Linear regression model with no hypothesis on the residuals (binomial),

  • Linear regression model with with kernel smoothing on the residuals,

  • Quantile regression,

  • Polynomial chaos,

  • kriging if the dimension of the input sample is greater than 1.

Each method can be deactivated using the method setMethodActive and using the key corresponding to the method.

All results can be displayed and saved thanks to the methods printResults, saveResults and saveGraphs. For each method, the probability level and confidence level can be specified in order to compute the defect size to the wanted probability level.

The verbosity is enabled by default but it can be disabled using the method setVerbose.

drawGraphs(directory=None, extension='png', probabilityLevel=None, confidenceLevel=None)

draw and save all possible graphs

Parameters:
directorystring

Directory where to save the graphs. Default is the working directory.

extensionstring

File extension of the graphs. Default is ‘png’.

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.

getKrigingPOD()

Accessor to the kriging POD object.

Returns:
algorithmKrigingPOD

The KrigingPOD object that is used to compute the POD.

getLinearBinomialPOD()

Accessor to the linear model POD object with no hypothesis on the residuals.

Returns:
algorithmUnivariateLinearModelPOD

The UnivariateLinearModelPOD object that is used to compute the POD.

getLinearGaussPOD()

Accessor to the linear model POD object with Gaussian hypothesis.

Returns:
algorithmUnivariateLinearModelPOD

The UnivariateLinearModelPOD object that is used to compute the POD.

getLinearKernelSmoothingPOD()

Accessor to the linear model POD object with kernel smoothing on the residuals.

Returns:
algorithmUnivariateLinearModelPOD

The UnivariateLinearModelPOD object that is used to compute the POD.

getMethodActive()

Accessor to the dictionnary of active methods.

Returns:
activeDictdict

The dictionnary containing the bool telling if the methods is activated or not.

getPolynomialChaosPOD()

Accessor to the polynomial chaos POD object.

Returns:
algorithmPolynomialChaosPOD

The PolynomialChaosPOD object that is used to compute the POD.

getQuantileRegressionPOD()

Accessor to the quantile regression POD object.

Returns:
algorithmQuantileRegressionPOD

The QuantileRegressionPOD object that is used to compute the POD.

getResults(probabilityLevel=0.9, confidenceLevel=0.95)

Print all results in the terminal.

Parameters:
probabilityLevelfloat

The probability level for which the defect size is computed. default is 0.9.

confidenceLevelfloat

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

Notes

The probability level and confidence level can be specified in order to display the defect size for different probability level.

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 for polynomial chaos and kriging.

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

Run all active methods.

saveResults(name, probabilityLevel=0.9, confidenceLevel=0.95)

Save all analysis test results in a file.

Parameters:
namestring

Name of the file or full path name.

probabilityLevelfloat

The probability level for which the defect size is computed. default is 0.9.

confidenceLevelfloat

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

Notes

The probability level and confidence level can be specified in order to display the defect size for different probability level.

The file can be saved as a csv file. Separations are made with tabulations.

If name is the file name, then it is saved in the current working directory.

setMethodActive(method, activation)

Accessor to the dictionnary of active methods.

Parameters:
methodstring

The key of the method to activate or deactivate.

activationbool

Set to True to activate and False to deactivate.

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 for polynomial chaos and kriging.

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.