Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zietzm/pymbend
Bending non-positive-definite matrices to positive-definite
https://github.com/zietzm/pymbend
Last synced: about 2 months ago
JSON representation
Bending non-positive-definite matrices to positive-definite
- Host: GitHub
- URL: https://github.com/zietzm/pymbend
- Owner: zietzm
- License: mit
- Created: 2024-01-11T16:37:03.000Z (almost 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-08T15:39:58.000Z (9 months ago)
- Last Synced: 2024-10-10T01:50:15.961Z (3 months ago)
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# pymbend
## Description
[`mbend`](https://github.com/nilforooshan/mbend) is an "R package for bending non-positive-definite matrices to positive-definite".
This is a simple port of `mbend` to Python, with the goal of improving computation time.Some naive timings are below:
| Matrix size | `mbend` time [s] | `pymbend` time [s] |
| --- | ---: | ---: |
| 100 | 0.89 | 0.85|
| 200 | 13.8 | 4.4 |
| 500 | 1370.6 | 36.7 |These were made on a 2021 Intel MacBook Pro.
In addition, it adds the ability to bend a matrix ($A$) to satisfy a generalized Rayleigh quotient inequality:
$$0 \leq \frac{\beta^\intercal A \beta}{\beta^\intercal B \beta} \leq 1$$## Installation
```console
pip install git+https://github.com/zietzm/pymbend
```## License
`pymbend` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.