Class: MulticlassMetrics

eclairjs/mllib/evaluation. MulticlassMetrics

new MulticlassMetrics(predictionAndLabels)

::Experimental:: Evaluator for multiclass classification.
Parameters:
Name Type Description
predictionAndLabels module:eclairjs.RDD an RDD of (prediction, label) pairs.
Source:

Methods

confusionMatrix() → {module:eclairjs/mllib/linalg.Matrix}

Returns confusion matrix: predicted classes are in columns, they are ordered by class label ascending, as in "labels"
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Matrix

falsePositiveRate(label) → {float}

Returns false positive rate for a given label (category)
Parameters:
Name Type Description
label float the label.
Source:
Returns:
Type
float

fMeasure(labelopt, betaopt) → {float}

Returns f-measure (equals to precision and recall because precision equals recall)
Parameters:
Name Type Attributes Description
label float <optional>
Returns f1-measure for a given label (category)
beta float <optional>
Source:
Returns:
Type
float

labels() → {Array.<float>}

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

precision(labelopt) → {float}

Returns precision
Parameters:
Name Type Attributes Description
label float <optional>
Returns precision for a given label (category)
Source:
Returns:
Type
float

recall(labelopt) → {float}

Returns recall (equals to precision for multiclass classifier because sum of all false positives is equal to sum of all false negatives)
Parameters:
Name Type Attributes Description
label float <optional>
Returns recall for a given label (category)
Source:
Returns:
Type
float

truePositiveRate(label) → {float}

Returns true positive rate for a given label (category)
Parameters:
Name Type Description
label float the label.
Source:
Returns:
Type
float

weightedFalsePositiveRate() → {float}

Returns weighted false positive rate
Source:
Returns:
Type
float

weightedFMeasure(betaopt) → {number}

Returns weighted averaged f-measure
Parameters:
Name Type Attributes Description
beta number <optional>
the beta parameter.
Source:
Returns:
Type
number

weightedPrecision() → {float}

Returns weighted averaged precision
Source:
Returns:
Type
float

weightedRecall() → {float}

Returns weighted averaged recall (equals to precision, recall and f-measure)
Source:
Returns:
Type
float

weightedTruePositiveRate() → {float}

Returns weighted true positive rate (equals to precision, recall and f-measure)
Source:
Returns:
Type
float