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:
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 =
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
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:
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
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