charlesrocabert / gbapy

Growth balance analysis in Python
GNU General Public License v3.0
1 stars 0 forks source link

Questions about the noise vector for the noise trajectory. #7

Open fumer100 opened 1 month ago

fumer100 commented 1 month ago

Should every element of the noise vector have the same noise? Or should I draw a different noise for each element like this?: image

charlesrocabert commented 1 month ago

You should use:

epsilon = np.random.normal(0, sigma, size=nj-1). epsilon is then a vector of random values.

with $n_j$ the length of vector f ($n_j-1$ is because next_f is actually next_f_trunc)

charlesrocabert commented 1 month ago

Then, next_f = f_trunc + (GCC_f + epsilon)*dt

charlesrocabert commented 1 month ago

I am not completely sure of the faisability of this algorithm. Let me know ;)

fumer100 commented 1 month ago

I will try it out! Thank you!

charlesrocabert commented 1 month ago

Be especially careful of the value sigma. It should be small enough

fumer100 commented 1 month ago

Could the noise be negative?

charlesrocabert commented 1 month ago

Yes, there is no constraint on the sign of GCC_f. Which makes me realize that your stop criterium is false. You must test if the absolute value of GCC_f is close to zero, not GCC_f directly.

However, I would simply remove this test, and simply keep your stop criterium on mu.

fumer100 commented 1 month ago

Ok, I thought I had tested the absolute of Gcc_f.... But I deleted it. It doesn't impact the result, so it's not necessary as you said. Thank you for the hint!

And I think the noisy trajectory is working now.

charlesrocabert commented 1 month ago

I am really curious to see what kind of trajectory you obtain

fumer100 commented 1 month ago

You can test it now :)