Sleipnir
Public Member Functions
Sleipnir::CMeasurePearNorm Class Reference

Calculates the Fisher's z-transformed Pearson correlation between the two vectors. More...

#include <measure.h>

Inheritance diagram for Sleipnir::CMeasurePearNorm:
Sleipnir::CMeasurePearNormImpl Sleipnir::IMeasure

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.
IMeasureClone () const
 Create a copy of the current measure object.

Detailed Description

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).

See also:
CMeasurePearson

Definition at line 550 of file measure.h.


Constructor & Destructor Documentation

Sleipnir::CMeasurePearNorm::CMeasurePearNorm ( double  dAverage,
double  dStdev 
) [inline]

Construct a measure which will calculate z-scored Fisher's z-transformed Pearson correlations.

Parameters:
dAverageAverage used in z-scoring.
dStdevStandard deviation used in z-scoring.

After z-transformation, the z-score is calculated as:

 (dP - dAverage) / dStdev

Definition at line 573 of file measure.h.


Member Function Documentation

IMeasure* Sleipnir::CMeasurePearNorm::Clone ( ) const [inline, virtual]

Create a copy of the current measure object.

Returns:
Copy of the current measure object.
Remarks:
Caller is, of course, responsible for destroying the created 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.

Returns:
The string identifier of the measure type.

Implements Sleipnir::IMeasure.

Definition at line 578 of file measure.h.

bool Sleipnir::CMeasurePearNorm::IsRank ( ) const [inline, virtual]

Return true if the measure requires rank-based integer inputs.

Returns:
True if the measure requires rank-based input vectors.
Remarks:
The input vectors for rank measures should contain only floating point values with no fractional part; behavior is undefined if they don't.

Implements Sleipnir::IMeasure.

Definition at line 582 of file measure.h.

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.

Parameters:
adXFirst array of values.
iNLength of first array.
adYSecond array of values.
iMLength of second array.
eMapWay in which returned value should be centered (implementation-specific).
adWXIf non-null, weights of elements in the first array.
adWYIf non-null, weights of elements in the second array.
Returns:
Measure calculated between the two input vectors and, optionally, weights.
Remarks:
Pretty much every implementation will puke if given bad input; bounds checking etc. is minimal.

Implements Sleipnir::IMeasure.

Definition at line 780 of file measure.cpp.

References Sleipnir::IMeasure::EMapNone, and Sleipnir::CMeasurePearson::Pearson().


The documentation for this class was generated from the following files: