spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 陈哲 <czhenj...@gmail.com>
Subject MulticlassClassificationEvaluator use
Date Thu, 11 Aug 2016 04:00:04 GMT
Hi All
       I'm testing on spark2.0 Random forest example code. Here is the part
about accuracy:
    MulticlassClassificationEvaluator evaluator = new
MulticlassClassificationEvaluator()
      .setLabelCol("indexedLabel")
      .setPredictionCol("prediction")
      .setMetricName("accuracy");
    double accuracy = evaluator.evaluate(predictions);

I'm reading the spark doc, find out that accuracy =
   ACC=TP / TP + FP
https://spark.apache.org/docs/latest/mllib-evaluation-metrics.html

My question is how can I can the TN , FN  results ? I look up the api ,
didn't find anything useful.


Thanks
Best Regards

Mime
View raw message