public class Auc extends Object
Constructor and Description |
---|
Auc() |
Auc(double threshold)
Allocates a new data-structure for accumulating information about AUC and a few other accuracy
measures.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int trueValue,
double score)
Adds a score to the AUC buffers.
|
void |
add(int trueValue,
int predictedClass) |
double |
auc()
Computes the AUC of points seen so far.
|
Matrix |
confusion()
Returns the confusion matrix for the classifier supposing that we were to use a particular
threshold.
|
Matrix |
entropy()
Returns a matrix related to the confusion matrix and to the log-likelihood.
|
boolean |
isProbabilityScore() |
void |
setMaxBufferSize(int maxBufferSize) |
void |
setProbabilityScore(boolean probabilityScore) |
public Auc(double threshold)
threshold
- The threshold to use in computing the confusion matrix.public Auc()
public void add(int trueValue, double score)
trueValue
- Whether this score is for a true-positive or a true-negative example.score
- The score for this example.public void add(int trueValue, int predictedClass)
public double auc()
public Matrix confusion()
public Matrix entropy()
public void setMaxBufferSize(int maxBufferSize)
public boolean isProbabilityScore()
public void setProbabilityScore(boolean probabilityScore)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.