Back to Aurora Vision Library website
You are here: Start » Function Reference » Basic » Statistics » PearsonCorrelation_Weighted
| Header: | STD.h |
|---|---|
| Namespace: | avl |
| Module: | FoundationLite |
Computes Pearson product-moment correlation coefficient with weights.
Syntax
void avl::PearsonCorrelation_Weighted ( const atl::Array<float>& inValues1, const atl::Array<float>& inValues2, const atl::Array<float>& inWeights, float inMinStdDev, float& outCorrelation )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inValues1 | const Array<float>& | Array of values of the first variable | ||
![]() |
inValues2 | const Array<float>& | Array of values of the second variable | ||
![]() |
inWeights | const Array<float>& | Weights corresponding to the elements of 'inValues1' and 'inValues2' | ||
![]() |
inMinStdDev | float | 0.0 - ![]() |
0.001f | Minimum value of standard deviation for correlation to be non-zero |
![]() |
outCorrelation | float& | Computed correlation coefficient between two variables |
Errors
List of possible exceptions:
| Error type | Description |
|---|---|
| DomainError | Cannot compute the value of PearsonCorrelation_Weighted. The standard deviation of some set of input values is equal to zero. |
| DomainError | Empty array on input in PearsonCorrelation_Weighted. |
| DomainError | Inconsistent size of arrays in PearsonCorrelation_Weighted. |



