Hello,

I'm working with the ML package for regression purposes and I get good results on my data. I'm now trying to get multiple metrics at once, as right now, I'm doing what is suggested by the examples here:
https://spark.apache.org/docs/2.1.0/ml-classification-regression.html

Basically the code in the examples is this:

val  evaluator  =  new  RegressionEvaluator()
  .setLabelCol("label")
  .setPredictionCol("prediction")
  .setMetricName("rmse")
val  rmse  =  evaluator.evaluate(predictions)

This gives me the RMSE for my test data which is fine, but I'm also interested in MSE, MAE, MAPE, Rsquare and Qsquare
I thus looked at the documentation here:
https://spark.apache.org/docs/2.1.0/api/java/org/apache/spark/ml/evaluation/RegressionEvaluator.html#metricName%28%29

where I see that I can get RMSE, MSE, MAE and Rsquare but it does not appear that I can get them computed all at once, going over the data rows only once and not 5 times as the example code would suggest it is needed to do so.

How can I achieve that single pass computation?

Then, there are MAPE and Qsquare missing, how can I get those computed as well, ideally while computing the 4 others?

Regards

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscr...@spark.apache.org

Reply via email to