Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Least squares weighted fit using the MKL

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

hareson

Beginner

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

01-04-2011
03:11 AM

168 Views

Least squares weighted fit using the MKL

I have been using MKL for a bit now, and I would like to improve the speed for a weighted linear fit. The fitting function is a simple

y = a * x + b

The input is a vector

The calculation I would like to do is the minimization of the following:

minimize WSS = w_i * ( y_i - ( a * x_i + b ))

One way of doing it would be to create the full vandermonde matrix, and then solve the system using the inverse etc, but is there a better way of doing it?

Also, I am solving it a number of times, where the length of the fit is changing based on the data, so I need to create a new matrix each time.

There are a few threads discussing linear regression, but I can't figure them out exactly.

All help is appreciated.

Best regards

Henrik Andresen

Link Copied

3 Replies

mecej4

Black Belt

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

01-04-2011
04:55 AM

168 Views

If you want to avoid the square roots, you can modify an existing source code for uniform weight QR.

hareson

Beginner

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

01-04-2011
05:00 AM

168 Views

Thank you for your answer.

In case I have weight values close to zero, won't this transformation make my fit unstable?

Best regards

mecej4

Black Belt

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

01-04-2011
07:44 AM

168 Views

Topic Options

- 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.