Sweet Spotting

INFO 523 - Summer 2025 - Final Project

Trevor Abshire

Introduction

Question:

  • Can we predict if a batter will get a hit with swing metrics (launch angle, launch speed) along with pitch metrics (effective speed, zone)?

Strike Zone

Column Definitions

Some columns to consider…

  • effective_speed – Speed adjusted based on the pitcher’s release extension
  • zone – Zone location of the ball when it crosses the plate
  • launch_speed – Exit velocity of the batted ball as tracked by Statcast. Estimates are included for batted balls not tracked directly
  • launch_angle – Launch angle of the batted ball as tracked by Statcast

Statcast Data after Transformation

     Unnamed: 0  batter     pitcher_name   game_date stand p_throws  \
13           13  663898    Ginkel, Kevin  2024-03-31     R        R   
38           38  678662   Thompson, Ryan  2024-03-31     R        R   
57           57  595909   McGough, Scott  2024-03-31     L        R   
81           81  666971    Feltner, Ryan  2024-03-31     R        R   
112         112  607732  Pfaadt, Brandon  2024-03-31     R        R   

    pitch_type  effective_speed  pfx_x  pfx_z  ...  zone    description  \
13          FF             96.6  -0.72   1.19  ...   6.0  hit_into_play   
38          SI             90.8  -1.04  -0.67  ...   5.0  hit_into_play   
57          FF             93.1  -0.66   1.36  ...   4.0  hit_into_play   
81          FF             97.3  -0.53   1.15  ...   4.0  hit_into_play   
112         ST             84.5   0.90   0.62  ...   6.0  hit_into_play   

     launch_speed launch_angle    hc_x    hc_y  if_fielding_alignment  events  \
13           96.8         11.0  146.19   77.91               Standard  single   
38          104.5          4.0  125.28  132.20               Standard  single   
57           96.9        -26.0   72.00  128.04              Strategic  single   
81          105.9         19.0   25.57   93.97              Strategic  double   
112          82.2         14.0  102.86  111.71               Standard  single   

             batter_name pitch_group  
13       Brendan Rodgers    Fastball  
38        Ezequiel Tovar    Fastball  
57                   NaN    Fastball  
81   Lourdes Gurriel Jr.    Fastball  
112      Jacob Stallings   Curveball  

[5 rows x 22 columns]

Launch Speed Distribution

Launch Speed & Angle Sweet Spot

Launch Speed by Zone

Modeling

First Model

Classification Report:
               precision    recall  f1-score   support

           0       0.83      0.88      0.85      4252
           1       0.75      0.66      0.70      2275

    accuracy                           0.80      6527
   macro avg       0.79      0.77      0.78      6527
weighted avg       0.80      0.80      0.80      6527

ROC AUC Score: 0.8605127515945954

Top 10 Important Features:
              feature  importance
8       launch_angle    0.280981
7       launch_speed    0.212495
0    effective_speed    0.086560
1              pfx_x    0.086249
2              pfx_z    0.086008
4            plate_z    0.085883
3            plate_x    0.084925
5               zone    0.032631
9            stand_R    0.010265
6  is_same_hit_pitch    0.009954

First Model - Continued

Retrain Model (2 Swing Features, 2 Pitch Features)

Classification Report:
               precision    recall  f1-score   support

           0       0.82      0.87      0.84      4252
           1       0.72      0.64      0.68      2275

    accuracy                           0.79      6527
   macro avg       0.77      0.76      0.76      6527
weighted avg       0.79      0.79      0.79      6527

ROC AUC Score: 0.8566956984689816

Probability Interactive Slider