Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Feature Request] QR Matrix Decomposition using Gram-Schmidt

Closed
#317 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
fsharp
Domain
tooling

Research direction

Start by locating the existing Householder-based QR decomposition entry point in the FSharp.Stats repository and reviewing its API and tests, since no specific files are named. Determine how an option for Gram-Schmidt should expose the differing Q and R dimensions, then add coverage demonstrating both methods and their expected matrix shapes.

Written by the indexing model from the issue text.

Description

enhancement

Introduce an option to utilize the Gram-Schmidt process for QR matrix decomposition alongside the existing Householder transformation method. This would allow users to choose the decomposition method based on their specific requirements, providing flexibility and potentially improving the overall usability of the library.

The Gram-Schmidt process and the Householder transformation are both methods used for QR matrix decomposition, but they differ in their computational approach and resulting matrix dimensions:

  1. Gram-Schmidt Process:

    • Input: An $( m \times n $) matrix, where $m$ is the number of rows and $n$ is the number of columns.
    • Output: Two matrices $Q$ and $R$, where $Q$ is an $m \times n$ orthogonal matrix (i.e., $Q^TQ = I$) and $R$ is an $n \times n$ upper triangular matrix.
  2. Householder Transformation:

    • Input: An $m \times n$ matrix, where $m$ is the number of rows and $n$ is the number of columns.
    • Output: Two matrices $Q$ and $R$, where $Q$ is an $m \times m$ orthogonal matrix (i.e., $Q^TQ = I$) and $R$ is an $m \times n$ upper triangular matrix.

In summary, the main difference lies in the dimensions of the orthogonal matrix $Q$: Gram-Schmidt produces an $m \times n$ orthogonal matrix, while the Householder transformation yields an $m \times m$ orthogonal matrix.

Dominant language
F#
Stars
228
Forks
58
Avg merge
2d 7h
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fslaborg/FSharp.Stats

All issues in fslaborg/FSharp.Stats

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.