|
Darwin
1.10(beta)
|
Precision-recall curve. More...
Public Member Functions | |
| drwnPRCurve () | |
| default constructor | |
| drwnPRCurve (const drwnClassificationResults &c) | |
| copy constructor | |
| vector< pair< double, double > > | getCurve () const |
| return a list of points defining the precision-recall curve | |
| void | writeCurve (const char *filename) const |
| write the precision-recall curve to a space-delimited file | |
| double | averagePrecision (unsigned numPoints=11) const |
| extract the average precision (area under the curve) | |
Public Member Functions inherited from drwnClassificationResults | |
| drwnClassificationResults () | |
| default constructor | |
| drwnClassificationResults (const drwnClassificationResults &c) | |
| copy constructor | |
| int | numPositives () const |
| return the number os positive samples accumulated | |
| int | numNegatives () const |
| return the number of negative samples accumulated | |
| int | numSamples () const |
| return the total number (positive and negative) of samples accumulated | |
| int | numThresholds () const |
| return the number of unique classification scores | |
| int | numMisses () const |
| return the number of positive samples that have not been scored | |
| double | getPosWeight () const |
| return the relative weight of a positive sample to a negative sample | |
| void | setPosWeight (double w) |
| set the relative weight of a positive sample to a negative sample | |
| void | normalize () |
| this will change the weight of the positive examples such that overall positive and negative examples will have the same weight | |
| void | clear () |
| clear the accumulated scores | |
| bool | write (const char *filename) const |
| write the accumulated scores to file | |
| bool | read (const char *filename) |
| read accumulated scores from file | |
| void | accumulate (const drwnClassificationResults &c) |
| accumulate results from another drwnClassificationResults object | |
| void | accumulate (const drwnClassifierDataset &dataset, drwnClassifier const *classifier, int positiveClassId=1) |
Accumulate results from a classifier run on a dataset. The positiveClass parameter indicates the positive class label for multi-class classifiers. | |
| void | accumulatePositives (double score, int count=1) |
| accumulate a single positive example | |
| void | accumulatePositives (const vector< double > &scores) |
| accumulate multiple positive examples | |
| void | accumulateNegatives (double score, int count=1) |
| accumulate a single negative example | |
| void | accumulateNegatives (const vector< double > &scores) |
| accumulate multiple negative examples | |
| void | accumulateMisses (int count=1) |
| accumulate unscored positive examples (misses) | |
Additional Inherited Members | |
Static Public Attributes inherited from drwnClassificationResults | |
| static bool | INCLUDE_MISSES = false |
| true if some positive samples are never scored | |
Protected Attributes inherited from drwnClassificationResults | |
| map< double, pair< int, int > > | _scoredResults |
| number of positives (first) and negatives (second) grouped by score | |
| int | _numPositiveSamples |
| must be greater than sum(_scoredResults.first) | |
| int | _numNegativeSamples |
| must be must be equal to sum(_scoredResults.second) | |
| double | _posWeight |
| weight of positive-to-negative count | |
Precision-recall curve.
1.8.13