Parameter estimation with mass action law

Hello :slightly_smiling_face:

I’m using Cadet in particular for the simulation of chemical reactions using the MassActionLaw class like this:

from CADETProcess.processModel import ComponentSystem
from CADETProcess.processModel import MassActionLaw

# Step 2 

component_system = ComponentSystem(['A', 'B'])
reaction_system = MassActionLaw(component_system)

reaction_system.add_reaction(
    indices=[0,1], 
    coefficients=[-1, 1],
    k_fwd=0.1,
    k_bwd=0.05,
)

The simulation of the reaction works fine, and now I’m trying to implement a parameter scan with data we have measured. However, I am a bit lost in how to implement this, is there an example for this available, I could check out?

Many thanks and greetings,

Stephan

Hey Stephan,

could you elaborate a bit more on how you want to sample the parameter space?

  • Are the samples pre-defined (i.e. matching your experiments) or do you simply want to explore the parameter space? If so, are there any constraints?
  • Do you simply want to run the simulation (with some post-processing) or are you interested in some kind of optimization?

Best

Jo

Hey,
many thanks for your reply! I created a Jupyter notebook with some representative dummy data and added it to this comment, is this fine?

Many thanks and greetings,

Stephan

Hey,

did I understand you correctly that you want to modify some of the reaction parameters s.t. the simulation output matches the experiment(s)?

Best

Hey Jo,
yes, exactly this is the idea

You can formulate this as an optimization problem, where you use an algorithmic approach to find a set of parameters that minimizes your objective function (residuals between experimental and simulated concentration profiles). There are many algorithms you can use but in essence you want to have your simulation and objective defined as function that the optimizer calls every iteration. Might be worth looking into CADET-Match as well.

That’s right.

Fortunately, this can also be done with CADET-Process nowadays. :nerd_face:

@Stephan_Malzacher Should we have a call together? I think it might be easier to set this up together. We could still paste the final script here, once it works.