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.

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

computeKendallTau()

Correlation evaluation based on Kendall's \tau coefficient.

computePCC()

Correlation evaluation based on the Partial Correlation Coefficient.

computePRCC()

Correlation evaluation based on the Partial Rank Correlation Coefficient.

computePearsonCorrelation()

Correlation evaluation based on the Pearson correlation coefficient.

computeSRC()

Correlation evaluation based on the Standard Regression Coefficient.

computeSRRC()

Correlation evaluation based on the Standard Rank Regression Coefficient.

computeSpearmanCorrelation()

Correlation evaluation based on the Spearman correlation coefficient.

computeSquaredSRC([normalize])

Correlation evaluation based on the square of the Standard Regression Coefficient.

getClassName()

Accessor to the object's name.

getId()

Accessor to the object's id.

getName()

Accessor to the object's name.

getShadowedId()

Accessor to the object's shadowed id.

getVisibility()

Accessor to the object's visibility state.

hasName()

Test if the object is named.

hasVisibleName()

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.

PCC

PRCC

PearsonCorrelation

SpearmanCorrelation

__init__(*args)
computeKendallTau()

Correlation evaluation based on Kendall’s \tau coefficient.

See the Sample computeKendallTau() method for details.

Returns:
coefPoint

Kendall’s \tau coefficients evaluated between the secondSample and each coordinate of the firstSample.

computePCC()

Correlation evaluation based on the Partial Correlation Coefficient.

Refer to Uncertainty ranking: PCC and PRCC.

Returns:
coefPoint

The PCC coefficients evaluated between the secondSample and each coordinate of the firstSample.

computePRCC()

Correlation evaluation based on the Partial Rank Correlation Coefficient.

Refer to Uncertainty ranking: PCC and PRCC.

Returns:
coefPoint

The PRCC coefficients evaluated between the secondSample and each coordinate of the firstSample.

computePearsonCorrelation()

Correlation evaluation based on the Pearson correlation coefficient.

Refer to Pearson correlation coefficient.

Returns:
coefPoint

The Pearson coefficients evaluated between the secondSample and each coordinate of the firstSample.

computeSRC()

Correlation evaluation based on the Standard Regression Coefficient.

Refer to Uncertainty ranking: SRC and SRRC.

Returns:
coefPoint

The SRC evaluated between the secondSample and each coordinate of the firstSample.

computeSRRC()

Correlation evaluation based on the Standard Rank Regression Coefficient.

Refer to Uncertainty ranking: SRC and SRRC.

Returns:
coefPoint

The SRRC evaluated between the secondSample and each coordinate of the firstSample.

computeSpearmanCorrelation()

Correlation evaluation based on the Spearman correlation coefficient.

Refer to Spearman correlation coefficient.

Returns:
coefPoint

The Spearman coefficients evaluated between the secondSample and each coordinate of the firstSample.

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:
coefPoint

The squared SRC evaluated between the secondSample and each coordinate of the firstSample.

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

Estimate correlation coefficients

Compute SRC indices confidence intervals

Compute SRC indices confidence intervals

Example of sensitivity analyses on the wing weight model

Example of sensitivity analyses on the wing weight model