MathGroup Archive 2011

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

Search the Archive

Re: Filtering data from numerical minimization

  • To: mathgroup at
  • Subject: [mg116800] Re: Filtering data from numerical minimization
  • From: Sebastian <sebhofer at>
  • Date: Mon, 28 Feb 2011 05:02:14 -0500 (EST)
  • References: <ijasgs$ned$>

On Feb 14, 10:26 am, Ray Koopman <koop... at> wrote:

> Try increasing WorkingPrecision, AccuracyGoal, and PrecisionGoal.
> Also, try a different Method. If that doesn't fix things, try using
> better starting intervals. This may take two passes thru the list
> 1...N. On the first pass, use your best a priori guess. On the
> second pass, take the results from n-1 and n+1 on the previous pass
> as the starting intervals for n. Take whichever results (pass 1 or 2)
> give a lower fmin. Iterate (pass 3,4,...) until it stabilizes.

The minimization is actually done in a similar way, as I use the
optimal values from n-1 to generate initial values and constraints for
n. It is funny that although I have these outliers, NMinimize finds
its way back to a "good" value for the following points.
Anyway... in the end I tackled my problem by defining a function which
drops all points which violate monotonicity and applied it to my data
by using FixedPoint. This may not be a general solution, but it worked
reasonably well for this specific case. In case someone has a similar
problem in the future, I included my code below.

Cheers and thanks again for your help!


(*usage example: only keep points which lie between the previous and
following value*)
filter=DefineFilter[(f /. #1[[#2 - 1]]) < (f /. #1[[#2]]) < (f /.
#1[[#2 + 1]]) &];
datf=FixedPoint[cfilter, dat];

  • Prev by Date: Re: How to local files on ParallelKernels
  • Next by Date: Re: NIntegrate and speed
  • Previous by thread: Re: Filtering data from numerical minimization
  • Next by thread: request help