Navigation: Jump to content areas:


Pro Quality. Fan Perspective.
Login-facebook
Around SBN: Jeremy Lin Continues Rampage, New York Wins On Road

Pitch f/x Thread

Hi everybody!!  It seems that we have been discussing Pitch f/x a lot in the main threads recently, and I thought it might be nice if we could take it all to one place.  

First, I'd like to give some background info on how the system works, how it is accessible to the public, and it's practical application to baseball.  Hopefully, this will clear up any misconceptions certain people might have...

 

 

Star-divide

The System

Implement by Sport Vision, PItch f/x cameras are able to capture certain attributes of a pitch, including: velocity, movement, location, and much more.  Pitch f/x data has been recorded on every single pitch in the majors since opening day 2008, and in a lot of games in 07 as well. 

Where to find it

PItch f/x data is made publicly available via MLB.com's Gameday service.  While Gameday is only meant for entertaintment use, and doesn't lend itself for serious analysis, MLB archives all of the files in XML form, like so

http://gd2.mlb.com/components/game/mlb/year_2009/month_09/day_04/gid_2009_09_04_anamlb_kcamlb_1//pbp/pitchers.xml

These are all of the pitchers on the Royals who pitched today.  If you click on them, you'll notice that it just looks like a bunch of weird shit; however, you can export it to excel by right clicking on the xml file and downloading it to your computer.  Then it organizes itself, and becomes managable through excel.

However, that only allows you to take a look at one game by one pitcher at a time.  If you want to aggregate every single pitch in the majors to do a more detailed study, or compare pitchers start to start, or even look at hitters, you'll have to parse all of the Gameday files to an SQL database.  I recently "wrote" a primer on how to do so, which you can read here:

http://www.beyondtheboxscore.com/2009/8/19/994666/saberizing-a-mac-4-pitch-f-x

It should be relatively easy to follow, and you should *definitely* look in the comment section for more info.  Be warned, it's a daunting task and may take up to a week to do, but it's definitely worthwhile.  

The Data

Whether you are looking at one game or all of the pitchers, you are provided with a boatload of data on each pitch.  Mike Fast put together an excellent description of each field on his blog:

http://fastballs.wordpress.com/2007/08/02/glossary-of-the-gameday-pitch-fields/ 

Read that and bookmark it.  

Analyzing the data

There is a ton of simple, yet revealing, things you can look at, just based on one game using Pitch f/x.  For example, here are all of the pitches thrown by Wainwright in his start against the Giants, when he struck out 12 hitters in 9 innings:

http://spreadsheets.google.com/ccc?key=0AmhtqthzQ8zFdGJpZDJaNENiendic2hPaW1sT1ZHeEE&hl=en

Obviously, his stuff was really good that night.  So how do we quantify that with Pitch f/x?  Well, we can take a look at the two main attributes of a pitchers stuff; velocity and movement.  Velocity is denoted by the heading called "start_speed" (they also track the end speed of each pitch, but that really isn't important as far as I know).  Basic movement is denoted by the "pfx_x" and "pfx_z".  The first one is the vertical movement of the pitch, and the second is the horizontal movement.

Given those two categories, you can reasonably show how good a pitchers' stuff was in a given night; however, first you have to seperate the pitches by pitch type.  Pitch f/x data comes with a pitch type algorythm, but it's often wrong.  Fortunately, it seems to classify Waino pretty well, because he has 4 distinct pitches.  A fastball (don't worry about breaking it up by 2 Seam and 4 Seam yet), slider, curve and change.

The pitches are marked under the heading pitch_type.  FF is 4 seam fastball, FT is 2 seam fastbal (again, just combine the two for now), SL is slider, CU is curve, CH is changeup and KN is knuckleball.

So sort the data by pitch type, and figure out the average start_speed, pfx_x and pfx_z of each of his pitches.  Or, if you want to take the lazy way out, and make a pretty graph at the same time, you can graph out the movement like so:

7_1_medium

 

That graph may seem a little obscure, but it is very informative.  You can see the average velocity on his pitches, and the range of break on each of them.  As you can see, the changeup and fastball have similar movement, with the changeup having a bit more drop to it.  The slider moves about 10 inches to the right (from the catchers point of view) in comparison to those two pitches, and the curveball is way to the right and drops about 10 inches (that's one of the biggest breaking curves in the majors obviously).  That one "fastball" that has the movement of a slider, is probably a slider.

Of course, this is pretty worthless on it's own.  Let's take a look at how his stuff looked against the Braves on April 29th.  That start he gave up 3 runs, and walked 5 hitters while only striking out two.  Here is the data for that start:

http://spreadsheets.google.com/ccc?key=0AmhtqthzQ8zFdGFwd2pnVkl0WHBZNWVsQjU5cnVhaEE&hl=en 

And here is how his stuff looked:

4_29_medium

 

You can see some subtle, yet important differences.  His fastball velocity was over 1 MPH slower, and his slider velocity was faster, meaning the speed differential was worse.  The break on his fastball, changeup and slider was also moved slightly over to the right, while the curveball break held constant, meaning he was getting less seperation on those pitches.

In any given start, there are really 3 things that a pitcher has control over: stuff, location and sequecning.  We already took a look at Waino's stuff, now let's look at his location.  

To plot location on a graph, you select px as the x axis and pz as the y axis.  I like to break it up by pitch type, or pitch outcome (swinging strike, ball, hit, called strike, etc.).  Let's take a look at Waino's night against the Giants by pitch type, with swinging strikes circled:

7_1_location_medium

As you can see, he was downright unhittable that night, totaling 19! swinging strikes.  His curveball was especially good, as he generated 10 swinging strikes on 36 curves.  He was able to pound the 1st Base side of the zone with his curveball and slider, while keeping his fastball always around the strike zone.

These are just one thing that you can do with Pitch f/x.  Other simple things you can look at are:

  • Velocity and movment by inning
  • Location against righties and lefties
  • Pitch selection
  • Where a player gets his swinging strikes
  •  Spin of each pitch
  • Release point

And if you want to take a look at some more complex and actionable things:

  • How a pitcher pitches on the stretch compared to with the bases empty
  • How effective offspeed pitchers are following a fastball in comparison to following an offspeed pitch
  • How location can affect things like GB% and HR/FB ratio
  • How umpires affect individual pitchers and hitters

So play around with the two spreadsheets I gave you, or download your own data.  We are only starting to scratch the surface of what we can do with all this data, and I can guarantee you that it will end up helping major league clubs if it hasn't already.  

You can use this thread to ask questions about Pitch f/x, or have criticisms or propose new ideas for studies.  Or anything else than you can think of.  

Here are some links for further reading on the subject:

http://www.hardballtimes.com/main/article/pitch-identification-tutorial/ 

http://www.sonsofsamhorn.net/wiki/index.php/Pitchfx#The_Basics:_Starting_at_the_Data

http://www.hardballtimes.com/main/article/the-eye-of-the-umpire/

http://www.hardballtimes.com/main/article/inside-the-changeup/

http://www.hardballtimes.com/main/article/what-makes-a-home-run-pitch/

http://www.hardballtimes.com/main/article/a-zone-of-their-own/

http://bjays.wordpress.com/

http://fastballs.wordpress.com/

http://www.sbnation.com/users/Harry%20Pavlidis/blog

http://www.beyondtheboxscore.com/2009/6/3/896845/graphing-201-pitchf-x-flight-paths

http://www.beyondtheboxscore.com/2009/6/2/895971/pitch-f-x-primers

http://baseballanalysts.com/archives/fx_visualizatio_1/

Anything else written by Josh Kalk, Mike Fast, Jon Hale, Harry Pavlidis, Dave Allen, Jeff Zimmerman or Alan Nathan.

And some of my own work (/shameless self promotion):

http://www.hardballtimes.com/main/blog_article/measuring-the-umpires-affect-on-the-game/

http://www.drivelinemechanics.com/2009/8/7/979394/kyle-lohses-triumphiant-return

Comment 38 comments  |  18 recs  | 

Do you like this story?

Comments

Display:

+1

a rec for you

No excuses. No injuries. No "better luck next time"
Do it, and shut the f—- up.
-Reggie Jackson

by stlwcards on Sep 5, 2009 11:07 AM EDT up reply actions  

indeed

and a million thank you(s) for thinking of this

"Ludwick, I could kiss you on the nuts!" - the red baron 7-29-09

* sarcasm might be involved in this comment

by mattyfrommo on Sep 5, 2009 12:56 PM EDT up reply actions  

Also, for a lot of tagged and archived data:

check here

They say that it's never too late, but you don't get any younger...

by Valatan on Sep 5, 2009 9:22 PM EDT reply actions  

Great idea for a post.

Well done, sir.

"I'm gonna throw the nastiest curveball I have ever thrown...if he hits it, I'll tip my cap, but if not we're going to the Series."

--Adam Wainwright on the final pitch of the 2006 NLCS

by bgh on Sep 6, 2009 2:06 PM EDT reply actions  

Thanks for doing this

I think it is very important to understand what a system is designed to do and what it’s capabilities are. Otherwise you are prone to making inappropriate conclusions or unfair criticisms.

VivaElBirdos: Celebrating glorious mustaches since 2009

by redbirdnation8206 on Sep 6, 2009 4:27 PM EDT reply actions  

cool

nice info.

Felonius Monk - bitching to contact since 2008

by Felonius_Monk on Sep 7, 2009 7:50 AM EDT reply actions  

Manifest Excellence.

I’m know I’m echoing everyone above, but this is fine work. Simple, straightforward, and informative… this is precisely the type of post that hooked me on Viva el Birdos and keeps me coming back.

-- Aidan Sonoda
R.I.P. Nick Adenhart - 4/9/09
In necessariis unitas, in dubiis libertas, in omnibus caritas.

by Aidan Sonoda on Sep 8, 2009 5:41 PM EDT reply actions  

Just FYI, I made this thread so that we could actually discuss PItch f/x :)

I appreciate the praise, but I think it would be more benefitial if you guys had some specific questions.

Smoltz.

by vivaelpujols on Sep 8, 2009 8:30 PM EDT reply actions  

you suck!

pretzels pretzels pretzels pretzels

by gdm426 on Sep 9, 2009 1:30 AM EDT up reply actions  

So, screwballs...

…wait, no. Never mind.

VivaElBirdos: Celebrating glorious mustaches since 2009

by redbirdnation8206 on Sep 8, 2009 9:43 PM EDT up reply actions  

Mitch Williams is a liar

“Most of Mike Jacobs’ home runs come on curveballs”

3 of his homers this year have come off of offspeed pitches.

Smoltz.

by vivaelpujols on Sep 8, 2009 11:04 PM EDT reply actions  

So, how sweet is it going to be when Hit F/X takes off?

"Of course Kolby Rasmus was going deep! That’s what Kolby Rasmus does! You don’t give Kolby Rasmus second chances!" -Kolby Rasmus

by hazel on Sep 8, 2009 11:56 PM EDT reply actions  

whoshotthewhatnow?

"Of course Kolby Rasmus was going deep! That’s what Kolby Rasmus does! You don’t give Kolby Rasmus second chances!" -Kolby Rasmus

by hazel on Sep 9, 2009 2:00 AM EDT up reply actions  

A lot of the previous "discussion" focused on the classification algorithm

I’m curious what the standard methods for dealing with pitch classification are (and just for the record, I understand that this is a fundamentally different thing from the pitch f/x system).

Are the gates manually determined (seems like it would be hard in such a high-dimensional space) or is some type of machine learning used? If so, I’d assume things are mostly done through supervised algorithms, though based on the separation in the plots above, I would think unsupervised ones could do a decent job as well.

I’ve got a lot of machine learning experience (in application to biological data, for the most part), so I’m just curious which methods have been most widely adopted for these applications in baseball (and why, if it’s known).

by brackenthebox on Sep 9, 2009 10:54 AM EDT reply actions  

alright, a little digging online

says that MLBAM uses neural nets for online classification (in gameday). The training data came from 3000 pitches from 2007. There’s also a weighting term to favor pitches known to be in a pitchers repertoire.

That should mean that if thepainguy were to classify 3000 pitches of his own, we could get him his own personalized classification system, using his definitions of pitches (instead of whoever made those first 3000).

by brackenthebox on Sep 9, 2009 11:06 AM EDT up reply actions  

I doesn't seem like it needs to be that complicated

You can classify pitches pretty easily based on velo, spin and movement. That’s how I do it, although I can imagine it would be tougher for some pitchers.

Smoltz.

by vivaelpujols on Sep 9, 2009 5:32 PM EDT up reply actions  

One thing that took me forever to realize...

…is that the points on the graph above the imaginary x axis weren’t breaking upwards, just breaking downwards less than they would have from the natural effects of gravity.

that might make me an idiot (probably) but it seems like something that’s not fully explained on most pitch f/x tutorials.

by JohnMatuszakloveschunk on Sep 10, 2009 4:07 PM EDT reply actions  

Right

It IS breaking up in comparison to a pitch without spin, but obviously it’s impossible for it to actually break up due to gravity.

Smoltz.

by vivaelpujols on Sep 10, 2009 8:17 PM EDT up reply actions  

It's not true that it's obvious that it can't break up due to gravity

Airplanes work, after all. It’s not really possible for a human to put that much spin on the ball, but a ball with enough spin on it to break up (for a while) is theoretically possible.

They say that it's never too late, but you don't get any younger...

by Valatan on Sep 11, 2009 9:32 AM EDT up reply actions  

It would take a few times the current RPM,

or a pretty substantial speed increase.

Then you’d have an uppercutting, 10,000 RPM backspin, 150 MPH fastball tho, which sounds pretty sweet.

"Of course Kolby Rasmus was going deep! That’s what Kolby Rasmus does! You don’t give Kolby Rasmus second chances!" -Kolby Rasmus

by hazel on Sep 11, 2009 3:57 PM EDT up reply actions  

which makes me think...

You could probably do it with something light and better at catching the air, like a wiffle ball.

They say that it's never too late, but you don't get any younger...

by Valatan on Sep 11, 2009 4:03 PM EDT up reply actions  

Whiffleballs undoubtedly rise

I’m pretty sure softballs rise too. Increased surface area goes a long way.

Not afraid to nitpick

by joker24 on Sep 13, 2009 11:58 PM EDT up reply actions  

Softballs rise because they're thrown underhand...

"Of course Kolby Rasmus was going deep! That’s what Kolby Rasmus does! You don’t give Kolby Rasmus second chances!" -Kolby Rasmus

by hazel on Sep 15, 2009 9:59 AM EDT up reply actions  

I was gonna say that, but it seemed too obvious.

"I’m going to come after you." - Chris Carpenter

by spants on Sep 15, 2009 10:51 AM EDT up reply actions  

Magnus effect yo.

Felonius Monk - bitching to contact since 2008

by Felonius_Monk on Sep 11, 2009 6:23 AM EDT up reply actions  

Comments For This Post Are Closed


User Tools

The Internet's #1 St. Louis Cardinals blog.

FanPosts

Community blog posts and discussion.

Recommended FanPosts

649494__1__small
Hall of WAR: Part 2

Recent FanPosts

Dsc01844_small
Cardinals take the Governor's Joplin Challenge, will help build 35 homes for torando victims
St-louis-cardinals-script_small
Best Cardinals of All-Time - Relief Pitching Edition
St-louis-cardinals-script_small
Best Cardinals of All-Time - Starting Pitching Edition
Small
Two Trades That Set the Cards Back in the 70s
Nyc_small
Cardinals Offense vs. Reds Offense - 2012
Nyc_small
Cardinals Rotation vs. Reds Rotation - 2012
St-louis-cardinals-script_small
Best Cardinals by Position - Center Fielders
St-louis-cardinals-script_small
Best Cardinals by Position - Corner Outfielders
Stl_gay_small
2011 League Minimum All Star Team

+ New FanPost All FanPosts >


Managers

Jack_benny__1__small DanUpBaby

Editors

Bendermad_small azruavatar

Trigun_001_small the red baron

Images_small tom s.

Authors

1989_bgh_cropped_small bgh

Valverde_medium_small vivaelpujols