{"id":2004,"date":"2021-05-10T04:55:45","date_gmt":"2021-05-10T04:55:45","guid":{"rendered":"http:\/\/optimumsportsperformance.com\/blog\/?p=2004"},"modified":"2021-05-10T22:58:44","modified_gmt":"2021-05-10T22:58:44","slug":"tidyx-59-pitchf-x-classification-with-class-imbalance","status":"publish","type":"post","link":"https:\/\/optimumsportsperformance.com\/blog\/tidyx-59-pitchf-x-classification-with-class-imbalance\/","title":{"rendered":"TidyX 59: pitchf\/x classification with class imbalance"},"content":{"rendered":"<p>In the past 6 episodes of this series, <strong><a href=\"https:\/\/twitter.com\/ellis_hughes\"><span style=\"color: #0000ff;\">Ellis Hughes<\/span><\/a><\/strong> and I have been working on developing a pitchf\/x classification model using data from the {<strong>mlbgameday<\/strong>} package. Along the way we&#8217;ve mentioned that the data has a large class imbalance, with the majority class being the four seam fastball (FF).<\/p>\n<p>This week, we discuss the approach of up and down sampling your data as a potential way of trying to address this class imbalance issue. We conclude by comparing our up and down sampled models by giving an intro to log-loss, Brier score, and AUC. Next week, we will wrap up this series by comparing all of our models using those three measures.<\/p>\n<p>To watch our screen cast, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.youtube.com\/watch?v=6-y1iEbDQVs\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n<p>To access our code, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/github.com\/thebioengineer\/TidyX\/tree\/master\/TidyTuesday_Explained\/059-MLB_pitch_classification_7\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n<p>For previous episodes in this series:<\/p>\n<ol>\n<li><span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/optimumsportsperformance.com\/blog\/tidyx-53-mlb-pitch-classification-series-eda-hierarchical-clustering\/\">Episode 53: Pitch Classification &amp; EDA<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/optimumsportsperformance.com\/blog\/tidyx-54-mlb-pitch-classification-series-knn-umap\/\">Episode 54: KNN &amp; UMAP<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/optimumsportsperformance.com\/blog\/tidyx-55-decision-trees-random-forest-optimization\/\">Episode 55: Decision Trees, Random Forest, &amp; Optimization<\/a><\/strong><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/optimumsportsperformance.com\/blog\/tidyx-56-xgboost-for-pitchf-x-classification\/\">Episode 56: XGBoost<\/a><\/strong><\/span><\/li>\n<li><strong><a href=\"https:\/\/optimumsportsperformance.com\/blog\/tidyx-57-naive-bayes-classifier-for-pitchf-x-classification\/\"><span style=\"color: #0000ff;\">Episode 57: Naive Bayes Classifier<\/span><\/a><\/strong><\/li>\n<li><strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/optimumsportsperformance.com\/blog\/tidyx-58-tensorflow-neural-network-for-pitchf-x-classification\/\">Episode 58: Tensorflow Neural Network<\/a><\/span><\/strong><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>In the past 6 episodes of this series, Ellis Hughes and I have been working on developing a pitchf\/x classification model using data from the {mlbgameday} package. Along the way we&#8217;ve mentioned that the data has a large class imbalance, with the majority class being the four seam fastball (FF). This week, we discuss the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-2004","post","type-post","status-publish","format-standard","hentry","category-tidyx-screen-cast"],"_links":{"self":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/comments?post=2004"}],"version-history":[{"count":4,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2004\/revisions"}],"predecessor-version":[{"id":2009,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2004\/revisions\/2009"}],"wp:attachment":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/media?parent=2004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/categories?post=2004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/tags?post=2004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}