mailRe: [task #7822] Implement user function to estimate R2eff and associated errors for exponential curve fitting.


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on August 26, 2014 - 16:47:
Hi Troels,

To help with the implementation, I would recommend that parameter
scaling is turned off as that might make the covariance matrix
calculations more difficult.  Once the covariance matrix diagonal
matches the Monte Carlo simulations (well the square root of the
diagonal elements to convert from variances to standard deviations),
then turn on the parameter scaling and see if the errors are still
correct.

Regards,

Edward



On 24 August 2014 17:56, Troels E. Linnet
<NO-REPLY.INVALID-ADDRESS@xxxxxxx> wrote:
URL:
  <http://gna.org/task/?7822>

                 Summary: Implement user function to estimate R2eff and
associated errors for exponential curve fitting.
                 Project: relax
            Submitted by: tlinnet
            Submitted on: Sun 24 Aug 2014 03:56:36 PM UTC
         Should Start On: Sun 24 Aug 2014 12:00:00 AM UTC
   Should be Finished on: Sun 24 Aug 2014 12:00:00 AM UTC
                Category: relax's source code
                Priority: 5 - Normal
                  Status: In Progress
        Percent Complete: 0%
             Assigned to: tlinnet
             Open/Closed: Open
         Discussion Lock: Any
                  Effort: 0.00

    _______________________________________________________

Details:

A verification script, showed that using scipy.optimize.leastsq reaches the
exact same parameters as minfx for exponential curve fitting.

The verification script is in:
test_suite/shared_data/curve_fitting/profiling/profiling_relax_fit.py
test_suite/shared_data/curve_fitting/profiling/verify_error.py

The profiling script shows that a 10 X increase in speed can be reached by
removing
the linear constraints when using minfx.

The profiling also shows that scipy.optimize.leastsq is 10X as fast as using
minfx, even without linear constraints.

scipy.optimize.leastsq is a wrapper around wrapper around MINPACK's lmdif 
and
lmder algorithms.

MINPACK is a FORTRAN90 library which solves systems of nonlinear equations, 
or
carries out the least squares minimization of the residual of a set of 
linear
or nonlinear equations.

 The verification script also shows, that a very heavy and time consuming
monte carlo simulation of 2000 steps, reaches the same errors as the errors
reported by scipy.optimize.leastsq.

The return from scipy.optimize.leastsq, gives the estimated co-variance.
Taking the square root of the co-variance corresponds with 2X error reported
by minfx after 2000 Monte-Carlo simulations.

This could be an extremely time saving step, when performing model fitting 
in
R1rho, where the errors of the R2eff values, are estimated by Monte-Carlo
simulations.

The following setup illustrates the problem.
This was analysed on a: MacBook Pro, 13-inch, Late 2011.
With no multi-core setup.

Script running is:
test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/2_pre_run_r2eff.py

This script analyses just the R2eff values for 15 residues.
It estimates the errors of R2eff based on 2000 Monte Carlo simulations.
For each residues, there is 14 exponential graphs.

The script was broken after 35 simulations.
This was measured to 20 minutes.
So 500 simulations would take about 4.8 Hours.

The R2eff values and errors can by scipy.optimize.leastsq can instead be
calculated in: 15 residues * 0.02 seconds = 0.3 seconds.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/task/?7822>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel



Related Messages


Powered by MHonArc, Updated Thu Aug 28 13:00:14 2014