Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: NonlinearModelFit Problem
Replies: 3   Last Post: Jan 18, 2013 12:50 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ray Koopman

Posts: 3,382
Registered: 12/7/04
Re: NonlinearModelFit Problem
Posted: Jan 18, 2013 12:50 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Jan 16, 8:15 pm, Frank K <fkam...@gmail.com> wrote:
> I suggest you use FindMinimum and minimize the sum of the
> square of the distances of your points from the spherical
> cap as a function of the parameters describing the cap.


That will give the centroid of the data, which could be quite far
from the center of the sphere. I would try something like this.

The initial guess is a closed-form solution for the center that
minimizes the variance of the squared distances of the points from
the center. Then FindMinimum minimizes the variance of the distances
of the points from the center.

data = {{x1,y1,z1},...,{xn,yn,zn}}; m = Mean@data
guess = m + .5 Total[#^2].PseudoInverse[#]&[Transpose@data - m]
Clear[x,y,z]; FindMinimum[
Variance[Norm[#-{x,y,z}]&/@data], Transpose@{{x,y,z},guess}]




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.