How do I know if one moment in time is enough to do inference with the pendulum? #28
Unanswered
beckynevin
asked this question in
Q&A
Replies: 1 comment
-
I need to return to this. For now, I think a more pertinent question is how to self-consistently design the dataset and experiments for all models in this repo. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I'm deciding how to construct an "universal dataset" for the pendulum that will run through multiple different statistical and ML methods (Bayesian inference / sampling, SBI, and deep ensembles).
I'm wondering about the form of the dataset, is it enough to do inference with one moment in time (aka, try to get the sampling notebooks to infer L, theta_0, and a_g from one snapshot), or is this problem degenerate enough that we'll need to feed it multiple moments in time for each pendulum?
To test this, I have created a notebook named
how_many_times.ipynb
within the issue/hierarchical_dataset branch. In the notebook, I create one simple model for the pendulum. It is non-hierarchical and simply performs inference on L, theta_0, and a_g for a single pendulum given either multiple moments in time or one moment in time. What it does is the following analytical model:def simple_model(times, pos_obs=None): a_g = numpyro.sample("a_g", numpyro.distributions.TruncatedNormal(12.5, 5, low=0, high=25)) L = numpyro.sample("L", numpyro.distributions.TruncatedNormal(5, 2, low = 0.01)) theta = numpyro.sample("theta", numpyro.distributions.TruncatedNormal(jnp.pi/100, jnp.pi/500, low=0.00001)) #σ = numpyro.sample("σ", numpyro.distributions.Exponential(exponential)) σ = numpyro.sample("σ", numpyro.distributions.TruncatedNormal(0.02,0.01, low = 0)) modelx = L * jnp.sin(theta * jnp.cos(jnp.sqrt(a_g / L) * times)) pos = numpyro.sample("obs", numpyro.distributions.Normal(modelx, σ), obs=pos_obs)
I run this model for 500 steps using both a dataset that has one moment in time and 100 moments in time, both of which have the same true values of L, theta_0, and a_g.
This discussion is meant to assess these results and determine which is a better option.
Option 1: 10 moments in time
Option 2: 1 moment in time
Beta Was this translation helpful? Give feedback.
All reactions