Sleipnir
|
Calculates the Fisher's z-transformed Pearson correlation between the two vectors. More...
#include <measure.h>
Public Member Functions | |
CMeasurePearNorm () | |
Construct a measure which will calculate Fisher's z-transformed Pearson correlations with no z-scoring. | |
CMeasurePearNorm (double dAverage, double dStdev) | |
Construct a measure which will calculate z-scored Fisher's z-transformed Pearson correlations. | |
double | Measure (const float *adX, size_t iN, const float *adY, size_t iM, EMap eMap=EMapNone, const float *adWX=NULL, const float *adWY=NULL) const |
Calculate the measure between two given vectors with optional element weights. | |
const char * | GetName () const |
Return the human-readable unique identifier of the measure type. | |
bool | IsRank () const |
Return true if the measure requires rank-based integer inputs. | |
IMeasure * | Clone () const |
Create a copy of the current measure object. |
Calculates the Fisher's z-transformed Pearson correlation between the two vectors.
Calculates Pearson correlation between two vectors and transforms the result using Fisher's z-transform. This is done using the formula:
log( (1 + dP) / (1 - dP) ) / 2
If constructed with a known average and standard deviation, the resulting correlations will also be z-scored (i.e. the resulting normal distribution of scores will be shifted to have mean zero and standard deviation one).
Sleipnir::CMeasurePearNorm::CMeasurePearNorm | ( | double | dAverage, |
double | dStdev | ||
) | [inline] |
Construct a measure which will calculate z-scored Fisher's z-transformed Pearson correlations.
dAverage | Average used in z-scoring. |
dStdev | Standard deviation used in z-scoring. |
After z-transformation, the z-score is calculated as:
(dP - dAverage) / dStdev
IMeasure* Sleipnir::CMeasurePearNorm::Clone | ( | ) | const [inline, virtual] |
Create a copy of the current measure object.
Implements Sleipnir::IMeasure.
Definition at line 586 of file measure.h.
References CMeasurePearNorm().
const char* Sleipnir::CMeasurePearNorm::GetName | ( | ) | const [inline, virtual] |
Return the human-readable unique identifier of the measure type.
Implements Sleipnir::IMeasure.
bool Sleipnir::CMeasurePearNorm::IsRank | ( | ) | const [inline, virtual] |
Return true if the measure requires rank-based integer inputs.
Implements Sleipnir::IMeasure.
double Sleipnir::CMeasurePearNorm::Measure | ( | const float * | adX, |
size_t | iN, | ||
const float * | adY, | ||
size_t | iM, | ||
EMap | eMap = EMapNone , |
||
const float * | adWX = NULL , |
||
const float * | adWY = NULL |
||
) | const [virtual] |
Calculate the measure between two given vectors with optional element weights.
adX | First array of values. |
iN | Length of first array. |
adY | Second array of values. |
iM | Length of second array. |
eMap | Way in which returned value should be centered (implementation-specific). |
adWX | If non-null, weights of elements in the first array. |
adWY | If non-null, weights of elements in the second array. |
Implements Sleipnir::IMeasure.
Definition at line 780 of file measure.cpp.
References Sleipnir::IMeasure::EMapNone, and Sleipnir::CMeasurePearson::Pearson().