0

I used numpy.linalg.eig() to obtain eigen values for a covariance matrix.

The eigen values returned are complex numbers.

Now I have found the answer about how to sort these eigen values, but I want to know how to sort them when the values are complex numbers?

Basically, what is the method to sort them?

Are they sorted solely by their real part? Are they first sorted by real part and then again sorted by the imaginary part?

Is their a standard way of ordering complex nos.?

Community
  • 1
  • 1
Nancy
  • 315
  • 1
  • 5
  • 16
  • 2
    It will depend on your objective. In some applications, I've seen them ordered into the group of pure imaginary, positive real and negative real. In this case, you may want to single out the eigenvalue with biggest absolute value. – Marcelo Bielsa Dec 04 '15 at 06:09
  • 1
    This isn't really a programming question, more of a philosophical one. How would one sort colours or aromas? There is no convention for any of these things. – Miner_Glitch Dec 04 '15 at 06:11
  • What @Miner_Glitch is saying is that the complex plane has no natural linear ordering. As Marcelo points out, you can just choose to "order" them by their magnitude, but it's meaningless. – Scott Dec 04 '15 at 06:22
  • @Miner_Glitch I very well understand its not a programming question. I added the python tag just to point out that I had used one of python's function to obtain the values. – Nancy Dec 04 '15 at 06:39
  • @MarceloBielsa Really needed to know just this much : There is no natural linear ordering for complex numbers. Got my doubt confirmed from your comment. – Nancy Dec 04 '15 at 06:42
  • @Scott Really needed to know just this much : There is no natural linear ordering for complex numbers. Got my doubt confirmed from your comment. – Nancy Dec 04 '15 at 06:43

0 Answers0