You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Zhiliang Zhu <zc...@yahoo.com.INVALID> on 2015/10/23 11:19:10 UTC

How to get inverse Matrix / RDD or how to solve linear system of equations

Hi Sujit, and All,
Currently I lost in large difficulty, I am eager to get some help from you.
There is some big linear system of equations as:Ax = b,  A with N number of row and N number of column, N is very large, b = [0, 0, ..., 0, 1]TThen, I will sovle it to get x = [x1, x2, ..., xn]T.
The simple solution would be to get inverse(A), and then  x = (inverse(A)) * b .A would be some JavaRDD<Interable<double>> , however, for RDD/matrix there is add/multply/transpose APIs, no inverse API for it!
Then, how would it conveniently get inverse(A), or just solve the linear system of equations by some other way...In Spark MLlib, there was linear regression, the training process might be to solve the coefficients to get some specific linear model, just is, 
Ax = y, just train by (x, y) to get A , this might be used to solve the linear system of equations. It is like that? I could not decide.
I must show my deep appreciation torwards your all help.
Thank you very much!Zhiliang


How to get inverse Matrix / RDD or how to solve linear system of equations

Posted by Zhiliang Zhu <zc...@yahoo.com.INVALID>.
Hi Sujit, and All,
Currently I lost in large difficulty, I am eager to get some help from you.
There is some big linear system of equations as:Ax = b,  A with N number of row and N number of column, N is very large, b = [0, 0, ..., 0, 1]TThen, I will sovle it to get x = [x1, x2, ..., xn]T.
The simple solution would be to get inverse(A), and then  x = (inverse(A)) * b .A would be some JavaRDD<Interable<double>> , however, for RDD/matrix there is add/multply/transpose APIs, no inverse API for it!
Then, how would it conveniently get inverse(A), or just solve the linear system of equations by some other way...In Spark MLlib, there was linear regression, the training process might be to solve the coefficients to get some specific linear model, just is, 
Ax = y, just train by (x, y) to get A , this might be used to solve the linear system of equations. It is like that? I could not decide.
I must show my deep appreciation torwards your all help.
Thank you very much!Zhiliang