Re: BinaryClassificationMetrics only supports AreaUnderPR and AreaUnderROC?

2017-05-12 Thread Yanbo Liang
Yeah, for binary data, you can also use MulticlassClassificationEvaluator
to evaluate other metrics which BinaryClassificationEvaluator doesn't
cover, such as accuracy, f1, weightedPrecision and weightedRecall.

Thanks
Yanbo

On Thu, May 11, 2017 at 10:31 PM, Lan Jiang  wrote:

> I realized that in the Spark ML, BinaryClassifcationMetrics only supports
> AreaUnderPR and AreaUnderROC. Why is that? I
>
> What if I need other metrics such as F-score, accuracy? I tried to use
> MulticlassClassificationEvaluator to evaluate other metrics such as
> Accuracy for a binary classification problem and it seems working. But I am
> not sure if there is any issue using MulticlassClassificationEvaluator
> for a binary classification. According to the Spark ML documentation "The
> Evaluator can be a RegressionEvaluator for regression problems, *a
> BinaryClassificationEvaluator for binary data, or a
> MulticlassClassificationEvaluator for multiclass problems*. "
>
> https://spark.apache.org/docs/2.1.0/ml-tuning.html
>
> Can someone shed some lights on the issue?
>
> Lan
>


BinaryClassificationMetrics only supports AreaUnderPR and AreaUnderROC?

2017-05-11 Thread Lan Jiang
I realized that in the Spark ML, BinaryClassifcationMetrics only supports
AreaUnderPR and AreaUnderROC. Why is that? I

What if I need other metrics such as F-score, accuracy? I tried to use
MulticlassClassificationEvaluator to evaluate other metrics such as
Accuracy for a binary classification problem and it seems working. But I am
not sure if there is any issue using MulticlassClassificationEvaluator for
a binary classification. According to the Spark ML documentation "The
Evaluator can be a RegressionEvaluator for regression problems, *a
BinaryClassificationEvaluator for binary data, or a
MulticlassClassificationEvaluator for multiclass problems*. "

https://spark.apache.org/docs/2.1.0/ml-tuning.html

Can someone shed some lights on the issue?

Lan