Asking for advice on development direction #16
Replies: 4 comments 5 replies
-
At the risk of jumping into a discussion without knowing full context - and with the caveat that I've not worked with Stan myself - @tomfid and Hazhir and I had an email thread recently discussing how to do basic Bayesian inference tasks in Vensim. Short version is that a lot of basic stuff can be done in Vensim, it's just quite fiddly. But what Vensim (and really Vengine) has going for it is the MCMC engine, which is fast, and allows working with larger, more complex models (e.g. the 300 vs. 3 parameters) without absurd computational requirements. My impression is that its speed and efficiency is hard to match without access to a HPC cluster. Computational constraints are a huge concern for Bayesian inference with any substantial model so this is a major advantage. That's why for me personally my approach has been to retain Vensim/Vengine as the core analytical engine while trying to make it easier to do all upstream and downstream tasks outside Vensim, drawing on the wealth of other existing tools out there. Obviously it would be ideal if Vensim was better or more easily integrated with those ecosystems. But for now, the advantage of computing power is still (for me) worth the lack of straightforward integration. |
Beta Was this translation helpful? Give feedback.
-
Here's a possible approach:
|
Beta Was this translation helpful? Give feedback.
-
I will be doing the packaging job early next week to deliver Stan version of vensim-python connection to seminar students. During this process, I wish to discuss the best location to host this service. Agenda for week-unit@tseyanglim shared this notebook with the following functions:
To avoid the worst case of not introducing Stan connection, this week I am aiming to replicate the above with Stan-version first to Then I will move on to inventory management model. Meanwhile, @tseyanglim could help me by testing this inventory model in VST? Your VST result can make checking validity much easier in python; VST is only library that can do this. @hazhirr thinks pushing to this complexity is needed (which I agree)! Agenda for month-unitRestarting from Tom's reply above (proposal accepted!, thanks)
the following is my objective and constraints: Binary-ified objective
Strong constraints
Weak constraintsPooling information from four agents (MIT SD group, Stan team, SD community, Stan community) helped increase both stock level (literature recommendation) and flow rate (mail exchange). Delay was shorter than expected: witnessed co-evolve in less than one month in each.
|
Beta Was this translation helpful? Give feedback.
-
@tomfid, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Not knowing the current tool ecosystem of System dynamics community, I think I am wasting some time trying to figure out how to best deliver the tools. May I ask your advice on that aspect? @tomfid @tseyanglim
Being closer vs Being further to Vensim is the first decision I need to make. To be honest, blackboxness of Vensim and diversity of tools used in SD (anylogic, Stella) made me inclined to choose the latter at first. But after meeting Tom (with his support and overlapping goals in introducing Bayes Stats.) and getting to know vensim's advanced functions (sythesim, macro) I am leaning towards the first (still confused, though). There is no clear answer, but I am sure about one thing.
I feel this project is a long fight with a Goliath. Everytime I identify the stark gap between SD and Stats community. e.g. multiplicative vs additive noise, the number of parameters (300 vs 3), the existence of driving data, I am becoming certain this cannot be done alone but need some experienced collaborators. So may I ask for some help in plans for future development-side? I am not asking for a direct answer, but as you are in the frontier of this domain (code, Bayes + SD) your opinion matters greatly to me.
For the code I've been developing (which I walked through with Tom yesterday), currently it is on pysd repo, but as pysd and Stan use separate builder (Stan has its own block-based coding system which helps Bayesian modeling), the only part resorting to pysd is this submodule which builds Abstract Syntax Tree (AST). (many thanks to pysd's AST and its excellent documentation). However, considering different goals of pysd and BayesSD, James and I agreed pysd might not be the best home for hosting inferece codes. Functions like multiview-support and subscript will be needed for future Bayes+SD, but these functions, I can use pysd as a package. So second decision might be Being closer vs Being futher to PySD. The first (I discussed with James) is combining the pysd and BayesSD interface (data generation with Stan). The unified format makes comparing the two (from parameter to observable and from observable to parameter) easier. The second is to use PySD as a library. I think the first decision above (being close/further to vensim) would affect this decision. So to be honest, how vensim is seeing BayesSD (which @tomfid could share best) would be the most helpful information.
Regarding my Bayesian check code above, please don't run it yet as I haven't tested the full automation. However, this python module is the main whose concept is described here.
Beta Was this translation helpful? Give feedback.
All reactions