Egor Pakhomov created SPARK-3510:
------------------------------------

             Summary: Create method for calculating error between expected 
result and actual
                 Key: SPARK-3510
                 URL: https://issues.apache.org/jira/browse/SPARK-3510
             Project: Spark
          Issue Type: New Feature
          Components: MLlib
            Reporter: Egor Pakhomov
            Priority: Minor


Could not do it right now, because zip operation need same number elements in 
partition, which I can not garantee.
right now using next code: 
{code:title=Bar.scala|borderStyle=solid}
    val expectedRepartitioned = expected.cache().repartition(1) // need for zip 
operation
    val actualRepartitioned = actual.cache().repartition(1)
    new DoubleRDDFunctions(
      expectedRepartitioned
        .zip(actualRepartitioned)
        .map(a => {
        Math.pow(a._1 - a._2, 2)
      })).mean()
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to