I'm working on Spark Mllib on Scala for the first time and I'm having trouble instantiating the BinaryClassificationMetrics class. It gives a Cannot resolve constructor error even though I'm formatting its input as an RDD of Tuples as required. Any ideas what might be going wrong?
def modelEvaluation(model: PipelineModel, test: DataFrame): Unit = {
// Make a prediction on the test set
val predictionAndLabels = model.transform(test)
.select("prediction","label")
.rdd
.map(r => (r(0),r(1)))
/*.collect()
.foreach(r => println(r))*/
// Instantiate metrics object
val metrics = new BinaryClassificationMetrics(predictionAndLabels)
// Precision-Recall Curve
//val PRC = metrics.pr
}