theplu::yat::statistics::AUC Class Reference

Class calculating Area Under ROC Curve. More...

#include <yat/statistics/AUC.h>

Inheritance diagram for theplu::yat::statistics::AUC:

theplu::yat::statistics::Score

List of all members.

Public Member Functions

 AUC (bool absolute=true)
 Defaul Constructor.
double score (const classifier::Target &target, const utility::VectorBase &value) const
double score (const classifier::Target &target, const classifier::DataLookupWeighted1D &value) const
double score (const classifier::Target &target, const utility::VectorBase &value, const utility::VectorBase &weight) const
void absolute (bool absolute)
 Function changing mode of Score.
virtual double score (const classifier::Target &target, const classifier::DataLookup1D &value) const
double score (const classifier::Target &target, const classifier::DataLookup1D &value, const classifier::DataLookup1D &weight) const

Protected Attributes

bool absolute_

Friends

class ROC


Detailed Description

Class calculating Area Under ROC Curve.

Constructor & Destructor Documentation

theplu::yat::statistics::AUC::AUC ( bool  absolute = true  ) 

Defaul Constructor.

Parameters:
absolute if true max(AUC, 1-AUC) is used


Member Function Documentation

double theplu::yat::statistics::Score::score ( const classifier::Target target,
const classifier::DataLookup1D value,
const classifier::DataLookup1D weight 
) const [inherited]

Function calculating the weighted version of score. In absolute mode, also the score using negated class labels is calculated, and the largest of the two scores are calculated. Absolute mode should be used when two-tailed test is wanted.

value and weight are copied to utility::vector and the corresponding operator is called. If speed is important this operator should be implemented in inherited class to avoid copying.

virtual double theplu::yat::statistics::Score::score ( const classifier::Target target,
const classifier::DataLookup1D value 
) const [virtual, inherited]

Function calculating the score. In absolute mode, also the score using negated class labels is calculated, and the largest of the two scores are calculated.

value is copied to a utility::vector and that operator is called. If speed is important this operator should be implemented in inherited class to avoid copying.

Returns:
score

double theplu::yat::statistics::AUC::score ( const classifier::Target target,
const utility::VectorBase value,
const utility::VectorBase weight 
) const [virtual]

Function taking values, target, weight and a vector defining what samples to use. The area is defines as $ \frac{\sum w^+w^-}{\sum w^+w^-}$, where the sum in the numerator goes over all pairs where value+ is larger than value-. The denominator goes over all pairs. If target is equal to 1, sample belonges to class + otherwise sample belongs to class -.

Returns:
wheighted version of area under the ROC curve. If the area is less than 0.5 and absolute=true, 1-area is returned. Complexity is $ N^2 $ where $ N $ is number of samples.

Implements theplu::yat::statistics::Score.

double theplu::yat::statistics::AUC::score ( const classifier::Target target,
const classifier::DataLookupWeighted1D value 
) const [virtual]

Function taking values, target, weight and a vector defining what samples to use. The area is defines as $ \frac{\sum w^+w^-}{\sum w^+w^-}$, where the sum in the numerator goes over all pairs where value+ is larger than value-. The denominator goes over all pairs. If target is equal to 1, sample belonges to class + otherwise sample belongs to class -.

Returns:
wheighted version of area under the ROC curve. If the area is less than 0.5 and absolute=true, 1-area is returned. Complexity is $ N^2 $ where $ N $ is number of samples.

Reimplemented from theplu::yat::statistics::Score.

double theplu::yat::statistics::AUC::score ( const classifier::Target target,
const utility::VectorBase value 
) const [virtual]

Function taking value, target (+1 or -1) and vector defining what samples to use. The score is equivalent to Mann-Whitney statistics.

Returns:
the area under the ROC curve. If the area is less than 0.5 and absolute=true, 1-area is returned. Complexity is $ N\log N $ where $ N $ is number of samples.

Implements theplu::yat::statistics::Score.


Member Data Documentation

bool theplu::yat::statistics::Score::absolute_ [protected, inherited]

true if method is absolute, which means if score is below expected value (by chance) E, score returns E-score+E instead.


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

Generated on Mon Nov 7 02:25:52 2011 for yat by  doxygen 1.5.9