Digital Library

Soccer Analytics with Machine Learning Learning Predictive Modeling Techniques with Sports Data (Haipeng Gao, Ari Joury, Weining Shen etc.)(Z-Library)

Haipeng Gao, Ari Joury, Weining Shen, Guanyu Hu

Soccer Analytics with Machine Learning Learning Predictive Modeling Techniques with Sports Data (Haipeng Gao, Ari Joury, Weining Shen etc.)(Z-Library)

Author Haipeng Gao, Ari Joury, Weining Shen, Guanyu Hu

ai

Struggling to grasp machine learning concepts or unsure how to apply them in the real world? This book aims to change that by using the world's most popular game—soccer—to illuminate key concepts in predictive modeling and data science. Whether you're a complete beginner or you're interested in entering the burgeoning field of sports analytics, you'll develop a solid foundation in machine learning through engaging examples that bridge academic principles with practical applications. Written by experts in both machine learning and sports analytics, this practical Python-focused guide introduces fundamental data science techniques using real soccer data. Ideal for students, analysts, and soccer fans alike, it offers instructions on models and techniques such as logistic regression, random forests, deep learning, simulations, and feature engineering. But instead of memorizing algorithms, you'll learn by building predictive models to analyze match outcomes, test betting strategies, run simulated game scenarios, and more.

Format PDF
Size 4.8 MB
17
Views
0
Downloads
0.00
Total Donations

Text Preview (First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
(This page has no text content)
Page 2
Praise for Soccer Analytics with Machine Learning Data is everywhere, and this book proves it. While the beautiful game is loved the world over, few have dared to apply the rigorous scalpel of data analysis to such a complex environment, until now. This is a fantastic resource. The insights are accessible, the examples are clear, and the methods are immediately applicable across the field. A must-read for anyone looking to bridge the gap between soccer and machine learning. —Otu Ekanem, CTO, Kanopy AM Few books manage to be genuinely useful to both the soccer obsessive and the machine learning practitioner. This one is. From expected goals to ensemble methods, it covers the field with clarity, honesty about uncertainty, and a deep appreciation for the game itself. —Matteus Tanha, AI consultant Finally a book that teaches machine learning the way science actually works: on real, messy data, building the judgment to know when and how models work, not just the skills to build them. —Louis Delloye, senior R&D strategy analyst, Sanofi An engaging, practical guide that combines soccer passion with modern machine learning. This book will help readers turn real match data into meaningful insights and predictive models. —Alexander Aue, professor of statistics, University of California, Davis
Page 3
Soccer Analytics with Machine Learning Learning Predictive Modeling Techniques with Sports Data Haipeng Gao, Ari Joury, Weining Shen, and Guanyu Hu
Page 4
Soccer Analytics with Machine Learning by Haipeng Gao, Ari Joury, Weining Shen, and Guanyu Hu Copyright © 2026 Haipeng Gao, Ari Joury, Weining Shen, and Guanyu Hu. All rights reserved. Published by O’Reilly Media, Inc., 141 Stony Circle, Suite 195, Santa Rosa, CA 95401. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com. Acquisitions Editor: Michelle Smith Development Editor: Jeff Bleiel Production Editor: Clare Laylock Copyeditor: Sharon Wilkey Proofreader: Laura K. Miller Indexer: Krsta Technology Solutions Cover Designer: Susan Brown Cover Illustrator: Monica Kamsvaag Interior Designer: David Futato Interior Illustrator: Kate Dullea June 2026: First Edition
Page 5
Revision History for the First Edition 2026-06-15: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781098181116 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Soccer Analytics with Machine Learning, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. The views expressed in this work are those of the authors and do not represent the publisher’s views. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights. This book is not intended as financial advice. Please consult a qualified professional if you require financial advice. 978-1-098-18111-6 [LSI]
Page 6
Preface Soccer has always been a game driven by passion, intuition, and endless debate. For decades, it has been the world’s most watched and discussed sport, supported by the largest global fan base on the planet. Fans love it not only for its results, but for the stories, emotions, memories, and moments of uncertainty—or what we sometimes call miracles—that it creates. In recent years, this traditional way of enjoying soccer has been joined by something new: data. Advances in artificial intelligence (AI) and machine learning, combined with the growing availability of high-quality sports data and modern computing infrastructure, have made rigorous analysis accessible far beyond professional clubs and research labs. Today, fans and practitioners alike can explore tactics, evaluate performance, and make predictions—sometimes out of curiosity, sometimes for strategic insight, and sometimes as part of casual, responsible betting. With these tools, independent analysis is no longer limited to professionals. What excites us most about this shift is not only the technology itself but also what it enables. Data-driven methods encourage clearer thinking, more disciplined reasoning, and a deeper appreciation of soccer’s complexity. They do not replace passion or intuition; they sharpen them. This book sits at the intersection of two fast-moving worlds: soccer and machine learning. Soccer provides rich, imperfect, and fascinating data; machine learning offers principled ways to engage with it. Together, they form an ideal setting for learning data analytics and predictive modeling in a concrete, motivating, and immediately applicable way. The timing of this book is particularly meaningful. Its publication in 2026 comes during the FIFA World Cup, a moment when global attention, curiosity, and debate around soccer peak. As fans analyze matches, tactics, and outcomes with renewed intensity, this book offers an opportunity to engage more deeply with the game—to learn, experiment, and think
Page 7
critically about soccer through data and machine learning when interest is at its highest. Who Should Read This Book This book is written for soccer fans who want to explore the analytical side of the game. Readers should be willing to work with code and data, but no specialized technical background is required beyond basic programming familiarity and a general understanding of soccer. No prior experience with sports analytics is assumed. More broadly, the book is ideal for anyone who wants to learn machine learning through real, meaningful problems rather than abstract exercises. This includes the following: Students of data science, statistics, optimization, computer science, or sports analytics Professionals seeking to strengthen applied machine learning skills Educators looking for engaging, hands-on material to teach predictive modeling Why We Wrote This Book Throughout our careers—in academia, industry, and teaching—we noticed a gap: no resource combined methodological rigor with hands-on practice, grounded in a single, coherent domain. Many machine learning books are abstract; many sports analytics resources are narrow or assume prior expertise. This book attempts to fill that gap. It reflects a collaboration between industry and academic authors, blending hands-on experience with large- scale, real-world systems and deep expertise in statistics and sports analytics. It is the book we would have wanted when first applying machine
Page 8
learning to real data: practical, honest about limitations, and focused on building intuition as much as building models. Our goal is that readers finish this book not only knowing how to implement predictive models, but also understanding why certain approaches work, when they fail, and how the same ideas can be applied beyond soccer to other real-world problems. Navigating This Book The book is organized to guide readers from context and fundamentals to advanced modeling techniques and practical applications: Chapter 1 introduces the field, motivates the book’s focus, and frames the main analytical questions. Chapter 2 establishes the Python-based workflow used throughout the book. Chapter 3 covers core statistics, visualizations, and habits for understanding data in soccer datasets. Chapter 4 develops regression-based prediction for continuous and count outcomes. Chapter 5 introduces binary and multiclass classification tasks such as expected goals and match-result prediction. Chapter 6 extends the classification toolkit with tree-based and ensemble methods. Chapter 7 introduces neural networks and hands-on deep learning workflows. Chapter 8 shows how domain knowledge and data representation can significantly improve model performance. Chapter 9 examines betting, optimization, risk, and decision making under uncertainty.
Page 9
Chapter 10 draws the main ideas together and points toward future applications and further study. The Appendix and Glossary provide references and terminology to support ongoing learning. Conventions Used in This Book The following typographical conventions are used in this book: Italic Indicates new terms, URLs, email addresses, filenames, and file extensions. Constant width Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords. Constant width bold Shows commands or other text that should be typed literally by the user. Constant width italic Shows text that should be replaced with user-supplied values or by values determined by context. TIP This element signifies a tip or suggestion. NOTE This element signifies a general note.
Page 10
WARNING This element indicates a warning or caution. Using Code Examples For the latest book updates, additional resources, and related information, visit https://SoccerAnalyticsML.com. Companion code, exercises, and supplemental material are available at https://oreil.ly/supp_SoccerAnalytics. If you have a technical question or a problem using the code examples, please send an email to support@oreilly.com. This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission. We appreciate, but generally do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: Soccer Analytics with Machine Learning by Haipeng Gao, Ari Joury, Weining Shen, and Guanyu Hu (O’Reilly). Copyright 2026 Haipeng Gao, Ari Joury, Weining Shen, and Guanyu Hu, 978-1-098-18111-6. If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at permissions@oreilly.com. O’Reilly Online Learning
Page 11
NOTE For more than 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed. Our unique network of experts and innovators share their knowledge and expertise through books, articles, and our online learning platform. O’Reilly’s online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from O’Reilly and 200+ other publishers. For more information, visit https://oreilly.com. How to Contact Us Please address comments and questions concerning this book to the publisher: O’Reilly Media, Inc. 141 Stony Circle, Suite 195 Santa Rosa, CA 95401 800-889-8969 (in the United States or Canada) 707-827-7019 (international or local) 707-829-0104 (fax) support@oreilly.com https://oreilly.com/about/contact.html
Page 12
We have a web page for this book, where we list errata and any additional information. You can access this page at https://oreil.ly/soccer- analytics_ML. For news and information about our books and courses, visit https://oreilly.com. Find us on LinkedIn: https://linkedin.com/company/oreilly. Watch us on YouTube: https://youtube.com/oreillymedia. Acknowledgments This book would not have been possible without the support of our families, who patiently accepted the time and energy this project required. We are grateful to colleagues and collaborators who challenged our thinking, tested our ideas, and offered valuable feedback. We also want to express our sincere thanks to the reviewers who read the manuscript so carefully and helped strengthen it in important ways. Their comments, corrections, questions, and suggestions pushed us to make this book clearer, more accurate, and more useful. We are especially grateful to Laurie Shaw, Poli Garcia, and Ijlal Amir, as well as to the reviewers who chose to remain anonymous, for the time, care, and thoughtful feedback they brought to the review process. Our thanks also go to the editorial team at O’Reilly. We are grateful to senior acquisitions editor Michelle Smith, development editor Jeff Bleiel, and production editor Clare Laylock for their support and guidance throughout the development and publication of this book. We greatly appreciated the opportunity to work with all of you. Last but not least, we want to thank the broader soccer analytics and open source communities. The shared datasets, tools, discussions, and collective curiosity within these communities made this work possible and remind us that progress in both soccer and data science is a collective effort.
Page 13
Chapter 1. The Soccer Analytics Landscape It is Saturday evening. You are at home watching Liverpool play. Before kickoff, you placed a small, casual bet on them to win—not as a professional strategy, but simply to make the match more engaging. As the game unfolds, your phone rests nearby with a live betting app open. The win probability updates continuously. Liverpool strings together several passes in the opponent’s half. The probability shifts from 54% to 57%. A sudden counterattack follows. A dangerous shot. The probability drops to 49%. The score has not changed. Yet your confidence moves with the numbers. This experience captures a defining feature of modern soccer: the game is no longer interpreted solely through narrative and intuition. Increasingly, it is accompanied—and often understood—through probabilities. But when a model assigns a 49% chance of victory, several natural questions immediately arise. What determines those probabilities? What assumptions underlie that number? How stable are these estimates? How should we interpret them? Which signals in the data are meaningful, and which are merely noise? Answering these questions requires understanding the unique analytical challenges of soccer. The sport is low scoring and highly variable. Outcomes often hinge on a small number of events. Apparent dominance may not translate into goals, while short-term performance swings may reflect randomness rather than structural change. Human perception gravitates toward memorable moments; statistical reasoning, in contrast, requires consistency across many moments. Soccer analytics exists within this tension. This chapter provides an overview of the modern soccer analytics landscape. We discuss the types of
Page 14
questions soccer analytics seeks to answer, the kinds of data available, the perspectives through which analysis can be conducted, the modeling approaches commonly used, and the conceptual principles that guide disciplined evaluation. Using the preceding example, we introduce the broader scope of what soccer analytics is and how it is applied. Equally important, this chapter also clarifies the scope of this book. Soccer analytics is a broad field, and covering every aspect would be impossible. Instead, we deliberately focus on a narrower domain: constructing predictive models that are rigorous enough to illustrate fundamental analytical tools while remaining accessible to readers. By attempting to answer several classic yet interesting questions in soccer analysis, we hope the topics explored in this book will draw you into the field of soccer analytics and equip you with the modern analytical toolkit needed to further explore and advance the discipline. The Problems That Soccer Analytics Helps Solve Soccer analytics is not pursued simply for intellectual curiosity. In practice, it exists to support decisions. Across professional clubs, leagues, media organizations, and betting markets, data-driven analysis helps answer a wide range of operational and strategic questions. The resulting decisions vary in scale—from real-time tactical adjustments during a match to long-term roster construction and financial planning. Understanding these decision contexts clarifies why analytics has become an integral part of modern soccer organizations. Soccer Clubs: Making Decisions Across the Organization Within professional soccer clubs, analytics supports a wide range of decisions across coaching, player management, and organizational
Page 15
operations. Match preparation and tactical decisions One of the most visible applications of analytics lies in match preparation and tactical planning. Coaching staffs must evaluate opponents, determine formations, select starting lineups, and plan substitution strategies. These decisions often rely on a combination of experience, video review, and statistical analysis. Data analysts contribute by examining patterns across historical matches and identifying measurable tendencies. For example, analysts may evaluate how a team performs under different pressing intensities, how certain formations influence shot creation, or how substitution timing affects late- game scoring probabilities. Typical questions analysts help address include the following: Which tactical setups historically perform best against a specific opponent? How does pressing intensity influence defensive stability? When does fatigue begin to meaningfully affect defensive performance? Which lineup combinations produce the most stable attacking structure? Analytics does not replace coaching judgment. Instead, it provides structured evidence that complements tactical expertise and observational insight. Player recruitment and roster management Another major application of soccer analytics lies in player recruitment and long-term roster construction. Professional clubs operate within financial constraints and competitive pressures. Decisions about signing, selling, or extending players often
Page 16
involve large financial commitments. Analytics helps reduce uncertainty in these decisions by identifying measurable performance indicators and projecting future contributions. Recruitment departments frequently combine scouting reports with statistical profiles derived from historical event data. Analysts may evaluate how well a player’s production translates across leagues, whether their style fits a specific tactical system, and how performance evolves across age ranges. In practice, analysts often help answer questions such as these: Which players produce the highest expected goal contribution relative to their role? How stable are a player’s performance metrics across seasons? How likely is a player’s performance to translate into a different league or tactical system? What is a player’s projected performance trajectory over the next several seasons? These insights support transfer strategy, contract negotiations, and long- term roster planning. Player performance and development Modern clubs also rely on analytics to support athlete development and health management. Advances in sports science and wearable technology have enabled teams to collect detailed physiological and workload data. GPS tracking, heart-rate monitors, and training metrics allow performance staff to monitor player fatigue, recovery patterns, and injury risk. Data analysts working alongside sports scientists and medical staff help translate this information into actionable insights. For example, analytics can help answer questions such as these: How does cumulative training load influence injury risk?
Page 17
Which workload patterns improve performance without increasing fatigue? How does match congestion affect sprint output and recovery? What training interventions best support long-term player development? These analyses support evidence-based training programs and help ensure that players remain healthy and available throughout the season. Club operations and fan engagement Professional soccer organizations are also complex businesses. Beyond the pitch, teams must manage ticket sales, marketing campaigns, sponsorship partnerships, and fan engagement. Analytics plays an increasingly important role in these operations. Teams may develop predictive models to forecast ticket demand, optimize dynamic pricing strategies, or identify segments of fans most likely to respond to specific promotions. Digital engagement data—from mobile apps, streaming platforms, and social media—also provides insight into fan behavior. Typical analytical questions in this domain include the following: How should ticket prices adjust based on opponent strength and demand? Which marketing campaigns generate the highest fan engagement? How can clubs improve fan retention across seasons? Which digital platforms drive the most interaction with supporters? Although these business applications fall outside the technical scope of this book, they illustrate the broader organizational role of analytics within professional sports.
Page 18
Betting Markets: Modeling Uncertainty and Pricing Outcomes Soccer analytics also plays a central role in sports betting markets. Bookmakers such as bet365, DraftKings, and other betting platforms must set odds that reflect the probability of multiple match outcomes. These odds act as market prices that allow betting activity to occur while also managing the financial exposure of the bookmaker. In practice, odds must strike a careful balance: they must be accurate enough to reflect the underlying probabilities of outcomes while also accounting for market behavior and betting volume. To accomplish this, bookmakers rely on statistical models that estimate probabilities for events such as match outcomes, total goals, scorelines, and other in-game occurrences. These models typically incorporate large historical datasets that capture team performance, scoring patterns, and contextual factors. Variables may include measures of team strength, recent form, home-field advantage, injuries, travel schedules, and historical head- to-head matchups. Many betting models build upon classical statistical frameworks such as Poisson goal models, which estimate the expected number of goals scored by each team. More advanced systems may incorporate machine learning methods that combine hundreds of predictive features derived from event data, rankings, and market information. The objective of these models is not perfect prediction. Soccer remains a low-scoring and high-variance sport, where rare events and randomness can strongly influence outcomes. Instead, bookmakers aim to produce well- calibrated probabilities that allow markets to function efficiently while maintaining balanced risk exposure. In addition to internal modeling, bookmakers must also react to the behavior of the betting market itself. When large volumes of wagers arrive on one side of a market, odds may adjust to rebalance risk. As a result, betting markets represent an interaction between statistical forecasting and market dynamics.
Page 19
Because betting markets update continuously as new information arrives— lineups, injuries, weather conditions, or match events—probabilistic modeling and uncertainty estimation are central to their operation. Live betting systems in particular must update probabilities in real time as the match state evolves. For analysts and researchers, betting markets also provide a useful benchmark. Because odds reflect the aggregated expectations of sophisticated models and informed bettors, they are often treated as a reference point when evaluating predictive models in soccer analytics. Fans and Analysts: Reading the Game Beyond the Scoreline Finally, soccer analytics is not limited to professional organizations. Fans and independent analysts increasingly use data and statistical models to better understand the game. In many cases, this engagement begins with simple curiosity: estimating the probability that a team will win, comparing performance trends over time, or exploring which factors most strongly influence match outcomes. For some fans, building predictive models becomes an engaging way to interact with the sport, transforming passive viewing into an active analytical exercise. This perspective connects directly to the scenario that opened this chapter. A fan watching a match may notice live win probabilities shifting from 54% to 57%, then falling again after a counterattack. Behind those numbers are statistical models trained on large collections of historical match data, continuously updating as the state of the game changes. For independent analysts and enthusiasts, building such models can be both educational and entertaining. It provides a hands-on way to explore statistical reasoning, machine learning methods, and the dynamics of a complex sport. Through experimentation with data, fans can test hypotheses, evaluate predictive signals, and develop a deeper understanding of how performance translates into outcomes. This book is written largely
Page 20
for this audience: readers who want to understand how predictive models in soccer are constructed, evaluated, and interpreted using real data. Soccer analytics therefore sits at the intersection of sport, data science, and decision making. From tactical preparation to roster construction, from player development to betting markets—and even fan curiosity—analytical tools help structure reasoning under uncertainty. The Data-Driven Evolution in Soccer Soccer’s transformation from an intuition-driven craft to a data-informed discipline has reshaped the way the game is understood, analyzed, and managed at every level. This section traces that evolution—from the limits of traditional analysis, through the data infrastructure that made new approaches possible, to the metrics and applications that define the field today. From Outcomes to Process: The Limits of Traditional Analysis Soccer has long been described as the beautiful game—fluid, creative, and often unpredictable. For decades, match analysis relied primarily on observational expertise. Coaches and analysts interpreted performance through video review, accumulated experience, and a limited set of summary statistics such as goals scored, goals conceded, and league standings. These tools remain valuable, but they provide only a relatively coarse and often subjective view of performance. Traditional evaluation also depended heavily on final outcomes. A league table, for example, awards the same three points for a 1–0 win against a title contender as for a 1–0 win against a relegation candidate. This approach is effective for determining standings, but it captures little about the contextual difficulty or underlying quality of each result. This limitation is especially consequential in soccer because the sport is relatively low scoring, and outcomes are often shaped by a small number of events—a
The above is a preview of the first 20 pages. Register to read the complete e-book.

Support Author

0.00
Total Amount (¥)
0
Donation Count
Please enter an amount Minimum ¥1

You will be redirected to Alipay to complete payment, then return here.

Recommended for You

Loading recommended books...
Failed to load, please try again later
Back to List