forum.alglib.net

ALGLIB forum
It is currently Sat Dec 21, 2024 5:06 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: lsfitlinear - fit non linear function via basis function
PostPosted: Mon Sep 07, 2020 1:32 pm 
Offline

Joined: Mon Sep 07, 2020 12:08 pm
Posts: 1
Hello everyone,
I'd like to use the lsfitlinear C++ function to fit a fourth order polynomial on my input data X=(x1,x2) that are in R^2.

I set the y vector to contain the N sample values (expermiental data) and the FMatrix (NxM) to contain the basis function that is the fourth order polynomial of each input sample. So a generic row of FMatrix is: [1, x1, x2, x1^2, x2^2, x1x2, x1^3, x2^3, x1x2^2, x2x1^2, x1^2x2^2, x1^3x2, x2x1^3, x1^4, x2^4].

The lsfitlinear() function returns ok but the coefficient vector contains all 0's.

Could anyone tell me if I'm wrongly setting the problem up?

Thanks!


Top
 Profile  
 
 Post subject: Re: lsfitlinear - fit non linear function via basis function
PostPosted: Mon Oct 05, 2020 9:29 am 
Offline

Joined: Wed May 06, 2020 3:34 pm
Posts: 3
Can you provide a part of your code so that one can see how you're doing it?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group