choderalab / bayesian-itc

Python tools for the analysis and modeling of isothermal titration calorimetry (ITC) experiments.
GNU General Public License v3.0
5 stars 10 forks source link

What step method should be we using? #54

Open bas-rustenburg opened 9 years ago

bas-rustenburg commented 9 years ago

Copy-paste from #53

Here is something interesting.

I took a look at the different step methods for MCMC. Here is the host concentration, estimated at 1.0157 mM in this particular experiment (I just picked a host-guest titration at random from one of our previous sets of experiments).

Settings: Using the TwoComponentBindingModel about 320000 iterations (I stopped it at around 16% of 2000000) 10000 burn in iterations and a thinning period of 25. Not sure how good those settings are but there is quite a striking difference.

Using the RescalingStep: sample-ls Note that the value on the y-axis is offset by 1.0124 Using a default pymc Metropolis step: sample-ls

bas-rustenburg commented 9 years ago

Rescaling after about 975000 steps using same settings. Full series of plots

sample-deltag sample-deltah sample-deltah_0 sample-subtracted

sample-sigma sample-p0 sample-ls

bas-rustenburg commented 9 years ago

Here is the Metropolis data after 1000000: sample-deltag sample-deltah sample-deltah_0 sample-ls sample-p0 sample-sigma sample-subtracted

bas-rustenburg commented 9 years ago

So, an old version of the twocomponentmodel was using it correctly. I think a little too much copy paste action from merging several versions of ITC.py and models.py of yore dropped the metropolis step. Opening a separate PR to fix after the current.

bas-rustenburg commented 9 years ago

CompetitiveBindingModel in it's current form uses both.

bas-rustenburg commented 9 years ago

Copy-paste from #55 Here is the data, fixing the bug so we're using both Metropolis and RescalingStep at once.

1,000,000 steps, 10000 burn-in, thinning period of 25:

sample-deltag sample-deltah sample-deltah_0 sample-ls sample-p0 sample-sigma sample-subtracted

bas-rustenburg commented 9 years ago

Comparison, for convenience: Just Metropolis: sample-ls sample-p0

Both Metropolis and RescalingStep:

sample-ls sample-p0

jchodera commented 9 years ago

Looks like it isn't worth the added complexity right now. Ditch RescalingStep?

bas-rustenburg commented 9 years ago

Sure, will switch back to regular Metropolis. Leaving the (fixed) implementation if we decide tweaking something, so will merge once I set things back to using just Metropolis.