PODSummary¶

class
PODSummary
(*args)¶ Run the analysis and compute POD with several methods.
Available constructor:
PODSummary(inputSample, outputSample, detection, noiseThres, saturationThres, boxCox)
 Parameters
 inputSample2d sequence of float
Vector of the input values. The first column must correspond with the defect sizes.
 outputSample2d 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.
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
(self[, directory, extension, …])draw and save all possible graphs
getKrigingPOD
(self)Accessor to the kriging POD object.
getLinearBinomialPOD
(self)Accessor to the linear model POD object with no hypothesis on the residuals.
getLinearGaussPOD
(self)Accessor to the linear model POD object with Gaussian hypothesis.
Accessor to the linear model POD object with kernel smoothing on the residuals.
getMethodActive
(self)Accessor to the dictionnary of active methods.
getPolynomialChaosPOD
(self)Accessor to the polynomial chaos POD object.
getQuantileRegressionPOD
(self)Accessor to the quantile regression POD object.
getResults
(self[, probabilityLevel, …])Print all results in the terminal.
getSamplingSize
(self)Accessor to the Monte Carlo sampling size.
getSimulationSize
(self)Accessor to the simulation size.
getVerbose
(self)Accessor to the verbosity.
run
(self)Run all active methods.
saveResults
(self, name[, probabilityLevel, …])Save all analysis test results in a file.
setMethodActive
(self, method, activation)Accessor to the dictionnary of active methods.
setSamplingSize
(self, size)Accessor to the Monte Carlo sampling size.
setSimulationSize
(self, size)Accessor to the simulation size.
setVerbose
(self, verbose)Accessor to the verbosity.

drawGraphs
(self, 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
(self)¶ Accessor to the kriging POD object.
 Returns
 algorithmKrigingPOD
The KrigingPOD object that is used to compute the POD.

getLinearBinomialPOD
(self)¶ 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
(self)¶ Accessor to the linear model POD object with Gaussian hypothesis.
 Returns
 algorithmUnivariateLinearModelPOD
The UnivariateLinearModelPOD object that is used to compute the POD.

getLinearKernelSmoothingPOD
(self)¶ 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
(self)¶ Accessor to the dictionnary of active methods.
 Returns
 activeDictdict
The dictionnary containing the bool telling if the methods is activated or not.

getPolynomialChaosPOD
(self)¶ Accessor to the polynomial chaos POD object.
 Returns
 algorithmPolynomialChaosPOD
The PolynomialChaosPOD object that is used to compute the POD.

getQuantileRegressionPOD
(self)¶ Accessor to the quantile regression POD object.
 Returns
 algorithmQuantileRegressionPOD
The QuantileRegressionPOD object that is used to compute the POD.

getResults
(self, 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
(self)¶ 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
(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)¶ Run all active methods.

saveResults
(self, 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
(self, 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
(self, 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
(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.