Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13191

Re: NonlinearModelFit Problem

From Ray Koopman <koopman@sfu.ca>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: NonlinearModelFit Problem
Date 2013-01-18 05:50 +0000
Message-ID <kdanqi$3dm$1@smc.vnet.net> (permalink)
References <kd5htd$jja$1@smc.vnet.net> <kd7tt0$q48$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


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}]

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

NonlinearModelFit Problem JCW <Please.No.EMail@comcast.net> - 2013-01-16 06:38 +0000
  Re: NonlinearModelFit Problem Frank K <fkampas@gmail.com> - 2013-01-17 04:15 +0000
    Re: NonlinearModelFit Problem JCW <Please.No.EMail@comcast.net> - 2013-01-18 05:50 +0000
    Re: NonlinearModelFit Problem Ray Koopman <koopman@sfu.ca> - 2013-01-18 05:50 +0000

csiph-web