You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by ll <du...@gmail.com> on 2014/10/14 22:18:32 UTC

mllib CoordinateMatrix

after creating a coordinate matrix from my rdd[matrixentry]... 

1.  how can i get/query the value at coordiate (i, j)?

2.  how can i set/update the value at coordiate (i, j)?

3.  how can i get all the values on a specific row i, ideally as a vector?

thanks!




--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/mllib-CoordinateMatrix-tp16412.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Re: mllib CoordinateMatrix

Posted by Duy Huynh <du...@gmail.com>.
thanks reza!

On Tue, Oct 14, 2014 at 5:02 PM, Reza Zadeh <re...@databricks.com> wrote:

> Hello,
>
> CoordinateMatrix is in its infancy, and right now is only a placeholder.
>
> To get/set the value at (i,j), you should map the entries rdd using the
> usual rdd map operation, and change the relevant entries.
>
> To get the values on a specific row, you can call toIndexedRowMatrix(),
> which returns a RowMatrix
> <https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/IndexedRowMatrix.scala>
> with indices.
>
> Best,
> Reza
>
>
> On Tue, Oct 14, 2014 at 1:18 PM, ll <du...@gmail.com> wrote:
>
>> after creating a coordinate matrix from my rdd[matrixentry]...
>>
>> 1.  how can i get/query the value at coordiate (i, j)?
>>
>> 2.  how can i set/update the value at coordiate (i, j)?
>>
>> 3.  how can i get all the values on a specific row i, ideally as a vector?
>>
>> thanks!
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-spark-user-list.1001560.n3.nabble.com/mllib-CoordinateMatrix-tp16412.html
>> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
>> For additional commands, e-mail: user-help@spark.apache.org
>>
>>
>

Re: mllib CoordinateMatrix

Posted by Reza Zadeh <re...@databricks.com>.
Hello,

CoordinateMatrix is in its infancy, and right now is only a placeholder.

To get/set the value at (i,j), you should map the entries rdd using the
usual rdd map operation, and change the relevant entries.

To get the values on a specific row, you can call toIndexedRowMatrix(),
which returns a RowMatrix
<https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/IndexedRowMatrix.scala>
with indices.

Best,
Reza


On Tue, Oct 14, 2014 at 1:18 PM, ll <du...@gmail.com> wrote:

> after creating a coordinate matrix from my rdd[matrixentry]...
>
> 1.  how can i get/query the value at coordiate (i, j)?
>
> 2.  how can i set/update the value at coordiate (i, j)?
>
> 3.  how can i get all the values on a specific row i, ideally as a vector?
>
> thanks!
>
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/mllib-CoordinateMatrix-tp16412.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>
>