Consider an underdetermined linear system of equations Ax=b
.
I would like to find a set of vectors x_1, ..., x_n
such that they all solve Ax=b
and they are as different between each other as possible.
The second part is actually less important; I would be happy with an algorithm that returns a random solution of Ax=b
every time I call it.
I know that scipy.sparse.linalg.lsqr
and numpy.linalg.lstsq
return a sparse solution (in terms of least squares) of an underdetermined linear system Ax=b
, but I don't care about the properties of the solution; I just want any solution of Ax=b
, as long as I can generate a bunch of different solutions.
In fact, scipy.sparse.linalg.lsqr
and numpy.linalg.lstsq
should follow an iterative process that jumps from a solution to an other until they find a solution that seems to be the minimum in terms of least squares. Well, is there a python module that lets me jump between solutions without a particular objective, and returns them?