Sports Analytics in Practice with R
Реклама. ООО «ЛитРес», ИНН: 7719571260.
Оглавление
Ted Kwartler. Sports Analytics in Practice with R
Sports Analytics in Practice with R
Contents
List of Illustrations
List of Tables
Guide
Pages
Preface
Author Biography
Foreword
1 Introduction to R. Objectives
R Libraries
R Functions
The R Programming Language
Applying R Basics to Real Data
Positives and Negatives of R
Exercises
2 Data Visualization Best Practices. Objectives
R Libraries
R Functions
Sports Context
Plotting Best Practices and Static Images
Interactive Plots
Next Steps
Notes
3 Geospatial Data Understanding Changing Baseball Player Behavior. Objectives
R Libraries
R Functions
Sports Context
Code
Examining a Single Pitcher Analytically
Examining a Single Batter Analytically
Extending the Chapter Methods
Exercises
Notes
4 Evaluating Players for the Football Draft. Objectives
R Libraries
R Functions
Sports Context
Technical Context
KNN—Supervised Learning: Binary Classification
KNN—Supervised Learning: Multi-class Classification
Spherical K-means
Code—Binary Classification
Code—Multi-Class Classification
Code—Continuous Regression
Code—Unsupervised Learning (Clustering)
Extending the Approaches Employed
Exercises
Notes
5 Logistic Regression Explaining Basketball Wins and Losses with Coefficients. Objectives
R Libraries
R Functions
Sports Context
Technical Context
Code- Explaining Complexity with a Model’s Parameters
Extending the Method Demonstrated
Exercises
Notes
6 Gauging Fan Sentiment in Cricket. Objectives
R Libraries
R Functions
Sports Context
Technical Context
NLP-specific Terms
Code
Extending the Approaches Employed
Exercises
Notes
7 Gambling Optimization. Objectives
R Libraries
R Functions
Chapter Caveat
Sports Context
Technical Context
Complete Code—Linear Programming
Extend the Methods Employed
Exercises
Notes
8 Exploratory Data Analysis Searching Data for Opponent Insights. Objectives
R Libraries
R Functions
Sports Context
Technical Context
Code- Exploratory Data Analysis
Exercises
Notes
Index
WILEY END USER LICENSE AGREEMENT
Отрывок из книги
Ted Kwartler Harvard Extension School Adjunct, Faculty of Arts & Sciences Maynard, MA
This book has been a long journey in the making. Originally the book’s scope was centered on individualized chapters demonstrating analytical techniques within a sports context. The goal is that a reader inherits various tools that act as a foundation for analysis to build upon and add complexity with subsequent analyses as the reader’s technical acumen and sports interests grow. Each chapter is meant to be a standalone reference as the reader explores and learns. This also frees up the reader to focus on topics of interest. For example, a reader may not want to learn about natural language processing so could skip that chapter altogether to focus on another subject such as optimizing a fantasy football lineup. The book’s undertaking grew in complexity due to a personal commitment to demonstrate concepts on diverse data sets including Paralympic athletes, female soccer and basketball, and less US-centric popular sports including cricket in addition to the more typically demonstrated sports analyses of men’s football, baseball, and basketball. My goal is to make the subject accessible and relevant to many in the analytics field despite this effort slowing the book’s creation. Keep in mind a chapter’s concepts can be applied to many sports domains. For example, the text analysis applied to cricket fan forum posts can easily be applied to men’s basketball fan tweets or forum posts. Each chapter’s takeaway is meant to be a broadly useful tool, not a brittle or narrowly focused analysis. Additionally, the book was delayed due to the pandemic’s effect on the sports-world. Admittedly the shortened seasons, canceled games, and other changes that created outlier statistics pales in comparison to the pandemic’s hardship and humanistic impact outside of sports. Despite these challenges, the book’s end result was worth the delay. The final product covers many diverse concepts, and data, encouraging analytics professionals to enjoy the intersection of sports and analysis.
.....
Indexing also works for entire columns or entire rows. This is done by leaving the rows position blank or the columns position blank on either side of the comma. To call the second column of the data frame simply use single brackets, nothing on the left of the comma and a 2 to the right of the comma as shown.
xDataFrame[, 2]
.....