public class MultiClassPrecisionRecallStats<L> extends Object implements Scorer<L>
Modifier and Type | Field and Description |
---|---|
protected int[] |
fnCount
Count of false negatives.
|
protected int[] |
fpCount
Count of false positives.
|
protected Index<L> |
labelIndex |
protected int |
negIndex |
protected L |
negLabel |
protected int[] |
tpCount
Count of true positives.
|
Constructor and Description |
---|
MultiClassPrecisionRecallStats(Classifier<L,F> classifier,
GeneralDataset<L,F> data,
L negLabel) |
MultiClassPrecisionRecallStats(L negLabel) |
Modifier and Type | Method and Description |
---|---|
String |
getDescription(int numDigits)
Returns a String summarizing F1 that will print nicely.
|
String |
getF1Description(int numDigits)
Returns a String summarizing F1 that will print nicely.
|
String |
getF1Description(int numDigits,
L label) |
double |
getFMeasure() |
double |
getFMeasure(L label) |
L |
getNegLabel() |
double |
getPrecision() |
double |
getPrecision(L label) |
String |
getPrecisionDescription(int numDigits)
Returns a String summarizing precision that will print nicely.
|
String |
getPrecisionDescription(int numDigits,
L label) |
Triple<Double,Integer,Integer> |
getPrecisionInfo() |
Triple<Double,Integer,Integer> |
getPrecisionInfo(L label)
Returns the current precision: tp/(tp+fp).
|
double |
getRecall() |
double |
getRecall(L label) |
String |
getRecallDescription(int numDigits)
Returns a String summarizing precision that will print nicely.
|
String |
getRecallDescription(int numDigits,
L label) |
Triple<Double,Integer,Integer> |
getRecallInfo() |
Triple<Double,Integer,Integer> |
getRecallInfo(L label) |
<F> double |
score(Classifier<L,F> classifier,
GeneralDataset<L,F> data) |
<F> double |
score(ProbabilisticClassifier<L,F> classifier,
GeneralDataset<L,F> data) |
protected int[] tpCount
protected int[] fpCount
protected int[] fnCount
protected L negLabel
protected int negIndex
public MultiClassPrecisionRecallStats(Classifier<L,F> classifier, GeneralDataset<L,F> data, L negLabel)
public MultiClassPrecisionRecallStats(L negLabel)
public L getNegLabel()
public <F> double score(ProbabilisticClassifier<L,F> classifier, GeneralDataset<L,F> data)
public <F> double score(Classifier<L,F> classifier, GeneralDataset<L,F> data)
public Triple<Double,Integer,Integer> getPrecisionInfo(L label)
public double getPrecision(L label)
public double getPrecision()
public String getPrecisionDescription(int numDigits)
public double getRecall(L label)
public double getRecall()
public String getRecallDescription(int numDigits)
public double getFMeasure(L label)
public double getFMeasure()
public String getF1Description(int numDigits)
public String getDescription(int numDigits)
getDescription
in interface Scorer<L>