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 = (weig

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: http://apach

what is behind matrix multiplications?

2015-02-11 Thread Donbeo
In Spark it is possible to multiply a distribuited matrix x and a local matrix w val x = new RowMatrix(distribuited_data) val w: Matrix = Matrices.dense(local_data) val result = x.multiply(w) . What is the process behind this command? Is the matrix w replicated on each worker? Is there a refe

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 d

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: http://apache-spark-user-list.1001560.n3.nabble.com/map-distribuited-matrix-rowMatrix-tp215

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 s2

spark and breeze random number generator ( ClassNotFoundException)

2015-02-09 Thread Donbeo
Hi, I receive a dependency error when I try to use breeze.stats.distributions.Uniform() in spark. Here there is the full description of my problem http://stackoverflow.com/questions/28414224/spark-and-breeze-random-number-generator-classnotfoundexception I think I have to include somehow the

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 in