apply function to all the elements of a rowMatrix

2015-02-12 Thread Donbeo
Hi, I need to apply a function to all the elements of a rowMatrix. How can I do that? Here there is a more detailed question http://stackoverflow.com/questions/28438908/spark-mllib-apply-function-to-all-the-elements-of-a-rowmatrix Thanks a lot! -- View this message in context:

spark mllib error when predict on linear regression model

2015-02-12 Thread Donbeo
Hi, I have a model and I am trying to predict regPoints. Here is the code that I have used. A more detailed question is available at http://stackoverflow.com/questions/28482476/spark-mllib-predict-error-with-map scala model res26: org.apache.spark.mllib.regression.LinearRegressionModel =

apply function to all elements of a row matrix

2015-02-11 Thread Donbeo
HI, I have a row matrix x scala x res3: org.apache.spark.mllib.linalg.distributed.RowMatrix = org.apache.spark.mllib.linalg.distributed.RowMatrix@63949747 and I would like to apply a function to each element of this matrix. I was looking for something like: x map (e = exp(-e*e)) How can I do

map distribuited matrix (rowMatrix)

2015-02-10 Thread Donbeo
I have a rowMatrix x and I would like to apply a function to each element of x. I was thinking something likex map(u=exp(-u*u)) . How can I do something like that? -- View this message in context:

sum of columns in rowMatrix and linear regression

2015-02-09 Thread Donbeo
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

generate a random matrix with uniform distribution

2015-02-06 Thread Donbeo
Hi I would like to know how can I generate a random matrix where each element come from a uniform distribution in -1, 1 . In particular I would like the matrix be a distributed row matrix with dimension n x p Is this possible with mllib? Should I use another library? -- View this message