qndiag | Quasi-Newton algorithm for joint-diagonalization | Math library

 by   pierreablin Python Version: 0.1 License: MIT

kandi X-RAY | qndiag Summary

kandi X-RAY | qndiag Summary

qndiag is a Python library typically used in Utilities, Math applications. qndiag has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install qndiag' or download it from GitHub, PyPI.

This Python package contains code for fast joint-diagonalization of a set of positive definite symmetric matrices. The main function is qndiag, which takes as input a set of matrices of size (p, p), stored as a (n, p, p) array, C. It outputs a (p, p) array, B, such that the matrices B @ C[i] @ B.T (python), i.e. B * C(i,:,:) * B' (matlab/octave) are as diagonal as possible.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              qndiag has a low active ecosystem.
              It has 16 star(s) with 5 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 1 have been closed. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of qndiag is 0.1

            kandi-Quality Quality

              qndiag has no bugs reported.

            kandi-Security Security

              qndiag has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              qndiag is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              qndiag releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed qndiag and discovered the below as its top functions. This is intended to give you an instant insight into qndiag implemented functionality, and help decide if they suit your requirements.
            • R Solve quadrature decomposition
            • Transform a set of matrices into a matrix
            • Performs line search
            • Computes the loss of a diagonal matrix
            • Transform a matrix into a matrix
            • Calculates the loss function of a diagonal matrix
            • Compute the gradient of a matrix
            Get all kandi verified functions for this library.

            qndiag Key Features

            No Key Features are available at this moment for qndiag.

            qndiag Examples and Code Snippets

            No Code Snippets are available at this moment for qndiag.

            Community Discussions

            QUESTION

            Unable to perform assignment because the size of the left side is 1-by-7-by-7 and the size of the right side is 6-by-6
            Asked 2021-Jan-27 at 21:18

            I am looking for a way to find same eigenvectors for 2 given matrices, this way I would make a joint diagonalisation. For this, I found out and tried to use qndiag (from https://github.com/pierreablin/qndiag.git ) from the following function :

            ...

            ANSWER

            Answered 2021-Jan-27 at 21:18

            From the documentation for eigs:

            d = eigs(A) returns a vector of the six largest magnitude eigenvalues of matrix A.

            If you want all seven, you need to call d = eigs(A,7) or d = eig(A). For a small matrix (e.g. < 1000 x 1000) it's usually easier to just get all the eigenvalues with eig, rather than get a subset with eigs.

            Edit: Responding to your "Update 3"

            for k=1:length(D) should be replaced by for k=1:n. This needs to be changed on two lines. Judging from your error message they are lines 231 and 236.

            L = length(X) returns the length of the largest array dimension in X, which in your case is 7, i.e. too high for the first dimension.

            Source https://stackoverflow.com/questions/65907134

            QUESTION

            AttributeError: 'str' object has no attribute 'dot'
            Asked 2021-Jan-26 at 22:55

            I am using the qndiag library to try to find a diagonalisation for 2 given matrices.

            The github is here : qndiag libray

            I am using this Python script to compute these 2 diagonalisation as closed as possible :

            ...

            ANSWER

            Answered 2021-Jan-26 at 01:54

            The issue lies in [D, B] = qndiag(C, 'max_iter', 1000, 'tol', 1e-3), B0 (which is the second param) gets assigned as a string not as an array! Then eventually B would be a string and hence the error message str object has no attribute 'dot' !, if you are only passing C matrix as parameter, just do [D, B] = qndiag(C).

            Source https://stackoverflow.com/questions/65876513

            QUESTION

            AttributeError: 'dict' object has no attribute 'T' (T for transposition)
            Asked 2021-Jan-26 at 22:55

            I am using the qndiag library to try to find a diagonalisation for 2 given matrices.

            The github is here : qndiag libray

            The function qndiag is defined like this (not entirely source) :

            ...

            ANSWER

            Answered 2021-Jan-25 at 00:11

            As stated in the toy example you should be able to run your code if you would change this line

            Source https://stackoverflow.com/questions/65877295

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install qndiag

            To install the package, simply do:.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install qndiag

          • CLONE
          • HTTPS

            https://github.com/pierreablin/qndiag.git

          • CLI

            gh repo clone pierreablin/qndiag

          • sshUrl

            git@github.com:pierreablin/qndiag.git

          • Download

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Math Libraries

            KaTeX

            by KaTeX

            mathjs

            by josdejong

            synapse

            by matrix-org

            gonum

            by gonum

            bignumber.js

            by MikeMcl

            Try Top Libraries by pierreablin

            autoptim

            by pierreablinPython

            picard

            by pierreablinPython

            faster-ica

            by pierreablinPython

            tlnmf

            by pierreablinPython

            python-sessions

            by pierreablinJupyter Notebook