### Author Topic: Challenge: Cholesky decomposition  (Read 14076 times)

0 Members and 1 Guest are viewing this topic.

#### pkohut

• Guest
##### Re: Challenge: Cholesky decomposition
« Reply #15 on: March 11, 2010, 12:55:03 PM »
Very strange, the topic is not popular ...

This challenge went beyond what I know, and the code from the links Swift provided is highly optimized.  So it's watch and learn time

#### T.Willey

• Needs a day job
• Posts: 5251
##### Re: Challenge: Cholesky decomposition
« Reply #16 on: March 11, 2010, 12:57:41 PM »
Very strange, the topic is not popular ...

This challenge went beyond what I know, and the code from the links Swift provided is highly optimized.  So it's watch and learn time
x2
Tim

I don't want to ' end-up ', I want to ' become '. - Me

#### ElpanovEvgeniy

• Water Moccasin
• Posts: 1569
• Moscow (Russia)
##### Re: Challenge: Cholesky decomposition
« Reply #17 on: March 11, 2010, 01:00:06 PM »
This code can be useful if you use the method of least squares
http://en.wikipedia.org/wiki/Least_squares

#### ElpanovEvgeniy

• Water Moccasin
• Posts: 1569
• Moscow (Russia)
##### Re: Challenge: Cholesky decomposition
« Reply #18 on: March 11, 2010, 01:01:47 PM »
Very strange, the topic is not popular ...

This challenge went beyond what I know, and the code from the links Swift provided is highly optimized.  So it's watch and learn time
x2

I was too early to show my version?

#### T.Willey

• Needs a day job
• Posts: 5251
##### Re: Challenge: Cholesky decomposition
« Reply #19 on: March 11, 2010, 01:17:31 PM »
Very strange, the topic is not popular ...

This challenge went beyond what I know, and the code from the links Swift provided is highly optimized.  So it's watch and learn time
x2

I was too early to show my version?

Not for me, as I don't really have time to study matrix math right now.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

#### Swift

• Swamp Rat
• Posts: 596
##### Re: Challenge: Cholesky decomposition
« Reply #20 on: March 11, 2010, 01:39:06 PM »
This code can be useful if you use the method of least squares
http://en.wikipedia.org/wiki/Least_squares

Depending on your purpose you may want to look at LU Decomposition. Cornbread and I did a lot of work with this several years ago for some least squares coordinate transformations and I am wanting to think that is was easier to calculate the inverse of a square matrix with LU Decomposition.

#### Lee Mac

• Seagull
• Posts: 12943
• London, England
##### Re: Challenge: Cholesky decomposition
« Reply #21 on: March 11, 2010, 01:46:08 PM »
This code can be useful if you use the method of least squares
http://en.wikipedia.org/wiki/Least_squares

Depending on your purpose you may want to look at LU Decomposition. Cornbread and I did a lot of work with this several years ago for some least squares coordinate transformations and I am wanting to think that is was easier to calculate the inverse of a square matrix with LU Decomposition.

That's the method I used     But, according to Evgeniy's link, the Cholesky algorithm is meant to be much more efficient than LU decomposition...

#### Swift

• Swamp Rat
• Posts: 596
##### Re: Challenge: Cholesky decomposition
« Reply #22 on: March 11, 2010, 01:56:01 PM »
That's the method I used     But, according to Evgeniy's link, the Cholesky algorithm is meant to be much more efficient than LU decomposition...

Go back and look at the Wiki page
Quote
Cholesky decomposition or Cholesky triangle is a decomposition of a symmetric, positive-definite matrix into the product of a lower triangular matrix and its conjugate transpose

For the types of least squares solutions I work, you almost never have a symmetrical matrix where A = A^T

LU Decomposition doesn't have this limitation.

#### ElpanovEvgeniy

• Water Moccasin
• Posts: 1569
• Moscow (Russia)
##### Re: Challenge: Cholesky decomposition
« Reply #23 on: March 11, 2010, 01:56:24 PM »
Depending on your purpose you may want to look at LU Decomposition. Cornbread and I did a lot of work with this several years ago for some least squares coordinate transformations and I am wanting to think that is was easier to calculate the inverse of a square matrix with LU Decomposition.

I am well acquainted with the LU Decomposition.

#### Swift

• Swamp Rat
• Posts: 596
##### Re: Challenge: Cholesky decomposition
« Reply #24 on: March 11, 2010, 02:00:59 PM »
Very strange, the topic is not popular ...

This challenge went beyond what I know, and the code from the links Swift provided is highly optimized.  So it's watch and learn time

The Numerical Recipes book is a great book, full of lots of information, but be sure to read the copyrights before you buy it or the source code. Where as the TNT is published by the National Institute of Standards and Technology and is government funded and "public domain" as I understand it.

#### ElpanovEvgeniy

• Water Moccasin
• Posts: 1569
• Moscow (Russia)
##### Re: Challenge: Cholesky decomposition
« Reply #25 on: March 11, 2010, 02:11:29 PM »
For the types of least squares solutions I work, you almost never have a symmetrical matrix where A = A^T

Such matrices often arise when using the method of least squares

LU Decomposition doesn't have this limitation.

I agree with you, but it is more convenient to have two tools, but not one ...

#### Swift

• Swamp Rat
• Posts: 596
##### Re: Challenge: Cholesky decomposition
« Reply #26 on: March 11, 2010, 02:14:21 PM »
Depending on your purpose you may want to look at LU Decomposition. Cornbread and I did a lot of work with this several years ago for some least squares coordinate transformations and I am wanting to think that is was easier to calculate the inverse of a square matrix with LU Decomposition.

I am well acquainted with the LU Decomposition.

So it seems you are. I just made that comment to perhaps save you time. I spent a lot of time chasing my tail trying to develop a matrix inversion routine before I found the LU Decomposition.

Agreed on having two tools.

#### LE3

• Guest
##### Re: Challenge: Cholesky decomposition
« Reply #27 on: March 11, 2010, 02:49:40 PM »
from a non math persona...
and nothing to offer, but I have implemented the Gaussian elimination at least for two of my apps, inside of gbpoly to do the pivoting onto the recognition of closed circuits and the obb extraction both in C++.

and must say that do not recall hearing the cholesky named from my school days.... but remember something about 'factorizacion' (factorization) but that's all.
« Last Edit: March 11, 2010, 02:54:10 PM by LE3 »