model.fit(iter=25000) # <codecell> sim.run(0, 12) model.plot_distributions(show_normal=True) # <markdowncell> # ### Plot the simulations for many samplings of the simulation parameters # <codecell> sim.noplots = True # turn off the simulation plots for i in range(500): model.draw() sim.run(0, 12) plot(sim.t, sim.h, 'g-', alpha=.1) sim.noplots = False # gotta love a double-negative plot(t, h, 'bo') # plot the data # <markdowncell> # ## Logistic Model with the Same Data # <codecell> sim = Simulation() sim.add("h'=a*h*(1-h/K)", 1, plot=True) sim.add_data(t=t, h=h, plot=True) sim.params(a=1, K=10)
model.fit(iter=25000) # <codecell> sim.run(0,12) model.plot_distributions(show_normal=True) # <markdowncell> # ### Plot the simulations for many samplings of the simulation parameters # <codecell> sim.noplots=True # turn off the simulation plots for i in range(500): model.draw() sim.run(0,12) plot(sim.t,sim.h,'g-',alpha=.1) sim.noplots=False # gotta love a double-negative plot(t,h,'bo') # plot the data # <markdowncell> # ## Logistic Model with the Same Data # <codecell> sim=Simulation() sim.add("h'=a*h*(1-h/K)",1,plot=True) sim.add_data(t=t,h=h,plot=True) sim.params(a=1,K=10)