spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhengruifeng <>
Subject [GitHub] spark pull request: [SPARK-14340][DOC] Add Scala Example and User ...
Date Sat, 07 May 2016 01:05:10 GMT
Github user zhengruifeng commented on the pull request:
    @MLnick @sethah @yanboliang 
    There is something wrong:
    val dataset ="libsvm").load("data/mllib/sample_libsvm_data.txt")
    val kmeans = new KMeans().setK(2).setFeaturesCol("features")
    val model =
    val WSSSE = model.computeCost(dataset)
    The WSSSE is always `0`, and the `model.clusterCenters` only contains empty zero-length
vectors `Array[org.apache.spark.mllib.linalg.Vector] = Array([], [])`.
    and if I run `"features").show`, it fails
    java.lang.RuntimeException: Error while decoding: scala.MatchError: 31 (of class java.lang.Byte)
    createexternalrow(if (isnull(input[0, vector])) null else newInstance(class org.apache.spark.mllib.linalg.VectorUDT).deserialize,
    +- if (isnull(input[0, vector])) null else newInstance(class org.apache.spark.mllib.linalg.VectorUDT).deserialize
       :- isnull(input[0, vector])
       :  +- input[0, vector]
       :- null
       +- newInstance(class org.apache.spark.mllib.linalg.VectorUDT).deserialize
          :- newInstance(class org.apache.spark.mllib.linalg.VectorUDT)
          +- input[0, vector]

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message