Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Orthogonalize in Python. Which package?

I need to orthogonalize vectors in Python. I have found so far only algorithms.orthogonalize.

Nevertheless, it looks like "algorithms" is a kind of a package (module?) I cannot find to install. Has anybody done an orthogonalization? Please, advice me a nice package/module for this procedure. I am quite new in Python.

like image 319
anastasiiia Avatar asked Apr 01 '26 03:04

anastasiiia


2 Answers

numpy.linalg.qr turns out to be the best option to orthogonalize vectors, since the vectors I consider vectors with complex components. And if one does it with the orthogonalize method mentioned above, then one LOSES the complex parts!

like image 161
anastasiiia Avatar answered Apr 03 '26 18:04

anastasiiia


That package is part of the Spectral Python project.

The orthogonalize method is documented here:

Performs Gram-Schmidt Orthogonalization on a set of vectors

It is installable via pip and easy_install.

like image 44
Martijn Pieters Avatar answered Apr 03 '26 16:04

Martijn Pieters



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!