heat icon indicating copy to clipboard operation
heat copied to clipboard

Provide a solver for triangular systems

Open mrfh92 opened this issue 2 years ago • 14 comments

Feature functionality Provide a solver for the linear equation $Ax = b$, where $b \in \mathbb{K}^{m \times n}$, $A \in \mathbb{K}^{m \times m}$ are two-dimensional DNDarrays such that $A$ is either upper- or lower-triangular.

Intended scope:

  • different combinations of split for $A$ and $b$
  • of course, scalability of the routine is desired

Additional context

  • Often required in combination with Cholesky decompositon #886
  • also required in context of linear regression (implementing a "QR + triangular solve"-based linear regressor for massive data could be a cool second part of a corresponding student project or PR)

mrfh92 avatar Feb 08 '23 12:02 mrfh92

Hi, mrfh92, I wanted to work on this problem, can you please tell me whether this feature has to be added to /core/linalg/solver.py or with the cholesky matrix in /core/linalg/basics.py.

Gaurav17Joshi avatar Feb 13 '23 15:02 Gaurav17Joshi

I would suggest to put triangular_solve into .../solver.py and to create a new file /core/linalg/cholesky.py for cholesky. If you have questions, feel free to concact me.

mrfh92 avatar Feb 13 '23 17:02 mrfh92

Hi, I have created a new function triangular_solver in .../solver.py. It takes in A and B as inputs and returns the solution x for Ax = B, also, this function raises error flag if the user does not input a triangular matrix or the matrix is not full rank.

lower matrix (No split) lower matrix (Split) upper matrix (No split) upper matrix (split)

Gaurav17Joshi avatar Feb 14 '23 09:02 Gaurav17Joshi

Raising Errors: Not Triangular Not Full rank

Gaurav17Joshi avatar Feb 14 '23 09:02 Gaurav17Joshi

@mrfh92 , can I create a PR so , that my code can be reviewed.

Gaurav17Joshi avatar Feb 14 '23 09:02 Gaurav17Joshi

Of course, please do so Looks great so far 👍

mrfh92 avatar Feb 14 '23 16:02 mrfh92

Stil open and relevant (Reviewed within #1109)

mrfh92 avatar Aug 17 '23 11:08 mrfh92

Some first thoughts on this are found in the #1236

mrfh92 avatar Oct 10 '23 09:10 mrfh92

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Dec 11 '23 02:12 github-actions[bot]

@FOsterfeld works on this within #1236

mrfh92 avatar Jan 15 '24 09:01 mrfh92

Implemented and merged in #1236 by @FOsterfeld

mrfh92 avatar Apr 12 '24 13:04 mrfh92

see #1433 for the error messages

mrfh92 avatar Apr 16 '24 13:04 mrfh92

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Jun 17 '24 02:06 github-actions[bot]

This issue was closed because it has been inactive for 60 days since being marked as stale.

github-actions[bot] avatar Aug 19 '24 02:08 github-actions[bot]

Has been completed actually.

mrfh92 avatar Aug 20 '24 05:08 mrfh92