ArrayFire: corrcoef (original) (raw)
Find the correlation coefficient of values in the input. More...
| Functions | |
|---|---|
| template | |
| AFAPI T | corrcoef (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... | |
Find the correlation coefficient of values in the input.
This function performs the operation across all dimensions of the input array.
◆ af_corrcoef()
C Interface for correlation coefficient.
Parameters
| [out] | realVal | will contain the real part of correlation coefficient of the inputs |
|---|---|---|
| [out] | imagVal | will contain the imaginary part of correlation coefficient of the inputs |
| [in] | X | is the first input array |
| [in] | Y | is 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.
C++ Interface for correlation coefficient.
Parameters
| [in] | X | is the first input array |
|---|---|---|
| [in] | Y | is 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.