All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
NetworKit::ROCMetric Class Reference

Provides points that define the Receiver Operating Characteristic curve for a given set of predictions. More...

#include <ROCMetric.h>

Additional Inherited Members

- Public Member Functions inherited from NetworKit::EvaluationMetric
 EvaluationMetric ()
 
 EvaluationMetric (const Graph &testGraph)
 
virtual ~EvaluationMetric ()=default
 Default destructor. More...
 
void setTestGraph (const Graph &newTestGraph)
 Sets a new graph to use as ground truth for evaluation. More...
 
virtual std::pair< std::vector
< double >, std::vector
< double > > 
getCurve (std::vector< LinkPredictor::prediction > predictions, count numThresholds=1000)
 Returns a pair of X- and Y-vectors describing the evaluation curve generated from the predictions. More...
 
virtual double getAreaUnderCurve (std::pair< std::vector< double >, std::vector< double >> curve) const
 Returns the area under the given curve by using the trapezoidal rule. More...
 
virtual double getAreaUnderCurve () const
 Returns the area under the curve that was most recently calculated by this instance. More...
 
- Protected Attributes inherited from NetworKit::EvaluationMetric
std::pair< std::vector< double >
, std::vector< double > > 
generatedPoints
 Points describing the generated curve. Will be set after a call to getCurve. More...
 
const GraphtestGraph
 Used to evaluate the binary predictions at the thresholds. More...
 
std::vector
< LinkPredictor::prediction
predictions
 Predictions that should be evaluated. More...
 
std::vector< indexthresholds
 Indices for the thresholds to use. All node-pairs with an index < thresholds[i] will be regarded as links. More...
 
count numPositives
 Absolute number of positive instances in the prediction-set. More...
 
count numNegatives
 Absolute number of negative instances in the prediction-set. More...
 
std::vector< counttruePositives
 True positives regarding the corresponding threshold. More...
 
std::vector< countfalsePositives
 False positives regarding the corresponding threshold. More...
 
std::vector< counttrueNegatives
 True negatives regarding the corresponding threshold. More...
 
std::vector< countfalseNegatives
 False negatives regarding the corresponding threshold. More...
 

Detailed Description

Provides points that define the Receiver Operating Characteristic curve for a given set of predictions.

Based on the generated points the area under the curve can be calculated with the trapzoidal rule.


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