Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / October 2004



Tip: Looking for answers? Try searching our database.

Method of the least squares

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roman - 22 Oct 2004 08:23 GMT
Hi,

I am looking the code for the method of the least squares but non linear.
Does anyone know where can I find it?

Roman
Duane Bozarth - 22 Oct 2004 14:12 GMT
> Hi,
>
> I am looking the code for the method of the least squares but non linear.
> Does anyone know where can I find it?

Does it have to be Basic?  I have no idea for that although I'm sure
somebody will have implemented--oh, wait a minute, I <have> an
implementation of Marquardt's algorithm...it'll take some time to dig it
up but I could possibly post it...

There's a printed implementation in Fortran that wouldn't be too hard to
translate in Data Reduction and Error Analysis for the Physical Sciences
by Philip R Bevington, McGraw-Hill where I first learned it (and many
other useful things many years ago..)

Other than that, www.netlib.org is where I would go...
Duane Bozarth - 22 Oct 2004 14:51 GMT
I looked at that routine...w/ the supporting matrix inversion routine,
etc., it's probably too large to post plus the version I have is so
specific to the particular implementation (it was an online coal
analyzer) I'd have to mung on it a fair amount to make it usable outside
that environment...post back if you do want it w/ a way to forward it to
you and I'll try to make enough changes to at least get it independent.

It, btw, uses a modification of the published algorithm that allows for
a combination of linear least squares estimation for any parameters of
the model that can be separated from the nonlinear ones although it is
still usable w/ no linear terms.  Overall, it's a useful modification
for some problems (we were fitting a gaussian photopeak and a polynomial
background)...
Duane Bozarth - 22 Oct 2004 15:07 GMT
> Hi,
>
> I am looking the code for the method of the least squares but non linear.
> Does anyone know where can I find it?
>
> Roman

http://netlib3.cs.utk.edu/cgi-bin/search.pl?query=gams/K1b%2A

Fortran source, of course, not VB, but <possible> to translate although
I'd recommend making whatever you use into a dll (unless, of course, you
do find something actually written in VB or another library/dll).

One advantage, btw, of Fortran w/VB is that array storage is
column-major in both so processing is in linear order more easily than
w/C which can speed algorithms significantly.
David Youngblood - 22 Oct 2004 16:15 GMT
> I am looking the code for the method of the least squares but non linear.
> Does anyone know where can I find it?

You might try Visual Basic Graphics Programming, Rod Stephens, ISBN
0-471-35599-2.

It has some procedures for Linear, Quadratic and Higher-Order Least Squares as
well as some parametric curve fitting routines, Hermite, Bezier and B-Splines.

David
mscir - 31 Oct 2004 21:03 GMT
> Hi,
>
> I am looking the code for the method of the least squares but non linear.
> Does anyone know where can I find it?
>
> Roman

Did you try Planet Source Code, there are several hits but I don't know
if they'll do the non-linear solving you want (my math doesn't go that far).

http://www.planetsourcecode.com/vb/scripts/BrowseCategoryOrSearchResults.asp?txt
Criteria=least+squares&blnWorldDropDownUsed=TRUE&txtMaxNumberOfEntriesPerPage=10
&blnResetAllVariables=TRUE&lngWId=1&B1=Quick+Search&optSort=Alphabetical

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.