Sabermetrics Documentation Release 0.1.1 Fernando Crema August 08, 2016 Contents 1 sabermetrics 3 1.1 sabermetrics package...........................................3 2 Indices and tables 5 Python Module Index 7 i ii Sabermetrics Documentation, Release 0.1.1 Contents: Contents 1 Sabermetrics Documentation, Release 0.1.1 2 Contents CHAPTER 1 sabermetrics 1.1 sabermetrics package 1.1.1 Submodules 1.1.2 sabermetrics.batting module sabermetrics.batting.avg(h, ab) Batting average is determined by dividing a player’s hits by his total at-bats for a number between zero (shown as .000) and one (1.000). H AV G = AB Parameters • h (int.) – Hits. • ab (int.) – At bats. Returns float – The batting average. Raises ZeroDivisionError sabermetrics.batting.babip(h, hr, ab, k, sf ) BABIP measures a player’s batting average exclusively on balls hit into the field of play, removing outcomes not affected by the opposing defense (namely home runs and strikeouts). H − HR BABIP = AB − K − HR − SF Parameters • h (int.) – Hits. • hr (int.) – Homeruns. • ab (int.) – At bats. • k (int.) – Strikeouts. • sf (int.) – Sacrifice fly. Returns float – Batting average balls in play.. Raises ZeroDivisionError 3 Sabermetrics Documentation, Release 0.1.1 1.1.3 sabermetrics.fielding module sabermetrics.fielding.fpct(a, po, e) How often does a fielder or team make the play when tasked with fielding a batted ball, throwing a ball, or receiving a thrown ball for an out. PO + A FPCT = PO + A + E Parameters • a (int.) – Assists. • po (int.) – Putouts. • e (int.) – Errors. Returns float – The fielding percentage. Raises ZeroDivisionError 1.1.4 sabermetrics.pitching module sabermetrics.pitching.era(er, outs) Represents the number of earned runs a pitcher allows per nine innings – with earned runs being any runs that scored without the aid of an error or a passed ball. 27ER BABIP = Outs Parameters • er (int.) – Earned runs. • outs (int.) – Number of batters and baserunners that are put out while the pitcher is on the mound. Returns float – the return code. Raises ZeroDivisionError 1.1.5 Module contents Sabermetrics: A python package with a set of baseball analytic functions for sabermetric purposes. sabermetrics.start() Initializing modules. 4 Chapter 1. sabermetrics CHAPTER 2 Indices and tables • genindex • modindex • search 5 Sabermetrics Documentation, Release 0.1.1 6 Chapter 2. Indices and tables Python Module Index b batting (Unix, Windows),3 f fielding (Unix, Windows),4 p pitching (Unix, Windows),4 s sabermetrics,4 sabermetrics.batting,3 sabermetrics.fielding,4 sabermetrics.pitching,4 7 Sabermetrics Documentation, Release 0.1.1 8 Python Module Index Index A avg() (in module sabermetrics.batting),3 B babip() (in module sabermetrics.batting),3 batting (module),3 E era() (in module sabermetrics.pitching),4 F fielding (module),4 fpct() (in module sabermetrics.fielding),4 P pitching (module),4 S sabermetrics (module),4 sabermetrics.batting (module),3 sabermetrics.fielding (module),4 sabermetrics.pitching (module),4 start() (in module sabermetrics),4 9.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages13 Page
-
File Size-