Transfer parameter estimates to model
7 views (last 30 days)
Show older comments
Hello,
I built a PBPK model in the Simbiology Desktop application, and I run a "fit data" program on a cluster. I saved the programResults output file which I analyzed locally in the command window and workspace.
I plotted the fit data results at the command line from the programResults output file. The fit to my experimental data was good and I transferred the parameter estimates to the model in the Simbiology Desktop Model Builder. I did that at the command line by updating my parameter list in an independant copy of the original model, and then saved both models (original and with fitted parameters) using sbiosaveproject (my simbiology root object being only these two models).
--> 1) Is there a function planned to create a new model in a project based on the programResults object from a fit data program? (which would be less error-prone than doing this step by step at the command line)
However, when I simulate the updated model with the parameter estimates in the Simbiology Desktop Model Analyzer, I do not get the same simulated curve as when I plot it from the programResults output file of the fit data program ran in the cluster. I checked that all parameters were correctly updated in the new model, that the dose and observed data were consistent. I also used the "Compare" function in Matlab to compare both models, but couldn't see any major changes that would explain the inconsistency between the plots of the two models.
--> 2) Is there any other parameters than the parameter estimates to update when transferring fit data results to a model in a simbiology project?
I would appreciate any help on this. Unfortunately I can't upload my plots or data here.
Best regards
0 Comments
Accepted Answer
Arthur Goldsipe
on 19 Jul 2024
For item #1, the SimBiologyModelAnalyzer app allows you to create a variant of the parameter estimates (see here for more details). After that, you can specify the variant to any simulations, or you can commit the variant to the model if you want to copy those values over to the model components. You can do something similar from the command line, but you would need to create the variant yourself. We are considering an enhancement to make these variants easier to create from the command line.
Item #2 is much harder to answer. The first thing I'd check is whether the fit program applies any other variants or doses that you may have overlooked. The next thing I'd suggest is double-checking that both simulations start with the same initial conditions. So you could update both programs to log everything, including constant parameters. Then compare the values at time=0 to make sure they are the same. If your initial conditions are all the same, then I'd compare the simulations to see where they first start to differ. If the simulations immediately start to diverge, then this suggests the dynamics are different. This usually happens because the two models implement different dynamics. But in rare cases the difference could be due to more subtle numerical issues when solving the ODEs. As a concrete example, simulations during fitting might include calculation of sensitivities that require the solver to take smaller time steps.
If you still can't figure out the source of the difference, I suggest contacting Technical Support or messaging me directly. We already have NDAs with some customers so that we can share confidential information. The SimBiology development team also has a tool that we can share to "obfuscate" your model before sharing it with MathWorks. We also sometimes set up video calls to debug things remotely.
More Answers (0)
Communities
More Answers in the SimBiology Community
See Also
Categories
Find more on Perform Sensitivity Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!