You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Egor Pakhomov (JIRA)" <ji...@apache.org> on 2014/09/12 16:03:33 UTC

[jira] [Created] (SPARK-3510) Create method for calculating error between expected result and actual

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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org