|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.apache.spark.mllib.evaluation.MultilabelMetrics
public class MultilabelMetrics
Evaluator for multilabel classification. param: predictionAndLabels an RDD of (predictions, labels) pairs, both are non-null Arrays, each with unique elements.
Constructor Summary | |
---|---|
MultilabelMetrics(RDD<scala.Tuple2<double[],double[]>> predictionAndLabels)
|
Method Summary | |
---|---|
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) |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultilabelMetrics(RDD<scala.Tuple2<double[],double[]>> predictionAndLabels)
Method Detail |
---|
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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |