0

I have some $(t,S)$ data and this four-parameters stretched exponential model (from diffusion NMR signals):

$S(t) = S_0\cdot e^{-D\cdot t^a}+c$ .

Here $D$, $S_0$, $a$, $c$, are parameters to estimate. They must be all positive except for $c$ that is a little noise-term and can be negative. I'm using standard scipy.optimize library for fitting but this is not relevant. Sometimes it does not converge at all.

So i'm trying to use less parameters by dividing my $S$-data array for the first value $S(t_0)$ so it starts from $1$, using this three-parameters function:

$S(t)/S_0 = e^{-D\cdot t^a}+\tilde{c}$ ,

with $\tilde{c}=c/S_0$.

I know that i'm assuming that $S(t_0) \simeq S_0$ but i think i'm doing something wrong. Should i use this function instead?

$S(t)/S_0 = e^{-D\cdot (t-t_0)^a}+\tilde{c}$,

Mik2A
  • 33

1 Answers1

1

You are trying to fit data with a very highly nonlinar model. The main reason for difficulties is, much more than often, the lack of "reasonable" (or at least consistent) guesses of the parameters.

I shall change your notation and let $k=-D$.

Let us use you idea of $$\frac S{S_0}=e^{k\, (t-t_0)^a}+\tilde{c}$$ and for the time being "ignore" the $\tilde{c}$ or give it a fixed value (I shall come back later to this point). Now, take logarithms $$\log\left(\frac S{S_0}-\tilde{c} \right)=k(t-t_0)^a$$Logarithms again $$\log\left(\log\left(\frac S{S_0}-\tilde{c} \right) \right)=\log(k)+a \log(t-t_0)=b+a \log(t-t_0)$$ Considering that you have $n$ data points $(t_i,S_i)$, for a given value of $\tilde{c}$ define new variables, namely $$x_i=t_i-t_0 \qquad \text{and} \qquad y_i=\log\left(\log\left(\frac {S_i}{S_0}-\tilde{c} \right) \right)$$ and your model is just $$y_i=b+a t_i$$ which is more than simple. From the parameters, recompute $y_i^{calc}$ and from that the corresponding $\left(\frac {S_i^{calc}}{S_0}-\tilde{c}\right)$ and the corresponding sum of squares $(SSQ)$. Now, play a little bit with the value assigned to $\tilde{c}$ until you see a minimum value for $SSQ$. When this will be done, you have the reasonable estimates for $k$ and $a$ and you can start the nonlinear regression.

  • Thanks Claude for your detailed and interesting answer. My math doubt is more basic: without any log mapping, could i use the second or the third exponential function when dividing the $S$ data for the first value? I add for clarity that $t_0 = t^* \neq 0$ on my dataset so dividing for the first value $S(t^)$ is not a true parameter elimination because by definition should be $S_0 = S(t=0)$. So , assuming that $S_0/S(t^)=1$, should i use the second or the third exponential? You can assume any simpler function as $S=S_0 e^{a\cdot x} +c $. – Mik2A Nov 27 '20 at 16:37