kingaa / pomp

R package for statistical inference using partially observed Markov processes
https://kingaa.github.io/pomp
GNU General Public License v3.0
114 stars 27 forks source link

Global Search failing bc of one particle #153

Closed mehrdadfazli closed 3 years ago

mehrdadfazli commented 3 years ago

I ran into this problem while globally searching for the best parameters. When I choose (say) 300 random points in a hypercube (using design functions in pomp) and let the mif maximizes the log likelihood, if one parameter of one particle diverges (e.x. goes to infinity) the entire process fails with error which can ruin a lot of cpu power. I was wondering if there is a way in pomp that skip those singular points and stores the rest of the points (MLE points). Also, is there a way to get around this issue. I decided to submit 100 jobs with 3 starting points instead of 1 job with 300 starting points. However, I am not sure if that is the optimized way of treating the problem.

kingaa commented 3 years ago

Are you using foreach? I ask because foreach has the .errorhandling option, which can be configured to either filter errors out or to pass them along, if either of those is preferable to the default behavior, which is to stop if a single error is encountered.

mehrdadfazli commented 3 years ago

Yes I was using "foreach" and your suggestion solved the issue. Thanks a lot!