CorrelationAnalysis¶
- class CorrelationAnalysis(*args)¶
Correlation analysis methods.
Provides elementary sensitivity analysis methods to determine the influence of each component of a random vector over a single one-dimensional variable.
- Parameters:
- firstSample2-d list of float
Values taken by a random vector.
- secondSample2-d list of float
Values taken by a single one-dimensional random variable.
See also
Examples
>>> import openturns as ot >>> firstSample = ot.Normal(3).getSample(100) >>> model = ot.SymbolicFunction(['x', 'y', 'z'], ['x + 3 * y - 5 * z']) >>> secondSample = model(firstSample) >>> corr_analysis = ot.CorrelationAnalysis(firstSample, secondSample) >>> print(corr_analysis.computePearsonCorrelation()) [0.153352,0.537644,-0.760563]
Methods
Correlation evaluation based on Kendall's coefficient.
Correlation evaluation based on the Partial Correlation Coefficient.
Correlation evaluation based on the Partial Rank Correlation Coefficient.
Correlation evaluation based on the Pearson correlation coefficient.
Correlation evaluation based on the Standard Regression Coefficient.
Correlation evaluation based on the Standard Rank Regression Coefficient.
Correlation evaluation based on the Spearman correlation coefficient.
computeSquaredSRC
([normalize])Correlation evaluation based on the square of the Standard Regression Coefficient.
Accessor to the object's name.
getId
()Accessor to the object's id.
getName
()Accessor to the object's name.
Accessor to the object's shadowed id.
Accessor to the object's visibility state.
hasName
()Test if the object is named.
Test if the object has a distinguishable name.
setName
(name)Accessor to the object's name.
setShadowedId
(id)Accessor to the object's shadowed id.
setVisibility
(visible)Accessor to the object's visibility state.
- __init__(*args)¶
- computeKendallTau()¶
Correlation evaluation based on Kendall’s coefficient.
See the
Sample
computeKendallTau()
method for details.- Returns:
- coef
Point
Kendall’s coefficients evaluated between the secondSample and each coordinate of the firstSample.
- coef
- computePCC()¶
Correlation evaluation based on the Partial Correlation Coefficient.
Refer to Uncertainty ranking: PCC and PRCC.
- Returns:
- coef
Point
The PCC coefficients evaluated between the secondSample and each coordinate of the firstSample.
- coef
- computePRCC()¶
Correlation evaluation based on the Partial Rank Correlation Coefficient.
Refer to Uncertainty ranking: PCC and PRCC.
- Returns:
- coef
Point
The PRCC coefficients evaluated between the secondSample and each coordinate of the firstSample.
- coef
- computePearsonCorrelation()¶
Correlation evaluation based on the Pearson correlation coefficient.
Refer to Pearson correlation coefficient.
- Returns:
- coef
Point
The Pearson coefficients evaluated between the secondSample and each coordinate of the firstSample.
- coef
- computeSRC()¶
Correlation evaluation based on the Standard Regression Coefficient.
Refer to Uncertainty ranking: SRC and SRRC.
- Returns:
- coef
Point
The SRC evaluated between the secondSample and each coordinate of the firstSample.
- coef
- computeSRRC()¶
Correlation evaluation based on the Standard Rank Regression Coefficient.
Refer to Uncertainty ranking: SRC and SRRC.
- Returns:
- coef
Point
The SRRC evaluated between the secondSample and each coordinate of the firstSample.
- coef
- computeSpearmanCorrelation()¶
Correlation evaluation based on the Spearman correlation coefficient.
Refer to Spearman correlation coefficient.
- Returns:
- coef
Point
The Spearman coefficients evaluated between the secondSample and each coordinate of the firstSample.
- coef
- computeSquaredSRC(normalize=False)¶
Correlation evaluation based on the square of the Standard Regression Coefficient.
Refer to Uncertainty ranking: SRC and SRRC.
- Parameters:
- normalizebool
If True, coefficients sum to one. Default value is False.
- Returns:
- coef
Point
The squared SRC evaluated between the secondSample and each coordinate of the firstSample.
- coef
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getId()¶
Accessor to the object’s id.
- Returns:
- idint
Internal unique identifier.
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getShadowedId()¶
Accessor to the object’s shadowed id.
- Returns:
- idint
Internal unique identifier.
- getVisibility()¶
Accessor to the object’s visibility state.
- Returns:
- visiblebool
Visibility flag.
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- hasVisibleName()¶
Test if the object has a distinguishable name.
- Returns:
- hasVisibleNamebool
True if the name is not empty and not the default one.
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.
- setShadowedId(id)¶
Accessor to the object’s shadowed id.
- Parameters:
- idint
Internal unique identifier.
- setVisibility(visible)¶
Accessor to the object’s visibility state.
- Parameters:
- visiblebool
Visibility flag.
Examples using the class¶
Estimate correlation coefficients
Compute SRC indices confidence intervals
Example of sensitivity analyses on the wing weight model