Spark.
precision_1 = metrics.precision val accuracy_1 = metrics.accuracy val recall_1 = metrics.recall println(“Precision = “ + precision_1,”Accuracy = “ + accuracy_1,”Recall = “ + recall_1) Precision and Recall with different threshold values val metrics2 = new BinaryClassificationMetrics(predictions) //