Menu

SVN archive Commit Log


Commit Date  
[r25237] by tlinnet

Split up of systemtest test_r1rho_kjaergaard_missing_r1, into a verification part.

This is to test the new r2eff estimation, which should get the parameter values, as a
this 2000 monto carlo simulation.

task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting.

2014-08-24 23:09:02 Tree
[r25236] by tlinnet

Small changes to verification scripts, to use chi2 function and use the scaling matrix correct.

task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting.

2014-08-24 23:09:00 Tree
[r25235] by tlinnet

Documentation fix for new exponential target function.

Also added new function to estimate R2eff and i0 parameters, before minimisation.

task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting.

2014-08-24 23:08:58 Tree
[r25234] by tlinnet

Implemented back end for estimating r2eff and errors by exponential curve fitting with scipy.optimize.leastsq.

task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting.

2014-08-24 23:08:57 Tree
[r25233] by tlinnet

Modified check for model, to accept model as input, for error printing.

task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting.

2014-08-24 23:08:55 Tree
[r25232] by tlinnet

Added front end user function relax_disp.r2eff_estimate() to estimate R2eff and errors by exponential curve fitting in scipy.optimize.leastsq.

task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting.

2014-08-24 23:08:53 Tree
[r25231] by tlinnet

Implemented initial systemtest Relax_disp.test_estimate_r2eff for setting up the new user function to estimate R2eff and errors by scipy.

task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting.

2014-08-24 23:08:50 Tree
[r25230] by tlinnet

Moved the target function for minimisation of exponential fit into the target functions folder.

task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting.

2014-08-24 23:08:48 Tree
[r25229] by tlinnet

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

The profiling shows that scipy.optimize.leastsq is 10X as fast as using minfx (with no 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.

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

The following setup illustrates the problem.
This was analysed on a: MacBook Pro, 13-inch, Late 2011.
Witn 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.

2014-08-24 23:08:46 Tree
[r25228] by tlinnet

Further improved the profiling of relax curve fit.

This profiling shows, that Python code is about twice as slow as the C code implemented.

But it also shows that optimising with scipy.optimize.leastsq is 20 X faster.
It also gives reasonable error values.

Combining a function for a linear fit to guess the initial values, together
with scipy optimise, will be an extreme time win for estimating R2eff values fast.

A further test would be to use relax Monte-Carlo simulations for say 1000-2000 iterations,
and compare to the errors extracted from estimated covariance.

2014-08-24 23:08:44 Tree
Older >
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.