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

[Suggestion] Some code remodelling to improve modularity and readability #53

Closed bas-rustenburg closed 9 years ago

bas-rustenburg commented 9 years ago

I was playing around with some of the code in TwoComponentBindingModel and thinking of ways to improve modularity. I wonder if this is more, or less readable than the current form.

bas-rustenburg commented 9 years ago

Diff looks kinda messy, probably want to look at the file on its own.

Edit: link now points to latest version in PR branch.

bas-rustenburg commented 9 years ago

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

Opened an issue for discussion.

jchodera commented 9 years ago

Good catch. Let's use MetropolisStep for now. I think eventually we want to use both!

pgrinaway commented 9 years ago

Looking good, I like the base classes

bas-rustenburg commented 9 years ago

@jchodera, could you take a quick look at this before I merge?

jchodera commented 9 years ago

Looks great!