Hello All,

I'm working through the Data Science with Scala course on Big Data University and it is not updated to work with Spark 2.0, so I'm adapting the code as I work through it, however I've finally run into something that is over my head. I'm new to Scala as well.

When I run this code (https://gist.github.com/jmwoloso/a715cc4d7f1e7cc7951fab4edf6218b1) I get the following error:

`java.lang.ClassCastException: org.apache.spark.ml.linalg.DenseVector cannot be cast to org.apache.spark.mllib.linalg.Vector`

I believe this is occurring at line 107 of the gist above. The code starting at this line (and continuing to the end of the gist) is the current code in the course.

If I try to map to any other class type, then I have problems with the `Statistics.corr(rddVec)`.

How can I convert `rddVec` from an `ml.linalg.DenseVector` into an `mllib.linalg.Vector` for use with `Statistics`?

Thanks!

-Jason

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscr...@spark.apache.org

Reply via email to