Behavior Analysis with Machine Learning Using R  book cover
1st Edition

Behavior Analysis with Machine Learning Using R

ISBN 9781032067049
Published November 26, 2021 by Chapman and Hall/CRC
434 Pages 96 Color & 88 B/W Illustrations

FREE Standard Shipping
USD $99.95

Prices & shipping based on shipping country


Book Description

Behavior Analysis with Machine Learning Using R introduces machine learning and deep learning concepts and algorithms applied to a diverse set of behavior analysis problems. It focuses on the practical aspects of solving such problems based on data collected from sensors or stored in electronic records. The included examples demonstrate how to perform common data analysis tasks such as: data exploration, visualization, preprocessing, data representation, model training and evaluation. All of this, using the R programming language and real-life behavioral data. Even though the examples focus on behavior analysis tasks, the covered underlying concepts and methods can be applied in any other domain. No prior knowledge in machine learning is assumed. Basic experience with R and basic knowledge in statistics and high school level mathematics are beneficial.


  • Build supervised machine learning models to predict indoor locations based on WiFi signals, recognize physical activities from smartphone sensors and 3D skeleton data, detect hand gestures from accelerometer signals, and so on.

  • Program your own ensemble learning methods and use Multi-View Stacking to fuse signals from heterogeneous data sources.

  • Use unsupervised learning algorithms to discover criminal behavioral patterns.

  • Build deep learning neural networks with TensorFlow and Keras to classify muscle activity from electromyography signals and Convolutional Neural Networks to detect smiles in images.

  • Evaluate the performance of your models in traditional and multi-user settings.

  • Build anomaly detection models such as Isolation Forests and autoencoders to detect abnormal fish behaviors.

This book is intended for undergraduate/graduate students and researchers from ubiquitous computing, behavioral ecology, psychology, e-health, and other disciplines who want to learn the basics of machine learning and deep learning and for the more experienced individuals who want to apply machine learning to analyze behavioral data.

Table of Contents

1. Introduction to Behavior and Machine Learning
2. Predicting Behavior with Classification Models
3. Predicting Behavior with Ensemble Learning
4. Exploring and Visualizing Behavioral Data
5. Preprocessing Behavioral Data
6. Discovering Behaviors with Unsupervised Learning
7. Encoding Behavioral Data
8. Predicting Behavior with Deep Learning
9. Multi-User Validation
10. Detecting Abnormal Behaviors
Appendix A. Setup Your Environment
Appendix B. Datasets

View More



Enrique is a Data Scientist at Optimeering. He was previously a Researcher at SINTEF, Norway. He also worked as a PostDoc at the University of Oslo. For the last 11 years, he has been conducting research on behavior analysis using machine learning. Feel free to contact him for any questions, comments, and feedback.
e-mail: [at]


"Behavior Analysis with Machine Learning Using R seamlessly integrates (1) an introduction to machine learning, (2) how to build machine learning models with R, and (3) how to apply these models to human behavior. The text is well written, concise, clear, and engaging – one of the best introductions to the topic of machine learning that I have read. The methodology is clearly explained without getting bogged down in the mathematics. At the same time, the code examples clearly demonstrate the underlying mechanics of each approach. The examples are fresh and unique. Anyone interested in machine learning will find the book valuable. For those interested in human behavioral analysis with R, there is no better book currently available."

- Robert Kabacoff – Professor, Wesleyan University; author of R in Action