Do you not just want to use linear regression?

Of course it requires a DataFrame-like input but that may be more natural to begin with.

If the data set is small, then putting it on the driver and solving locally with a library is pretty easy.

The Cholesky decomposition above doesn't solve the linear system itself, but helps solve AtAx = Atb, because AtA and Atb are small and so that part can be done locally.

On Thu, Oct 6, 2016 at 6:49 AM Cooper <> wrote:
I have a system of linear equations in the form of Ax = b to solve in Spark.

A is n by n

b is n by 1

I represent 'A' in the form of IndexedRowMatrix or RowMatrix and 'b' in the
form of DenseMatrix or DenseVector.

How can I solve this system to calculate the 'x' vector?

If the suggested solution isĀ  Cholesky Decomposition
, would you please guide me through doing it as it is not part of the public
API ? For example if the original matrix A is:


and b is:


What is passed as argument to the "solve" method ?

Any other solution other than inversing 'A' would be very helpful.

View this message in context:
Sent from the Apache Spark User List mailing list archive at

To unsubscribe e-mail: