Thank you very much for your suggestions, Ignacio!
  I have posted my solution here:
http://stackoverflow.com/questions/29649904/save-spark-org-apache-spark-mllib-linalg-matrix-to-a-file/29671193#29671193

Best regards,
  Florin

On Wed, Apr 15, 2015 at 5:28 PM, Ignacio Blasco <elnopin...@gmail.com>
wrote:

> You can turn the Matrix to an Array with .toArray and then:
> 1- Write it using Scala/Java IO to the local disk of the driver
> 2- parallelize it and use .saveAsTextFile
>
> 2015-04-15 14:16 GMT+02:00 Spico Florin <spicoflo...@gmail.com>:
>
>> Hello!
>>
>> The result of correlation in Spark MLLib is a of type
>> org.apache.spark.mllib.linalg.Matrix. (see
>> http://spark.apache.org/docs/1.2.1/mllib-statistics.html#correlations)
>>
>>     val data: RDD[Vector] = ...
>>
>>     val correlMatrix: Matrix = Statistics.corr(data, "pearson")
>>
>> I would like to save the result into a file. How can I do this?
>>
>>  Thanks,
>>
>>  Florin
>>
>
>

Reply via email to