Reputation
302
Next privilege 500 Rep.
Access review queues
Badges
1 9
Impact
~5k people reached

  • 0 posts edited
  • 0 helpful flags
  • 26 votes cast
Jan
5
comment How to perform a multi-peak fitting?
Alternative would be to estimate n based on the Aikaike Information Criterion AIC or the Bayesian Information Criterion BIC, as in this post: mathematica.stackexchange.com/questions/94154/…, as that would penalize higher nrs of estimated parameters
Jan
5
comment How to perform a multi-peak fitting?
You could also determine n based on the Aikaike Information Criterion AIC or the Bayesian Information Criterion BIC, as in this post: mathematica.stackexchange.com/questions/94154/…, as that would penalize higher nrs of estimated parameters
Dec
21
comment Evolution of a trait in an asexual population (performance tuning)
Oh yes and one further question if you don't mind - what would be the best way to Parallelize this? Maybe split the trait values in tv in genStep over your cores and then Join the output? Any thoughts perhaps? (I would like to do populations of 10 000 so I guess that for that it could be worth it)
Dec
20
comment Evolution of a trait in an asexual population (performance tuning)
That's great - thanks so much for your hard work! And really instructive too - thanks so much!
Dec
20
accepted Evolution of a trait in an asexual population (performance tuning)
Dec
20
comment Evolution of a trait in an asexual population (performance tuning)
Thx - your answer was much appreciated! I kind of know the system to identify bottlenecks by looking at the timing of the different parts - the Poisson nr generation seemed one important bottleneck and that I improved a bit with this compiled function - but the performance is still not so great... So just seeking general advice for other possible optimizations...
Dec
20
comment Evolution of a trait in an asexual population (performance tuning)
Optimized my code a bit by replacing the Poisson with a faster compiled version but it's still quite slow - any more thoughts for optimizations?
Dec
20
comment Evolution of a trait in an asexual population (performance tuning)
Optimized my code a bit according to your advice but it's still quite slow - any more thoughts for optimizations?
Dec
20
revised Evolution of a trait in an asexual population (performance tuning)
added 1 character in body
Dec
20
revised Evolution of a trait in an asexual population (performance tuning)
slightly optimized code per suggestions below
Dec
19
comment Evolution of a trait in an asexual population (performance tuning)
Many thx - this particular replacement would lead to only a fairly small speed improvement though... The one line that is likely very inefficient is the one that reads population = Clip[offspringtraitvals + RandomInteger[BinomialDistribution[1, mutrate], Length[offspringtraitvals]]* RandomReal[ndist, Length[offspringtraitvals]], {0, ∞}] - any thoughts on how to make that more efficient would be much appreciated - basically with probability mutrate it should add a bit of normally distributed noise to each list element...
Dec
19
comment Evolution of a trait in an asexual population (performance tuning)
Well one line that is likely very inefficient is the one that reads population = Clip[offspringtraitvals + RandomInteger[BinomialDistribution[1, mutrate], Length[offspringtraitvals]]* RandomReal[ndist, Length[offspringtraitvals]], {0, ∞}] - any thoughts on how to make that more efficient would be much appreciated - basically with probability mutrate it should add a bit of normally distributed noise to each list element... In any case, it's everything within the Do[] loop that I'm interested in optimising...
Dec
19
revised Evolution of a trait in an asexual population (performance tuning)
added 50 characters in body
Dec
19
revised Evolution of a trait in an asexual population (performance tuning)
deleted 9 characters in body
Dec
19
asked Evolution of a trait in an asexual population (performance tuning)
Nov
20
revised Apply tranformation to particular list elements
edited title
Nov
20
comment Apply tranformation to particular list elements
Many thanks for this - works perfectly! 2nd solution is what I was looking for - sorry for the typo in my question!
Nov
20
comment Apply tranformation to particular list elements
Many thanks for this - works perfectly!
Nov
20
accepted Apply tranformation to particular list elements
Nov
20
comment Apply tranformation to particular list elements
Ha yes apologies that's what I meant I changed my question accordingly - thanks for both of your answers they work perfectly!