Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Applied Machine Learning for Health and Fitness: A Practical Guide to Machine Learning with Deep Vision, Sensors and IoT
Applied Machine Learning for Health and Fitness: A Practical Guide to Machine Learning with Deep Vision, Sensors and IoT
Applied Machine Learning for Health and Fitness: A Practical Guide to Machine Learning with Deep Vision, Sensors and IoT
Ebook380 pages2 hours

Applied Machine Learning for Health and Fitness: A Practical Guide to Machine Learning with Deep Vision, Sensors and IoT

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Explore the world of using machine learning methods with deep computer vision, sensors and data in sports, health and fitness and other industries. Accompanied by practical step-by-step Python code samples and Jupyter notebooks, this comprehensive guide acts as a reference for a data scientist, machine learning practitioner or anyone interested in AI applications. These ML models and methods can be used to create solutions for AI enhanced coaching, judging, athletic performance improvement, movement analysis, simulations, in motion capture, gaming, cinema production and more.

Packed with fun, practical applications for sports, machine learning models used in the book include supervised, unsupervised and cutting-edge reinforcement learning methods and models with popular tools like PyTorch, Tensorflow, Keras, OpenAI Gym and OpenCV. Author Kevin Ashley—who happens to be both a machine learning expert and a professional ski instructor—has written an insightful book that takes you on a journey of modern sport science and AI. 

Filled with thorough, engaging illustrations and dozens of real-life examples, this book is your next step to understanding the implementation of AI within the sports world and beyond. Whether you are a data scientist, a coach, an athlete, or simply a personal fitness enthusiast excited about connecting your findings with AI methods, the author’s practical expertise in both tech and sports is an undeniable asset for your learning process. Today’s data scientists are the future of athletics, and Applied Machine Learning for Health and Fitness hands you the knowledge you need to stay relevant in this rapidly growing space.

What You'll Learn

  • Use multiple data science tools and frameworks
  • Apply deep computer vision and other machine learning methods for classification, semantic segmentation, and action recognition
  • Build and train neural networks, reinforcement learning models andmore
  • Analyze multiple sporting activities with deep learning
  • Use datasets available today for model training
  • Use machine learning in the cloud to train and deploy models
  • Apply best practices in machine learning and data science

  • Who This Book Is For

    Primarily aimed at data scientists, coaches, sports enthusiasts and athletes interested in connecting sports with technology and AI methods. 
    LanguageEnglish
    PublisherApress
    Release dateAug 24, 2020
    ISBN9781484257722
    Applied Machine Learning for Health and Fitness: A Practical Guide to Machine Learning with Deep Vision, Sensors and IoT

    Related to Applied Machine Learning for Health and Fitness

    Related ebooks

    Hardware For You

    View More

    Related articles

    Related categories

    Reviews for Applied Machine Learning for Health and Fitness

    Rating: 0 out of 5 stars
    0 ratings

    0 ratings0 reviews

    What did you think?

    Tap to rate

    Review must be at least 10 words

      Book preview

      Applied Machine Learning for Health and Fitness - Kevin Ashley

      Part IGetting Started

      Getting Started

      The noblest pleasure is the joy of understanding.

      —Leonardo da Vinci

      ../images/484430_1_En_1_PartFrontmatter/484430_1_En_1_Figa_HTML.jpg

      © Kevin Ashley 2020

      K. AshleyApplied Machine Learning for Health and Fitnesshttps://doi.org/10.1007/978-1-4842-5772-2_1

      1. Machine Learning in Sports 101

      Kevin Ashley¹  

      (1)

      Belmont, CA, USA

      I have always been convinced that the only way to get artificial intelligence to work is to do the computation in a way similar to the human brain.

      —Geoffrey Hinton, Godfather of Deep Learning

      ../images/484430_1_En_1_Chapter/484430_1_En_1_Fig1_HTML.jpg

      Figure 1-1

      Machine learning in sports

      Getting Started

      I don’t know anything about luck, but that the harder I train, the luckier I get.

      —Ingemar Stenmark, World Cup Alpine Ski Racer

      In sports and athletics, results are achieved through training and repetition: machine learning is very similar. To train a skill, a human athlete needs thousands of repetitions. Training a movement skill for a humanoid robot, using machine learning methods like reinforcement learning (RL), requires tens of thousands or millions of iterations.

      Machine learning is a relatively new method in sport science, but it’s making huge advancements and already impacts many areas of sports, from personal training to professional competitions. For example, the International Federation of Gymnastics (Figure 1-2) announced that an AI judging system is about to be introduced to the world of professional competitions about the same year this book gets published! The system built for judging gymnastics is based on computer vision, sensors, and many of the same machine learning principles and research you’ll discover from reading this book.

      ../images/484430_1_En_1_Chapter/484430_1_En_1_Fig2_HTML.jpg

      Figure 1-2

      Gymnastics AI helps judging world-level competitions

      For a coach, movement analysis is key to improving athletic performance and preventing injuries. In plain words, a coach can tell you how to become better at sports and not hurt yourself. Sport scientists are familiar with kinesiology and biomechanics and applying principles found in dynamics and classical mechanics for movement analysis. So, why machine learning?

      I hope that this book helps answering this question, with practical examples a sport scientist or a coach can use. In addition to materials supplied with the book, check out ActiveFitness.AI (http://activefitness.ai) for additional materials, including videos, links to supplemental code, research, blogs, and apps.

      Areas of Machine Learning

      There’re several areas or paradigms in machine learning that define most of the methods we’ll be dealing with in this book: supervised, unsupervised, and reinforcement learning. This classification is open; in fact if you dig deeply into machine learning research and theory, you’ll also discover weakly supervised, self-learning and a wealth of other methods. In this book, you will find practical projects and applications of these main areas of machine learning in health, fitness, and sports.

      Supervised learning deals with datasets that include labeled data. Typical tasks for supervised learning include classification, for example, classifying activities or objects on the image. For supervised learning to work, large labeled datasets are required with input labels to train models (see Figure 1-3). Fortunately, you don’t need to do most of image classification from scratch, datasets such as ImageNet contain tens of millions labeled images, and with techniques like transfer learning, you could reuse them in your model.

      ../images/484430_1_En_1_Chapter/484430_1_En_1_Fig3_HTML.jpg

      Figure 1-3

      Supervised learning

      Unsupervised learning doesn’t assume that data is labeled; instead, its goal is finding similarities in the data, like grouping similar activities (Figure 1-4). It’s often used for self-organizing dimensionality reduction and clustering, such as K-means. For example, if you train an unsupervised model with sufficient data containing images of athletes performing actions in different sports, such a model should be able to predict what group or sport a given image belongs to. This method is great if you don’t have a labeled dataset, but sometimes you have some labels in an unlabeled set: this scenario is often called a semisupervised problem.

      ../images/484430_1_En_1_Chapter/484430_1_En_1_Fig4_HTML.jpg

      Figure 1-4

      Unsupervised learning

      Reinforcement learning (RL) applies a concept of an agent trying to achieve a goal and receiving rewards for positive and penalties for negative actions (see Figure 1-5). It originated from game theory, theory of control, and Markov decision process: it is widely used for robot training, including autonomous vehicles. This book goes over several applications of reinforcement learning in sports: for movement analysis, simulation, and coaching, check Chapter 10, Reinforcement Learning in Sports, for more.

      ../images/484430_1_En_1_Chapter/484430_1_En_1_Fig5_HTML.jpg

      Figure 1-5

      Reinforcement learning

      Logic and Machine Learning

      We just think you can have these great big neural nets that learn, and so, instead of programming, you are just going to get them to learn everything.

      —Geoffrey Hinton

      So, what in machine learning is different from a coder programming an algorithm? It’s easier to illustrate if you consider what makes an algorithm work: usually it’s logical rules that define how the algorithm handles the input data. With classic methods, we start with known rules and apply them to collected data to get the answers (Figure 1-6).

      ../images/484430_1_En_1_Chapter/484430_1_En_1_Fig6_HTML.jpg

      Figure 1-6

      In classical algorithmic programming, we begin with rules and data to get answers

      In machine learning we begin by giving our AI answers and data; the result is an AI model that contains rules that AI learned by observing inputs (Figure 1-7).

      ../images/484430_1_En_1_Chapter/484430_1_En_1_Fig7_HTML.jpg

      Figure 1-7

      Machine learning works by training a model with answers and data; the result is a trained model that contains inferred rules

      This looks simple enough, but it represents an entire paradigm shift in our approach to learning and computer programming. If you think about it, machine learning sounds almost too easy! In fact, most machine learning frameworks include only two essential methods: train and predict. The model needs to be trained, and then it predicts the outcomes.

      Without getting deep into computer science, machine learning is certainly a powerful way to solve complex problems, but it is not a panacea for every task: understanding where it can help in health and fitness is part of the reasons for writing this book. Oftentimes, basic statistical methods, such as finding correlations between data points, regression, and classification, as well as algorithmic methods can be used, before bringing AI: machine learning deals specifically with training predictive models. Most machine learning models today are also not great at generalizing. It means that while they are trained on a specific set of data, prediction accuracy may drop significantly as you expand the inputs. With these words of caution, you’ll see that these models just work in many applications, including

      Enjoying the preview?
      Page 1 of 1