title: found: org.apache.spark.sql.Dataset[(Double, Double)] required: org.apache.spark.rdd.RDD[(Double, Double)]
body: <p>I am getting the error below</p>
  
  <pre><code> found   : org.apache.spark.sql.Dataset[(Double, Double)]
   required: org.apache.spark.rdd.RDD[(Double, Double)]
      val testMetrics = new BinaryClassificationMetrics(testScoreAndLabel)
  </code></pre>
  
  <p>On the following code:</p>
  
  <pre><code>val testScoreAndLabel = testResults.
      select("Label","ModelProbability").
      map{ case Row(l:Double,p:Vector) =&gt; (p(1),l) }
  val testMetrics = new BinaryClassificationMetrics(testScoreAndLabel)
  </code></pre>
  
  <p>From the error it seems that <code>testScoreAndLabel</code> is of type <code>sql.Dataset</code> but <code>BinaryClassificationMetrics</code> expects an <code>RDD</code>. </p>
  
  <p>How can I convert a <code>sql.Dataset</code> into an <code>RDD</code>?</p>