A high-performance general-purpose compute library

Find the correlation coefficient of values in the input. More...

Functions

template<typename T >
AFAPIcorrcoef (const array &X, const array &Y)
 C++ Interface for correlation coefficient. More...
 
AFAPI af_err af_corrcoef (double *realVal, double *imagVal, const af_array X, const af_array Y)
 C Interface for correlation coefficient. More...
 

Detailed Description

Find the correlation coefficient of values in the input.

This function performs the operation across all dimensions of the input array.


Function Documentation

◆ af_corrcoef()

AFAPI af_err af_corrcoef ( double *  realVal,
double *  imagVal,
const af_array  X,
const af_array  Y 
)

C Interface for correlation coefficient.

Parameters
[out]realValwill contain the real part of correlation coefficient of the inputs
[out]imagValwill contain the imaginary part of correlation coefficient of the inputs
[in]Xis the first input array
[in]Yis the second input array
Returns
AF_SUCCESS if the operation is successful, otherwise an appropriate error code is returned.
Note
There are many ways correlation coefficient is calculated. This algorithm returns Pearson product-moment correlation coefficient.

◆ corrcoef()

AFAPI T corrcoef ( const array X,
const array Y 
)

C++ Interface for correlation coefficient.

Parameters
[in]Xis the first input array
[in]Yis the second input array
Returns
correlation coefficient of the input arrays
Note
There are many ways correlation coefficient is calculated. This algorithm returns Pearson product-moment correlation coefficient.