QuantileAnalysis¶
- class persalys.QuantileAnalysis(*args)¶
- Create a data analysis of a design of experiments. - Parameters:
- namestr
- Name 
- designDesignOfExperiment
- Design of experiments 
 
 - Methods - CDF threshold accessor. - Accessor to the object's name. - Confidence level accessor. - Design of experiments accessor. - Error message accessor. - Get the variables to analyse. - getName()- Accessor to the object's name. - Parameters sample size accessor. - Physical model accessor. - Result accessor. - getSeed()- Random generator seed. - Tail types accessor. - Target probabilities accessor. - Threshold accessor. - getType()- Analysis type accessor - Warning message accessor. - hasName()- Test if the object is named. - Whether the analysis has been run. - Whether the analysis involves reliability. - Whether the analysis is running. - run()- Launch the analysis. - setConfidenceIntervalLevel(ciLevel)- Confidence level accessor. - setInterestVariables(variablesNames)- Set the variables to analyse. - setName(name)- Accessor to the object's name. - setParameterSampleSize(paramSampleSize)- Parameters sample size accessor. - setSeed(seed)- Random generator seed. - setTailTypes(tailTypes)- Tail types accessor. - setTargetProbabilities(targetProbas)- Target probabilities accessor. - setThreshold(threshold)- Threshold accessor. - setType(type)- Analysis type accessor - checkThresholdCompatibility - computeSampleSizeValidity - getDefaultTargetProbability - plotGPD - plotMeanExcess - setDefaultTargetProbability - Examples - >>> import openturns as ot >>> import persalys >>> ot.RandomGenerator.SetSeed(0) - Create the model: - >>> filename = 'data.csv' >>> sample = ot.Normal(3).getSample(100) >>> sample.exportToCSVFile(filename) >>> model = persalys.DataModel('myDataModel', 'data.csv', [0, 1, 2]) - Create the Quantile analysis: - >>> analysis = persalys.QuantileAnalysis('analysis', model) >>> analysis.setTargetProbabilities([[1e-2]]*3) >>> analysis.setTailTypes([persalys.QuantileAnalysisResult.Upper]*3) >>> analysis.run() - Get the result: - >>> result = analysis.getResult() - __init__(*args)¶
 - getCDFThreshold()¶
- CDF threshold accessor. - Returns:
- cdfThresholdopenturns.Sample
- CDF threshold sample, dimension: number of marginals, size=2. threshold[0]: lower threshold, threshold[1]: upper threshold. 
 
- cdfThreshold
 
 - getClassName()¶
- Accessor to the object’s name. - Returns:
- class_namestr
- The object class name (object.__class__.__name__). 
 
 
 - getConfidenceIntervalLevel()¶
- Confidence level accessor. - Returns:
- ciLeveldouble
- Confidence level for quantile intervals. 
 
 
 - getDesignOfExperiment()¶
- Design of experiments accessor. - Returns:
- modelDesignOfExperiment
- Design of experiments 
 
- model
 
 - getErrorMessage()¶
- Error message accessor. - Returns:
- messagestr
- Error message if the analysis failed 
 
 
 - getInterestVariables()¶
- Get the variables to analyse. - Returns:
- variablesNamessequence of str
- Names of the variables to analyse 
 
 
 - getName()¶
- Accessor to the object’s name. - Returns:
- namestr
- The name of the object. 
 
 
 - getParameterSampleSize()¶
- Parameters sample size accessor. - Returns:
- sizeint
- Number of Generalized Pareto set of parameters used for estimating quantiles confidence interval. It is set by default to 1000. 
 
 
 - getPythonScript()¶
- Physical model accessor. - Returns:
- scriptstr
- Python script to replay the analysis 
 
 
 - getResult()¶
- Result accessor. - Returns:
- resultpersalys.QuantileAnalysisResult
- Analysis result. 
 
- result
 
 - getSeed()¶
- Random generator seed. - Returns:
- seedint
- Random generator seed. 
 
 
 - getTailTypes()¶
- Tail types accessor. - Returns:
- typesopenturns.Indices
- Collection of bit-wise tail type for each marginal. Lower = 1, Upper = 2, Bilateral = 4 
 
- types
 
 - getTargetProbabilities()¶
- Target probabilities accessor. - Returns:
- targetProbasequence of openturns.Point
- Collection (size: number of marginals) of points (dimension: number of terget probabilities for each marginals) for which the quantiles are estimated. 
 
- targetProbasequence of 
 
 - getThreshold()¶
- Threshold accessor. - Returns:
- thresholdopenturns.Sample
- Threshold sample, dimension: number of marginals, size=2. threshold[0]: lower threshold, threshold[1]: upper threshold. 
 
- threshold
 
 - getType()¶
- Analysis type accessor - Returns:
- typeenum
- Analysis type, either persalys.QuantileAnalysisResult.MonteCarlo or persalys.QuantileAnalysisResult.GeneralizedPareto. 
 
 
 - getWarningMessage()¶
- Warning message accessor. - Returns:
- messagestr
- Warning message which can appear during the analysis computation 
 
 
 - hasName()¶
- Test if the object is named. - Returns:
- hasNamebool
- True if the name is not empty. 
 
 
 - hasValidResult()¶
- Whether the analysis has been run. - Returns:
- hasValidResultbool
- Whether the analysis has already been run 
 
 
 - isReliabilityAnalysis()¶
- Whether the analysis involves reliability. - Returns:
- isReliabilityAnalysisbool
- Whether the analysis involves a reliability analysis 
 
 
 - isRunning()¶
- Whether the analysis is running. - Returns:
- isRunningbool
- Whether the analysis is running 
 
 
 - run()¶
- Launch the analysis. 
 - setConfidenceIntervalLevel(ciLevel)¶
- Confidence level accessor. - Parameters:
- ciLeveldouble
- Confidence level for quantile intervals. 
 
 
 - setInterestVariables(variablesNames)¶
- Set the variables to analyse. - Parameters:
- variablesNamessequence of str
- Names of the variables to analyse 
 
 
 - setName(name)¶
- Accessor to the object’s name. - Parameters:
- namestr
- The name of the object. 
 
 
 - setParameterSampleSize(paramSampleSize)¶
- Parameters sample size accessor. - Parameters:
- sizeint
- Number of Generalized Pareto set of parameters used for estimating quantiles confidence interval. 
 
 
 - setSeed(seed)¶
- Random generator seed. - Parameters:
- seedint
- Random generator seed. 
 
 
 - setTailTypes(tailTypes)¶
- Tail types accessor. - Parameters:
- typesopenturns.Indices
- Collection of bit-wise tail type for each marginal. Lower = 1, Upper = 2, Bilateral = 4 
 
- types
 
 - setTargetProbabilities(targetProbas)¶
- Target probabilities accessor. - Parameters:
- targetProbasequence of openturns.Point
- Collection (size: number of marginals) of points (dimension: number of terget probabilities for each marginals) for which the quantiles are estimated. 
 
- targetProbasequence of 
 
 - setThreshold(threshold)¶
- Threshold accessor. - Parameters:
- thresholdopenturns.Sample
- Threshold sample, dimension: number of marginals, size=2. threshold[0]: lower threshold, threshold[1]: upper threshold. 
 
- threshold
 
 - setType(type)¶
- Analysis type accessor - Parameters:
- typeenum
- Analysis type, either persalys.QuantileAnalysisResult.MonteCarlo or persalys.QuantileAnalysisResult.GeneralizedPareto. 
 
 
 
