Class: MultilabelMetrics

eclairjs/mllib/evaluation. MultilabelMetrics

new MultilabelMetrics(predictionAndLabels, predictionAndLabels)

Evaluator for multilabel classification.
Parameters:
Name Type Description
predictionAndLabels an RDD of (predictions, labels) pairs, both are non-null Arrays, each with unique elements.
predictionAndLabels module:eclairjs.RDD
Source:

Methods

accuracy() → {float}

Returns accuracy
Source:
Returns:
Type
float

f1Measure(labelopt) → {float}

Returns document-based f1-measure averaged by the number of documents
Parameters:
Name Type Attributes Description
label float <optional>
Returns f1-measure for a given label (category)
Source:
Returns:
Type
float

hammingLoss() → {float}

Returns Hamming-loss
Source:
Returns:
Type
float

labels() → {Array.<float>}

Returns the sequence of labels in ascending order
Source:
Returns:
Type
Array.<float>

microF1Measure() → {float}

Returns micro-averaged label-based f1-measure (equals to micro-averaged document-based f1-measure)
Source:
Returns:
Type
float

microPrecision() → {float}

Returns micro-averaged label-based precision (equals to micro-averaged document-based precision)
Source:
Returns:
Type
float

microRecall() → {float}

Returns micro-averaged label-based recall (equals to micro-averaged document-based recall)
Source:
Returns:
Type
float

precision(labelopt) → {float}

Returns document-based precision averaged by the number of documents
Parameters:
Name Type Attributes Description
label float <optional>
Returns precision for a given label (category)
Source:
Returns:
Type
float

recall(labelopt) → {float}

Returns document-based recall averaged by the number of documents
Parameters:
Name Type Attributes Description
label float <optional>
Returns recall for a given label (category)
Source:
Returns:
Type
float

subsetAccuracy() → {float}

Returns subset accuracy (for equal sets of labels)
Source:
Returns:
Type
float