| OpenMS 2.5.0

Classes | Private Member Functions | Private Attributes | List of all members
ROCCurve Class Reference
Math

ROCCurves show the trade-off in sensitivity and specificity for binary classifiers using different cutoff values. More...

`#include <OpenMS/MATH/STATISTICS/ROCCurve.h>`

## Classes

class | simsortdec
| predicate for sort() More...

## Public Member Functions

| ROCCurve ()
| default constructor More...
| ROCCurve (const std::vector< std::pair< double, bool >> &pairs)
| constructor with value, class pairs More...
virtual | ~ROCCurve ()=default
| destructor More...
| ROCCurve (const ROCCurve &source)
| copy constructor More...
ROCCurve & | operator= (const ROCCurve &source)
| assignment operator More...
void | insertPair (double score, bool clas)
| insert score, type pair More...
double | AUC ()
| returns Area Under Curve More...
double | rocN (Size N)
| returns ROC-N score (e.g. ROC-50). Returns -1 if not enough false positives were found More...
std::vector< std::pair< double, double > > | curve (UInt resolution=10)
| some points in the ROC Curve More...
double | cutoffPos (double fraction=0.95)
double | cutoffNeg (double fraction=0.95)

## Private Member Functions

void | sort ()
| sorts data and caches if sorted More...
void | count ()
| counts global pos and negs More...
double | trapezoidal_area (double x1, double x2, double y1, double y2)

## Private Attributes

std::vector< std::pair< double, bool > > | score_clas_pairs_
UInt | pos_
UInt | neg_
bool | sorted_

## Detailed Description

ROCCurves show the trade-off in sensitivity and specificity for binary classifiers using different cutoff values.

[This class is buggy and usage is discouraged!]

## Constructor & Destructor Documentation

## ◆ ROCCurve() [1/3]

ROCCurve | ( |  | ) |

default constructor

## ◆ ROCCurve() [2/3]

ROCCurve | ( | const std::vector< std::pair< double, bool >> & | pairs | ) |

explicit

constructor with value, class pairs

## ◆ ~ROCCurve()

virtual ~ROCCurve | ( |  | ) |

virtual default

destructor

## ◆ ROCCurve() [3/3]

ROCCurve | ( | const ROCCurve & | source | ) |

copy constructor

## Member Function Documentation

## ◆ AUC()

double AUC | ( |  | ) |

returns Area Under Curve

## ◆ count()

void count | ( |  | ) |

inline private

counts global pos and negs

## ◆ curve()

std::vector<std::pair<double, double> > curve | ( | UInt | resolution = `10` | ) |

some points in the ROC Curve

## ◆ cutoffNeg()

double cutoffNeg | ( | double | fraction = `0.95` | ) |

returns the score at which you would need to set a cutoff to have fraction positives returns -1 if there are not enough positives

## ◆ cutoffPos()

double cutoffPos | ( | double | fraction = `0.95` | ) |

returns the score at which you would need to set a cutoff to have fraction positives returns -1 if there are not enough positives

## ◆ insertPair()

void insertPair | ( | double | score,
|  | bool | clas
| ) |  |

insert score, type pair

## ◆ operator=()

ROCCurve& operator= | ( | const ROCCurve & | source | ) |

assignment operator

## ◆ rocN()

double rocN | ( | Size | N | ) |

returns ROC-N score (e.g. ROC-50). Returns -1 if not enough false positives were found

## ◆ sort()

void sort | ( |  | ) |

inline private

sorts data and caches if sorted

## ◆ trapezoidal_area()

double trapezoidal_area | ( | double | x1,
|  | double | x2,
|  | double | y1,
|  | double | y2
| ) |  |

inline private

calculates area with trapezoidal rule

Parameters

  x1,x2,y1,y2 |

## Member Data Documentation

## ◆ neg_

UInt neg_

private

## ◆ pos_

UInt pos_

private

## ◆ score_clas_pairs_

std::vector<std::pair<double, bool> > score_clas_pairs_

private

## ◆ sorted_

bool sorted_

private