Skip to content

Commit

Permalink
adjusting bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
beckynevin committed Oct 2, 2023
1 parent a75f687 commit aed6866
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions notebooks/SBI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,30 @@
" \n",
" return output\n",
"\n",
"# is it actually possible to set up a hierarchical model in this way?\n",
"# can we actually that the pendulums are actually on two different planets?\n",
"# how do you set up a simulator so that it knows about placing pendulums into groups?\n",
"def hierarchical_simulator(thetas):\n",
" # just plop the pendulum within here\n",
" length, theta, a_g = thetas\n",
" #print('heres what were inputting', thetas, a_g)\n",
" #length_percent_error_all, theta_percent_error_all, a_g_percent_error_all = \\\n",
" # percent_errors\n",
" pendulum = Pendulum(\n",
" pendulum_arm_length=float(length),\n",
" starting_angle_radians=float(theta),\n",
" acceleration_due_to_gravity=float(a_g),\n",
" noise_std_percent={\n",
" \"pendulum_arm_length\": 0.0,\n",
" \"starting_angle_radians\": 0.1,\n",
" \"acceleration_due_to_gravity\": 0.0,\n",
" },\n",
" )\n",
" output = np.array(pendulum.create_object(np.linspace(0,2,100), noiseless=False))\n",
" #torch.tensor(pendulum.create_object(0.75, noiseless=False))\n",
" \n",
" return output\n",
"\n",
"def linear_gaussian(theta):\n",
" output = theta + 1.0 + torch.randn_like(theta) * 0.1\n",
" return output"
Expand Down

0 comments on commit aed6866

Please sign in to comment.