public class MultilabelMetrics
extends java.lang.Object
Constructor and Description |
---|
MultilabelMetrics(RDD<scala.Tuple2<double[],double[]>> predictionAndLabels) |
Modifier and Type | Method and Description |
---|---|
double |
accuracy()
Returns accuracy
|
double |
f1Measure()
Returns document-based f1-measure averaged by the number of documents
|
double |
f1Measure(double label)
Returns f1-measure for a given label (category)
|
double |
hammingLoss()
Returns Hamming-loss
|
double[] |
labels()
Returns the sequence of labels in ascending order
|
double |
microF1Measure()
Returns micro-averaged label-based f1-measure
(equals to micro-averaged document-based f1-measure)
|
double |
microPrecision()
Returns micro-averaged label-based precision
(equals to micro-averaged document-based precision)
|
double |
microRecall()
Returns micro-averaged label-based recall
(equals to micro-averaged document-based recall)
|
double |
precision()
Returns document-based precision averaged by the number of documents
|
double |
precision(double label)
Returns precision for a given label (category)
|
double |
recall()
Returns document-based recall averaged by the number of documents
|
double |
recall(double label)
Returns recall for a given label (category)
|
double |
subsetAccuracy()
Returns subset accuracy
(for equal sets of labels)
|
public MultilabelMetrics(RDD<scala.Tuple2<double[],double[]>> predictionAndLabels)
public double subsetAccuracy()
public double accuracy()
public double hammingLoss()
public double precision()
public double recall()
public double f1Measure()
public double precision(double label)
label
- the label.public double recall(double label)
label
- the label.public double f1Measure(double label)
label
- the label.public double microPrecision()
public double microRecall()
public double microF1Measure()
public double[] labels()