--
You received this message because you are subscribed to the Google Groups "PEUQSE-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to PEUQSE-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/PEUQSE-users/2fafe8c1-790d-40b8-bb0f-d726b3369f93n%40googlegroups.com.
First, thanks considering making a contribution, and this is a good issue to have a solution for -- whether it's by more documentation /examples or more code. There are several separate issues involved in this question, so let's consider them... a) Definitely you could make your code put out its own outputs, let's not rule that out yet, but consider if there is something better. b) This is a general problem, that the scipy optimizers don't give you enough information along the way. Accordingly, we do have a partial solution for this. In InverseProblem.py, there is a function called verbose_optimization_wrapper due to this kind of issue, but I think it might only work with some of the optimizer choices, like Nelder-Meade. I don't remember. You may want to do some singlepoint calls to doOptimize logP playing around with it. Note that this requires a True call to doOptimizeLogP:
parameter_estimation_settings['multistart_passThroughArgs'] = {} #Typically, one would put here the arguments for doOptimizeNegLogP: {'method':"Nelder-Mead", 'printOptimum':True, 'verbose':False} To find additional details of which arguments can be used with doOptimizeNegLogP, see the function doOptimizeNegLogP in PEUQSE\InverseProblem.py So I think you need to use the passthrough args. d) When I looked at verbose_optimization_wrapper, it looks like it has no way of writing the outputs to file. Maybe it would be a good idea to change that somehow. e) Is your problem even feasible within a 24 hour time limit, with a doOptimize call? Each doOptimize point probably needs 100 sequential iterations. For some optimizers, you can limit that with passthrough args. Otherwise, you might need to do something else like short ensemble jump sampling runs or maybe a sobol or astroidal sampling, since the astroidal sampling can be perfectly parallelized. d) There is an MPI parallelization of PEUQSE feature, which can be used with multistart. It looks like the syntax for that is here, https://github.com/AdityaSavara/PEUQSE/blob/master/Examples/Example26/runfile_Example_26d2_BPE_MH_multistart_with_Parallel.py but I probably should make an example of parallel sampling with sobol or astroidal. <-- the MPI feature is not always super easy to get working, so I have taken the approach that it only makes sense to try to get working if a person needs it. Or, if someone really plans to work with PEUQSE a lot or for some huge and important problem. | |
I have one question related to output files. I am currently doing a multistart optimize logP run with my current model, but I am not converging by my hpc's time limit (24 hrs). Should I limit each starting point to a specific number of iterations, or is there a way to generate a checkpoint before the end of the run? Currently I have the following set in my run file, but all of my output folders are empty at the end of the 24 hour period:```
UserInput.parameter_estimation_settings['mcmc_threshold_filter_samples'] = True
UserInput.parameter_estimation_settings['mcmc_parallel_sampling'] = TrueUserInput.parameter_estimation_settings['mcmc_random_seed'] = 0
UserInput.parameter_estimation_settings['multistart_searchType'] = 'doOptimizeLogP'
UserInput.parameter_estimation_settings['multistart_passThroughArgs'] = {'method':'BFGS'} #Here, BFGS is used. However, Nelder-Mead is usually what is recommended.
UserInput.parameter_estimation_settings['multistart_initialPointsDistributionType'] = 'sobol'
# things to try to get it to save more:
UserInput.parameter_estimation_settings['multistart_exportLog'] = True
UserInput.parameter_estimation_settings['multistart_checkPointFrequency'] = 100
UserInput.parameter_estimation_settings['verbose'] = TruePE_object = PEUQSE.parameter_estimation(UserInput)
PE_object.doMultiStart()```I have a workaround where I write my own output files with information on each iteration (parameters, outputs, logp value) but I imagine you probably already coded something that is more efficient than whatever I've implemented. I did take a look in "UserInputs" and it seems like maybe the multistart checkpoint frequency isn't implemented yet, so maybe I could start there and try to code something.Regards,Chris Blais
To view this discussion on the web visit https://groups.google.com/d/msgid/PEUQSE-users/67c7b562-7861-4048-9867-d8ed46fe012an%40googlegroups.com.