noid-group / BOCS

Bottom-up Open-source Coarse-graining Software
15 stars 5 forks source link

Regularization in BOCS #14

Open JFRudzinski opened 4 years ago

JFRudzinski commented 4 years ago

Hello,

I have some concerns about the current [Regularization] options in BOCS:

  1. type=BAYES -- If my memory is correct, I believe that I never actually got this scheme to work properly. So, unless someone has made some changes to it (which I doubt), then it should be removed from the possible options. You could also try to fix it, but it's not clear to me that this would be worth the effort.

  2. type=UNCERT -- This is in principle fine, but there are maybe some subtleties to the implementation which are not clear in the manual. The first thing is that, as described in the SI of the paper cited in the manual - Rudzinski, Noid, JPCB 2014, this like a weighted Tikhonov regularization. The weights are coming from the uncertainty of each element of the M/G matrix and are automatically calculated and stored in save.d2M.dat in the first half of the calculation. However, d2M corresponds to the variance of the M values and the simple estimate for uncertainty is d2M[i,j] / (n_samples - 1). The n_samples is stored in M_cnt, but this is actually only calculated if one uses the [Metric_Tensor] directive with flag_Mcnt == YES. If not, one can still easily apply a non-weighted Tikhonov regularization by setting every entry in save.d2M.dat to 1.0 and then constructing a file called save.M_cnt.dat with the same number of lines, all with 2.0 as the entry. I think all of these concepts should be included in the manual, perhaps also with some more explanation about how the regularization should be used in practice. I am happy to help write something up...I have the feeling that probably you guys don't commonly use this option.

Let me know what you think.

Best,

Joe