Sleipnir
Public Member Functions
Sleipnir::CMeasureRelativeAUC Class Reference

Calculates the difference in relative absolute sums of two vectors (centering and weights ignored). More...

#include <measure.h>

Inheritance diagram for Sleipnir::CMeasureRelativeAUC:
Sleipnir::IMeasure

Public Member Functions

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 difference in relative absolute sums of two vectors (centering and weights ignored).

For two vectors [X0, ..., XN] and [Y0, ..., YN], calculates:

 1 - sum(|Xi - Yi|)/sum(|Xi| + |Yi|)

This is useful for detecting whether two vectors vary in approximately the same way (as per Pearson correlation) and at approximately the same values (as per Euclidean distance).

Definition at line 700 of file measure.h.


Member Function Documentation

IMeasure* Sleipnir::CMeasureRelativeAUC::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 713 of file measure.h.

const char* Sleipnir::CMeasureRelativeAUC::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 705 of file measure.h.

bool Sleipnir::CMeasureRelativeAUC::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 709 of file measure.h.

double Sleipnir::CMeasureRelativeAUC::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 918 of file measure.cpp.

References Sleipnir::CMeta::GetNaN(), and Sleipnir::CMeta::IsNaN().


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