Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- How to solve least squares problem? For dummies.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Mikhail_Matrosov

Novice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-15-2011
03:42 AM

89 Views

How to solve least squares problem? For dummies.

I'm trying to solve least squares problem. Given matrix A(mxn), m > n, minimize (Ax - b)

However, its a little complicated and I found no straightforward explanation on how to compute result x from given A and b. For now I don't even sure how to acquire matrix R. Should I manually multiply A with Q

I think it'd be pretty convenient to provide manual with simple code example of function

SolveLSP(int m, int n, float* A, float* b, float* x);

using LAPACKE_sgeqrf(), LAPACKE_sorgqr() etc. calls, which is exactly my problem. One may assume matrix_order to be LAPACK_ROW_MAJOR.

E.g. ippmQRDecomp reference is great. Even with picture and enough explanation on storage, though one should not be concerned of it granted with simple ippmQRBackSubst function.

Would you please grant me with such example or with some simple explanation of what functions should I call in what order?

Thanks a lot.

1 Solution

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-15-2011
06:24 AM

89 Views

Link Copied

2 Replies

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-15-2011
06:24 AM

90 Views

Mikhail_Matrosov

Novice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-15-2011
06:41 AM

89 Views

This is the best answer I didn't even dare to hear :)

Thanks!

Thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.