Refactor weight combination schemes #31
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
This PR aims to not only address issue #29 but also include some additional tasks. Here is the checklist:
rmse_cutoff
final
from the YAML parameterw_combine
w_combine
into a booleanprepare_weights
w_mean_type
to specify using simple means or weighted means in weight combinationSome justifications
Generally, the idea is to simplify the options available in REXEE simulations, especially for those related to weight combinations. Since the weight combination does not seem to bring advantages, we plan to keep the most basic functionalities for demonstration purposes in the paper.
1. Removing the functionality relevant to
rmse_cutoff
Preliminary data have shown that weight combination does not accelerate weight convergence in weight-updating simulations in most cases. Using
rmse_cutoff
was shown to alleviate the issue, but that is merely reflecting the fact that the combination is performed less frequently. Therefore, we decided to remove the YAML parameterrmse_cutoff
and the relevant functionalities.2. Removing the option
final
from the YAML parameterw_combine
The final weights are known to be noisy compared to the time-averaged weights and should never be used for weight combinations. Therefore, we decide to remove the option
final
from the choices of the YAML parameterw_combine
. This would lead to only two options forw_combine
, includingNone
andavg
. Therefore, we turned the parameterw_combine
into a boolean - whenever weight combination is activated, we always use time-averaged weights. Additionally, we will need to remove the functionprepare_weights
.3. Deprecating multiple exchange proposal scheme
As discussed in the paper, the multiple exchange proposal scheme does not have symmetric proposal probabilities, while the derivation of the acceptance ratio assumes symmetric proposal probabilities, which are much more common in replica exchange methods. That is, using the multiple exchange proposal scheme with the acceptance ratio derived in the paper would lead to a violation of the detailed balance. As such, we decided to deprecate the codes implementing the multiple exchange proposal scheme by commenting out the code. Note that we do not remove the codes completely as the detailed balance might still be obeyed if the acceptance ratio is carefully designed to accommodate the asymmetry of the proposal probabilities of the multiple exchange proposal scheme. Still, this is outside the scope of our paper, so the option will be made unavailable in the package. To do this, the following is required:
n_ex
.multiple
from the YAML parameterproposal
.4. Provide a YAML parameter to specify using simple means or weighted means in weight combination.
Currently, the implementation only uses inverse-variance weight means in weight combinations, but both options should be available as the inverse-variance weighted means do not always perform better than simple means.
5. Compartmentalize the histogram correction method
Currently, the histogram correction method is implemented in
combine_weights
and is always applied after weight combination. We decided to compartmentalize the histogram correction method and let users decide whether to perform histogram correction by specifying the new YAML parameter that we are also adding here,hist_corr
.