Yes, it works! Thanks a lot Burak!
Cheers,
Dan
2015-07-14 14:34 GMT-05:00 Burak Yavuz :
> Hi Dan,
>
> You could zip the indices with the values if you like.
>
> ```
> val sVec = sparseVector(1).asInstanceOf[
> org.apache.spark.mllib.linalg.SparseVector]
> val map = sVec.indices.zip(sVec.values)
Hi Dan,
You could zip the indices with the values if you like.
```
val sVec = sparseVector(1).asInstanceOf[
org.apache.spark.mllib.linalg.SparseVector]
val map = sVec.indices.zip(sVec.values).toMap
```
Best,
Burak
On Tue, Jul 14, 2015 at 12:23 PM, Dan Dong wrote:
> Hi,
> I'm wondering how t