Skip to content

Add Moore-Penrose Inverse #468

@Aweptimum

Description

@Aweptimum

Adding the generalize pseudo-inverse I think is on the docket somewhere (mentioned in #260)

I've actually implemented it in a fork using the SVD method of construction (pretty easy actually).

Here are the changes I think it would introduce, but I wanted to check if I'm not missing something before submitting a pr:

  1. Add pseudoInverse property + adder/haser/getter to MatrixCatalog
  2. Add pseudoInverse method to NumericMatrix
  3. Add pseudoInverse test in MatrixOperationsTest that re-uses the regular inverse dataset + tests non-square matrices

Mainly, I noticed NumericDiagonalMatrix has a special inverse method and was wondering if I should add the following to it:

class NumericDiagonalMatrix
{
    ...
    public function pseudoInverse(): NumericMatrix
    {
        return $this->inverse()
    }
    ...
}

For posterity.

But I'm probably missing other things as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions