AdityaSavara / PEUQSE

Parameter estimation for complex physical problems often suffers from finding ‘solutions’ that are not physically realistic. The PEUQSE software provides tools for finding physically realistic parameter estimates, graphs of the parameter estimate positions within parameter space, and plots of the final simulation results.
13 stars 5 forks source link

return map_logP along with other post_burn_in_statistics #145

Open AdityaSavara opened 3 years ago

AdityaSavara commented 3 years ago

Currently, as of Oct 14th 2020, version 0.1.2, the post_burn_in_statistics looks like this:

[self.map_parameter_set, self.mu_AP_parameter_set, self.stdap_parameter_set, self.evidence, self.info_gain, self.post_burn_in_samples, self.post_burn_in_log_posteriors_un_normed_vec] = current_post_burn_in_statistics_data

There is no map_logP value in there! During gridsearch parallelization, this means the map_logP has (currently) got to be calculated again for each sample in order to compare the final values.

This should be easy to fix, but could break a few past examples.

AdityaSavara commented 3 years ago
        self.map_logP = max(self.post_burn_in_log_posteriors_un_normed_vec)
        self.map_index = list(self.post_burn_in_log_posteriors_un_normed_vec).index(self.map_logP) #This does not have to be a unique answer, just one of them places which gives map_logP.
        self.map_parameter_set = self.post_burn_in_samples[self.map_index] #This  is the point with the highest probability in the posterior.            
AdityaSavara commented 3 years ago

right now, to fix this oversight, I am pickling the map_logP and map_logP parameters separately. Perhaps this is not such a bad idea since it means that the value can also be retrieved without unpacking any large arrays.

AdityaSavara commented 1 year ago

This should also be exported to pickle and is not right now: mcmc_map_parameter_set