PODSummary

class PODSummary(*args)

Run the analysis and compute POD with several methods.

Available constructor:

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

Parameters:
inputSample : 2-d sequence of float

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

outputSample : 2-d sequence of float

Vector of the signals, of dimension 1.

detection : float

Detection value of the signal.

noiseThres : float

Value for low censored data. Default is None.

saturationThres : float

Value for high censored data. Default is None

boxCox : bool 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 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.

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.
drawGraphs(directory=None, extension='png', probabilityLevel=None, confidenceLevel=None)

draw and save all possible graphs

Parameters:
directory : string

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

extension : string

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

probabilityLevel : float

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

confidenceLevel : float

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:
algorithm : KrigingPOD

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:
algorithm : UnivariateLinearModelPOD

The UnivariateLinearModelPOD object that is used to compute the POD.

getLinearGaussPOD()

Accessor to the linear model POD object with Gaussian hypothesis.

Returns:
algorithm : UnivariateLinearModelPOD

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:
algorithm : UnivariateLinearModelPOD

The UnivariateLinearModelPOD object that is used to compute the POD.

getMethodActive()

Accessor to the dictionnary of active methods.

Returns:
activeDict : dict

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

getPolynomialChaosPOD()

Accessor to the polynomial chaos POD object.

Returns:
algorithm : PolynomialChaosPOD

The PolynomialChaosPOD object that is used to compute the POD.

getQuantileRegressionPOD()

Accessor to the quantile regression POD object.

Returns:
algorithm : QuantileRegressionPOD

The QuantileRegressionPOD object that is used to compute the POD.

getResults(probabilityLevel=0.9, confidenceLevel=0.95)

Print all results in the terminal.

Parameters:
probabilityLevel : float

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

confidenceLevel : float

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:
size : int

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:
size : int

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

getVerbose()

Accessor to the verbosity.

Returns:
verbose : bool

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:
name : string

Name of the file or full path name.

probabilityLevel : float

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

confidenceLevel : float

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:
method : string

The key of the method to activate or deactivate.

activation : bool

Set to True to activate and False to deactivate.

setSamplingSize(size)

Accessor to the Monte Carlo sampling size.

Parameters:
size : int

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:
size : int

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

setVerbose(verbose)

Accessor to the verbosity.

Parameters:
verbose : bool

Enable or disable the verbosity.