new MulticlassMetrics(predictionAndLabels)
::Experimental::
Evaluator for multiclass classification.
Parameters:
Name | Type | Description |
---|---|---|
predictionAndLabels |
module:eclairjs.RDD | an RDD of (prediction, label) pairs. |
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"
Returns:
falsePositiveRate(label) → {float}
Returns false positive rate for a given label (category)
Parameters:
Name | Type | Description |
---|---|---|
label |
float | the label. |
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> |
Returns:
- Type
- float
labels() → {Array.<float>}
Returns the sequence of labels in ascending order
Returns:
- Type
- Array.<float>
precision(labelopt) → {float}
Returns precision
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
label |
float |
<optional> |
Returns precision for a given label (category) |
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) |
Returns:
- Type
- float
truePositiveRate(label) → {float}
Returns true positive rate for a given label (category)
Parameters:
Name | Type | Description |
---|---|---|
label |
float | the label. |
Returns:
- Type
- float
weightedFalsePositiveRate() → {float}
Returns weighted false positive rate
Returns:
- Type
- float
weightedFMeasure(betaopt) → {number}
Returns weighted averaged f-measure
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
beta |
number |
<optional> |
the beta parameter. |
Returns:
- Type
- number
weightedPrecision() → {float}
Returns weighted averaged precision
Returns:
- Type
- float
weightedRecall() → {float}
Returns weighted averaged recall (equals to precision, recall and f-measure)
Returns:
- Type
- float
weightedTruePositiveRate() → {float}
Returns weighted true positive rate (equals to precision, recall and f-measure)
Returns:
- Type
- float