https://github.com/bdilday/mlbmarkov_nm
https://github.com/bdilday/mlbmarkov_nm
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bdilday/mlbmarkov_nm
- Owner: bdilday
- License: other
- Created: 2014-05-22T21:19:46.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-01-31T00:36:31.000Z (over 10 years ago)
- Last Synced: 2025-03-13T03:44:04.180Z (over 1 year ago)
- Language: Python
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mlbMarkov
=========
A basic Markov chain code to compute the expectation value of runs in an inning, given n bases and m outs. No outs on bases, and no taking an extra base!
requires
* numpy
* matplotlib
The basic usage is, e.g.,
python mlbMarkov_nm.py -nbases 3 -nouts 3 -p0 0.69 -p1 0.23 -p2 0.05 -p3 0.005 -p4 0.025
the probabilities are set with
-p0 [probability for out]
-p1 [prob for a 1-base hit]
-p2 [prob for a 2-base hit]
etc...
if the inputs don't add up to 1, they get rescaled so that they do...