Created
May 31, 2019 22:21
-
-
Save fonnesbeck/8547066aa7bbd6363b1bb6ec37b327bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with pm.Model() as curve_spin_model: | |
spin = pm.Data('spin', curveball_data['spin_rate']) | |
β = pm.Normal('β', shape=2) | |
θ = β[0] + β[1]*(spin/1000) | |
swing_miss = pm.Data('swing_miss', curveball_data['miss']) | |
miss = pm.Bernoulli('miss', pm.invlogit(θ), observed=swing_miss) | |
trace = pm.sample(1000, tune=6000, cores=2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment