I have a matrix X of type: 
res39: org.apache.spark.mllib.linalg.distributed.RowMatrix =
org.apache.spark.mllib.linalg.distributed.RowMatrix@6cfff1d3
with n rows and p columns

I would like to obtain an array S of size n*1 defined as the sum of the
columns of X. 

S will then be replaced by 
val s2 = s map (x=> sin(x)/x) 

Finally I would like to fit a linear regression between X and s2.   How can
I do that?

Thanks a lot!



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/sum-of-columns-in-rowMatrix-and-linear-regression-tp21563.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

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

Reply via email to