MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Does FindFit really use Norm[] when NormFunction -> Norm?

  • To: mathgroup at
  • Subject: [mg98327] Re: Does FindFit really use Norm[] when NormFunction -> Norm?
  • From: Darren Glosemeyer <darreng at>
  • Date: Wed, 8 Apr 2009 02:43:30 -0400 (EDT)
  • References: <>

Szabolcs wrote:
> [note: message sent to comp.soft-sys.math.mathematica]
> Today there was a question about fitting complex valued functions
> again.  It's not difficult to find the answer on MathGroup (posted by
> Darren Glosemeyer):
> But something doesn't seem to be right here ... Doesn't Norm[] return
> a real number, so isn't Abs at Norm[...] really the same as Norm[...]?  I
> vaguely remembered that I already asked about this, and managed to
> find the relevant thread:
> But no one has given a definite reply there.  So I'll ask again:  What
> going on?  Why does FindFit[..., NormFunction -> Norm] behave
> differently from FindFit[..., NormFunction -> myNorm] when myNorm is
> defined as myNorm[x___] := Norm[x]?
> Szabolcs

This has been pointed out to the developer for further consideration.

What's happening now is that Norm is getting caught and the internal 
code uses default code (mathematically equivalent nonlinear least 
squares optimization code) which runs into some complexes in 
intermediate calculations. The Abs@Norm or myNorm NormFunction settings 
do not get caught and the complexes are not encountered.

Darren Glosemeyer
Wolfram Research

  • Prev by Date: Re: complex function fitting?
  • Next by Date: Re: Difficulties with Re
  • Previous by thread: Does FindFit really use Norm[] when NormFunction -> Norm?
  • Next by thread: 2-defensive prime number