Comments (2)
I don't know whether times in data vs transformed data is better.
I would rephrase that question into, "Do you expect the integration times to be able to vary, without any changes to the existing model?". If the answer is yes, then I would believe that moving times into data would be the correct option.
However, since we also handle the input data automatically within pysd, it would't hurt to just move it into data regardless, since that would remove the need for recompilation in the event that times changes.
from dataindm.
Some default choices, with the help of @hazhirr and @jandraor 's precious prior knowledge on SD modeler's default decisions. Let me know (as comment below) if you have additional knowledge that we can quantify! I am not sure whether 2 should be user or developer's duty. If it doesn't complicate the coding too much, we can supply. However, as users may find this measurement error concept new, I feel it is important to deliver this concept well; especially since this appears again in SOPS
policy optimization of the second workflow 3.b. The state_init
as est_param
would be the famous latent data concept. Bob's prior knowledge and unexplained variation explains this better.
I will make 2 and 3 as new issue after getting @Dashadower 's confirmation.
Implementation duty are
- on user: 1
- on developer: 2,3
-
penalize only the states (=stock)
all comparison between simulated and observed state is done with stock variable. Users should change the structure within vensim, by adding artificial stock ([var_name]_state) that ensures its value is close to the value of the original type (observed data of flow or auxiliary variable). -
state_init
asass_param
state_init
isass_param
by default; when user selects to it asest_param
, we need two machines under the hood:
-
add two
est_param
: initial (latent) valuez_init
and measurement error scalez_sigma
-
add
times
's length by one
times
is the index variable along which integration happens. Let's say we have length 20 observed state data seriesvector[20] y
. Then,times
is 1:19 forstate_init
isass_param
and 0:19state_init
isest_param
. Whenstate_init
isass_param
, the length oftimes
should be 19 (y[0]
becomesy_init
). However, whenstate_init
isest_param
, then the penalizing (betweenz_init
andy_init
happens from time 0.
The need for 1:19 for state_init
as ass_param
is bc we don't want to simulated what's already known as explained here.
- separate implementation of
data2draws
vsdraws2data
a. data block
@Dashadower I don't know whether times
in data vs transformed data is better.
data2draws
has the following components
int n_obs_state;
int n_t;
real initial_time;
array[n_t] real times;
array[n_t] vector[n_obs_state] y; //observed states
draws2data
has the following components
int n_obs_state;
int n_t;
real initial_time;
array[n_t] real times;
b. function, transformed parameter block are the same
c. parameter and model block
only for data2draws
d. generated quantities block
-
y_ppc
for both - log_lik for
data2draws
-
_tilde
fordraws2data
on generator logics (~ parameter and model block fordata2draws
)
Will commit the current fixes by today which includes some minor fixes (but not d.)
from dataindm.
Related Issues (20)
- Vignette for "Uncertainty Structure of Dynamic Models: Capturing Prey and Demand with Predator and Supply" HOT 2
- Compare SDA and BATS HOT 2
- User-Program Workflow with Specified Programs
- Modularize function block
- Parameter indexing in function and gq block
- Pass Pysd CI test
- Formula and Auto prior from brms HOT 3
- Abstracting model prior and family for hierarchical ODE in U34
- Measure distance between classified behavior space HOT 1
- Parallelize loglik computation using reduce_sum
- Parsing lookup function HOT 1
- Minor features to be added
- Automate hierarchical prior R2-D2-M2
- Prevent `est_param`. `ass_param` to be written inside function block HOT 1
- Cyclic models
- Data along the time axis HOT 1
- Measurement model HOT 1
- Flow variable as observed data HOT 2
- Implement Dan's pc-prior
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataindm.