Hands-On Artificial Intelligence for IoT

Book description

Build smarter systems by combining artificial intelligence and the Internet of Things - two of the most talked about topics today

Key Features

  • Leverage the power of Python libraries such as TensorFlow and Keras to work with real-time IoT data
  • Process IoT data and predict outcomes in real time to build smart IoT models
  • Cover practical case studies on industrial IoT, smart cities, and home automation

Book Description

There are many applications that use data science and analytics to gain insights from terabytes of data. These apps, however, do not address the challenge of continually discovering patterns for IoT data. In Hands-On Artificial Intelligence for IoT, we cover various aspects of artificial intelligence (AI) and its implementation to make your IoT solutions smarter.

This book starts by covering the process of gathering and preprocessing IoT data gathered from distributed sources. You will learn different AI techniques such as machine learning, deep learning, reinforcement learning, and natural language processing to build smart IoT systems. You will also leverage the power of AI to handle real-time data coming from wearable devices. As you progress through the book, techniques for building models that work with different kinds of data generated and consumed by IoT devices such as time series, images, and audio will be covered. Useful case studies on four major application areas of IoT solutions are a key focal point of this book. In the concluding chapters, you will leverage the power of widely used Python libraries, TensorFlow and Keras, to build different kinds of smart AI models.

By the end of this book, you will be able to build smart AI-powered IoT apps with confidence.

What you will learn

  • Apply different AI techniques including machine learning and deep learning using TensorFlow and Keras
  • Access and process data from various distributed sources
  • Perform supervised and unsupervised machine learning for IoT data
  • Implement distributed processing of IoT data over Apache Spark using the MLLib and H2O.ai platforms
  • Forecast time-series data using deep learning methods
  • Implementing AI from case studies in Personal IoT, Industrial IoT, and Smart Cities
  • Gain unique insights from data obtained from wearable devices and smart devices

Who this book is for

If you are a data science professional or a machine learning developer looking to build smart systems for IoT, Hands-On Artificial Intelligence for IoT is for you. If you want to learn how popular artificial intelligence (AI) techniques can be used in the Internet of Things domain, this book will also be of benefit. A basic understanding of machine learning concepts will be required to get the best out of this book.

Publisher resources

Download Example Code

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Hands-On Artificial Intelligence for IoT
  3. Dedication
  4. About Packt
    1. Why subscribe?
    2. Packt.com
  5. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  7. Principles and Foundations of IoT and AI
    1. What is IoT 101?
      1. IoT reference model
      2. IoT platforms
      3. IoT verticals
    2. Big data and IoT
    3. Infusion of AI – data science in IoT
      1. Cross-industry standard process for data mining
      2. AI platforms and IoT platforms
    4. Tools used in this book
      1. TensorFlow
      2. Keras
      3. Datasets
        1. The combined cycle power plant dataset
        2. Wine quality dataset
        3. Air quality data
    5. Summary
  8. Data Access and Distributed Processing for IoT
    1. TXT format
      1. Using TXT files in Python
    2. CSV format
      1. Working with CSV files with the csv module
      2. Working with CSV files with the pandas module
      3. Working with CSV files with the NumPy module
    3. XLSX format
      1. Using OpenPyXl for XLSX files
      2. Using pandas with XLSX files
    4. Working with the JSON format
      1. Using JSON files with the JSON module
      2. JSON files with the pandas module
    5. HDF5 format
      1. Using HDF5 with PyTables
      2. Using HDF5 with pandas
      3. Using HDF5 with h5py
    6. SQL data
      1. The SQLite database engine
      2. The MySQL database engine
    7. NoSQL data
    8. HDFS
      1. Using hdfs3 with HDFS
      2. Using PyArrow's filesystem interface for HDFS
    9. Summary
  9. Machine Learning for IoT
    1. ML and IoT
    2. Learning paradigms
    3. Prediction using linear regression
      1. Electrical power output prediction using regression
    4. Logistic regression for classification
      1. Cross-entropy loss function
      2. Classifying wine using logistic regressor
    5. Classification using support vector machines
      1. Maximum margin hyperplane
      2. Kernel trick
      3. Classifying wine using SVM
    6. Naive Bayes
      1. Gaussian Naive Bayes for wine quality
    7. Decision trees
      1. Decision trees in scikit
      2. Decision trees in action
    8. Ensemble learning
      1. Voting classifier
      2. Bagging and pasting
    9. Improving your model – tips and tricks
      1. Feature scaling to resolve uneven data scale
      2. Overfitting
        1. Regularization
        2. Cross-validation
      3. No Free Lunch theorem
      4. Hyperparameter tuning and grid search
    10. Summary
  10. Deep Learning for IoT
    1. Deep learning 101
      1. Deep learning—why now?
      2. Artificial neuron
      3. Modelling single neuron in TensorFlow
    2. Multilayered perceptrons for regression and classification
      1. The backpropagation algorithm
      2. Energy output prediction using MLPs in TensorFlow
      3. Wine quality classification using MLPs in TensorFlow
    3. Convolutional neural networks
      1. Different layers of CNN
        1. The convolution layer
        2. Pooling layer
      2. Some popular CNN model
      3. LeNet to recognize handwritten digits
    4. Recurrent neural networks
      1. Long short-term memory
      2. Gated recurrent unit
    5. Autoencoders
      1. Denoising autoencoders
      2. Variational autoencoders
    6. Summary
  11. Genetic Algorithms for IoT
    1. Optimization
      1. Deterministic and analytic methods
        1. Gradient descent method
        2. Newton-Raphson method
      2. Natural optimization methods
        1. Simulated annealing
        2. Particle Swarm Optimization
        3. Genetic algorithms
    2. Introduction to genetic algorithms
      1. The genetic algorithm
        1. Crossover
        2. Mutation
      2. Pros and cons
        1. Advantages
        2. Disadvantages
    3. Coding genetic algorithms using Distributed Evolutionary Algorithms in Python
      1. Guess the word
      2. Genetic algorithm for CNN architecture
      3. Genetic algorithm for LSTM optimization
    4. Summary
  12. Reinforcement Learning for IoT
    1. Introduction
      1. RL terminology
        1. Deep reinforcement learning
      2. Some successful applications
    2. Simulated environments
      1. OpenAI gym
    3. Q-learning
      1. Taxi drop-off using Q-tables
    4. Q-Network
      1. Taxi drop-off using Q-Network
      2. DQN to play an Atari game
      3. Double DQN
      4. Dueling DQN
    5. Policy gradients
      1. Why policy gradients?
      2. Pong using policy gradients
      3. The actor-critic algorithm
    6. Summary
  13. Generative Models for IoT
    1. Introduction
    2. Generating images using VAEs
      1. VAEs in TensorFlow
    3. GANs
      1. Implementing a vanilla GAN in TensorFlow
      2. Deep Convolutional GANs
      3. Variants of GAN and its cool applications
        1. Cycle GAN
        2. Applications of GANs
    4. Summary
  14. Distributed AI for IoT
    1. Introduction
      1. Spark components
    2. Apache MLlib
      1. Regression in MLlib
      2. Classification in MLlib
      3. Transfer learning using SparkDL
    3. Introducing H2O.ai
      1. H2O AutoML
      2. Regression in H2O
      3. Classification in H20
    4. Summary
  15. Personal and Home IoT
    1. Personal IoT
      1. SuperShoes by MIT
      2. Continuous glucose monitoring
        1. Hypoglycemia prediction using CGM data
      3. Heart monitor
      4. Digital assistants
    2. IoT and smart homes
      1. Human activity recognition
        1. HAR using wearable sensors
        2. HAR from videos
      2. Smart lighting
      3. Home surveillance
    3. Summary
  16. AI for the Industrial IoT
    1. Introduction to AI-powered industrial IoT
      1. Some interesting use cases
    2. Predictive maintenance using AI
      1. Predictive maintenance using Long Short-Term Memory
      2. Predictive maintenance advantages and disadvantages
    3. Electrical load forecasting in industry
      1. STLF using LSTM
    4. Summary
  17. AI for Smart Cities IoT
    1. Why do we need smart cities?
    2. Components of a smart city
      1. Smart traffic management
      2. Smart parking
      3. Smart waste management
      4. Smart policing
      5. Smart lighting
      6. Smart governance
    3. Adapting IoT for smart cities and the necessary steps
      1. Cities with open data
        1. Atlanta city Metropolitan Atlanta Rapid Transit Authority data
        2. Chicago Array of Things data
      2. Detecting crime using San Francisco crime data
    4. Challenges and benefits
    5. Summary
  18. Combining It All Together
    1. Processing different types of data
      1. Time series modeling
      2. Preprocessing textual data
      3. Data augmentation for images
      4. Handling videos files
      5. Audio files as input data
    2. Computing in the cloud
      1. AWS
      2. Google Cloud Platform
      3. Microsoft Azure
    3. Summary
  19. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Hands-On Artificial Intelligence for IoT
  • Author(s): Amita Kapoor
  • Release date: January 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781788836067