ROCAUCScore< PositiveClass > Class Template Reference

ROC-AUC is a metric of performance for classification algorithms that for binary classification is equal to area under the curve formed by $ (fpr, tpr) $, where $ fpr $ and $ tpr $ are the true positive rate and false positive rate, which is calculated for many different thresholds. More...

Static Public Member Functions

static double Evaluate (const arma::Row< size_t > &labels, const arma::Row< double > &scores)
 Calculate area under the ROC curve. More...

 

Static Public Attributes

static const bool NeedsMinimization = false
 Information for hyper-parameter tuning code. More...

 

Detailed Description


template<size_t PositiveClass = 1>
class mlpack::cv::ROCAUCScore< PositiveClass >

ROC-AUC is a metric of performance for classification algorithms that for binary classification is equal to area under the curve formed by $ (fpr, tpr) $, where $ fpr $ and $ tpr $ are the true positive rate and false positive rate, which is calculated for many different thresholds.

For each thresholds, $ tpr $ and $ fpr $ are calculated as, $ tpr = tp / (tp + fn) $ and $ fpr = fp / (fp + tn) $, where $ tp $, $ tn $, $ fp $ and $ fn $ are the numbers of true positives, true negatives, false positives and false negatives respectively.

Template Parameters
PositiveClassPositives are assumed to have labels equal to this value. Defaults to 1.

Definition at line 35 of file roc_auc_score.hpp.

Member Function Documentation

◆ Evaluate()

static double Evaluate ( const arma::Row< size_t > &  labels,
const arma::Row< double > &  scores 
)
static

Calculate area under the ROC curve.

Parameters
labelsGround truth (correct) labels.
scoresProbability scores of positive class.

Member Data Documentation

◆ NeedsMinimization

const bool NeedsMinimization = false
static

Information for hyper-parameter tuning code.

It indicates that we want to maximize the metric.

Definition at line 51 of file roc_auc_score.hpp.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-git/src/mlpack/core/cv/metrics/roc_auc_score.hpp