Time Series Analysis on AWS

Book description

Leverage AWS AI/ML managed services to generate value from your time series data

Key Features

  • Solve modern time series analysis problems such as forecasting and anomaly detection
  • Gain a solid understanding of AWS AI/ML managed services and apply them to your business problems
  • Explore different algorithms to build applications that leverage time series data

Book Description

Being a business analyst and data scientist, you have to use many algorithms and approaches to prepare, process, and build ML-based applications by leveraging time series data, but you face common problems, such as not knowing which algorithm to choose or how to combine and interpret them. Amazon Web Services (AWS) provides numerous services to help you build applications fueled by artificial intelligence (AI) capabilities. This book helps you get to grips with three AWS AI/ML-managed services to enable you to deliver your desired business outcomes.

The book begins with Amazon Forecast, where you'll discover how to use time series forecasting, leveraging sophisticated statistical and machine learning algorithms to deliver business outcomes accurately. You'll then learn to use Amazon Lookout for Equipment to build multivariate time series anomaly detection models geared toward industrial equipment and understand how it provides valuable insights to reinforce teams focused on predictive maintenance and predictive quality use cases. In the last chapters, you'll explore Amazon Lookout for Metrics, and automatically detect and diagnose outliers in your business and operational data.

By the end of this AWS book, you'll have understood how to use the three AWS AI services effectively to perform time series analysis.

What you will learn

  • Understand how time series data differs from other types of data
  • Explore the key challenges that can be solved using time series data
  • Forecast future values of business metrics using Amazon Forecast
  • Detect anomalies and deliver forewarnings using Lookout for Equipment
  • Detect anomalies in business metrics using Amazon Lookout for Metrics
  • Visualize your predictions to reduce the time to extract insights

Who this book is for

If you're a data analyst, business analyst, or data scientist looking to analyze time series data effectively for solving business problems, this is the book for you. Basic statistics knowledge is assumed, but no machine learning knowledge is necessary. Prior experience with time series data and how it relates to various business problems will help you get the most out of this book. This guide will also help machine learning practitioners find new ways to leverage their skills to build effective time series-based applications.

Table of contents

  1. Time Series Analysis on AWS
  2. Contributors
  3. About the author
  4. About the reviewers
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Share Your Thoughts
  6. Section 1: Analyzing Time Series and Delivering Highly Accurate Forecasts with Amazon Forecast
  7. Chapter 1: An Overview of Time Series Analysis
    1. Technical requirements
    2. What is a time series dataset?
    3. Recognizing the different families of time series
      1. Univariate time series data
      2. Continuous multivariate data
      3. Event-based multivariate data
      4. Multiple time series data
    4. Adding context to time series data
      1. Labels
      2. Related time series
      3. Metadata
    5. Learning about common time series challenges
      1. Technical challenges
      2. Data quality
      3. Visualization challenges
      4. Behavioral challenges
      5. Missing insights and context
    6. Selecting an analysis approach
      1. Using raw time series data
      2. Summarizing time series into tabular datasets
      3. Using imaging techniques
      4. Symbolic transformations
    7. Typical time series use cases
      1. Virtual sensors
      2. Activity detection
      3. Predictive quality
      4. Setpoint optimization
    8. Summary
  8. Chapter 2: An Overview of Amazon Forecast
    1. Technical requirements
    2. What kinds of problems can we solve with forecasting?
      1. Framing your forecasting problem
    3. What is Amazon Forecast?
    4. How does Amazon Forecast work?
      1. Amazon Forecast workflow overview
      2. Pricing
    5. Choosing the right applications
      1. Latency requirements
      2. Dataset requirements
      3. Use-case requirements
    6. Summary
  9. Chapter 3: Creating a Project and Ingesting Your Data
    1. Technical requirements
    2. Understanding the components of a dataset group
      1. Target time series
      2. Related time series
      3. Item metadata
    3. Preparing a dataset for forecasting purposes
      1. Preparing the raw dataset (optional)
      2. Uploading your data to Amazon S3 for storage
      3. Authorizing Amazon Forecast to access your S3 bucket (optional)
    4. Creating an Amazon Forecast dataset group
    5. Ingesting data in Amazon Forecast
      1. Ingesting your target time series dataset
      2. Ingesting related time series
      3. Ingesting metadata
      4. What's happening behind the scenes?
    6. Summary
  10. Chapter 4: Training a Predictor with AutoML
    1. Technical requirements
    2. Using your datasets to train a predictor
    3. How Amazon Forecast leverages automated machine learning
    4. Understanding the predictor evaluation dashboard
      1. Predictor overview
      2. Predictor metrics
    5. Exporting and visualizing your predictor backtest results
      1. What is backtesting?
      2. Exporting backtest results
      3. Backtest predictions overview
      4. Backtest accuracy overview
    6. Summary
  11. Chapter 5: Customizing Your Predictor Training
    1. Technical requirements
    2. Choosing an algorithm and configuring the training parameters
      1. ETS
      2. ARIMA
      3. NPTS
      4. Prophet
      5. DeepAR+
      6. CNN-QR
      7. When should you select an algorithm?
    3. Leveraging HPO
      1. What is HPO?
      2. Training a CNN-QR predictor with HPO
      3. Introducing tunable hyperparameters with HPO
    4. Reinforcing your backtesting strategy
    5. Including holiday and weather data
      1. Enabling the Holidays feature
      2. Enabling the Weather index
    6. Implementing featurization techniques
      1. Configuring featurization parameters
      2. Introducing featurization parameter values
    7. Customizing quantiles to suit your business needs
      1. Configuring your forecast types
      2. Choosing forecast types
    8. Summary
  12. Chapter 6: Generating New Forecasts
    1. Technical requirements
    2. Generating a forecast
      1. Creating your first forecast
      2. Generating new subsequent forecasts
    3. Using lookup to get your items forecast
    4. Exporting and visualizing your forecasts
      1. Exporting the predictions
      2. Visualizing your forecast's results
      3. Performing error analysis
    5. Generating explainability for your forecasts
      1. Generating forecast explainability
      2. Visualizing forecast explainability
    6. Summary
  13. Chapter 7: Improving and Scaling Your Forecast Strategy
    1. Technical requirements
    2. Deep diving into forecasting model metrics
      1. Weighted absolute percentage error (WAPE)
      2. Mean absolute percentage error (MAPE)
      3. Mean absolute scaled error (MASE)
      4. Root mean square error (RMSE)
      5. Weighted quantile loss (wQL)
    3. Understanding your model accuracy
    4. Model monitoring and drift detection
    5. Serverless architecture orchestration
      1. Solutions overview
      2. Solutions deployment
      3. Configuring the solution
      4. Using the solution
      5. Cleanup
    6. Summary
  14. Section 2: Detecting Abnormal Behavior in Multivariate Time Series with Amazon Lookout for Equipment
  15. Chapter 8: An Overview of Amazon Lookout for Equipment
    1. Technical requirements
    2. What is Amazon Lookout for Equipment?
    3. What are the different approaches to tackle anomaly detection?
      1. What is an anomaly?
      2. Model-based approaches
      3. Other anomaly detection methods
      4. Using univariate methods with a multivariate dataset
    4. The challenges encountered with multivariate time series data
    5. How does Amazon Lookout for Equipment work?
      1. Defining the key concepts
      2. Amazon Lookout for Equipment workflow overview
      3. Pricing
    6. How do you choose the right applications?
      1. Latency requirements
      2. Dataset requirements
      3. Use case requirements
    7. Summary
  16. Chapter 9: Creating a Dataset and Ingesting Your Data
    1. Technical requirements
    2. Preparing a dataset for anomaly detection purposes
      1. Preparing the dataset
      2. Uploading your data to Amazon S3 for storage
    3. Creating an Amazon Lookout for Equipment dataset
    4. Generating a JSON schema
      1. Dataset schema structure
      2. Using CloudShell to generate a schema
    5. Creating a data ingestion job
    6. Understanding common ingestion errors and workarounds
      1. Wrong S3 location
      2. Component not found
      3. Missing values for a given time series
    7. Summary
  17. Chapter 10: Training and Evaluating a Model
    1. Technical requirements
    2. Using your dataset to train a model
      1. Training an anomaly detection model
      2. How is the historical event file used?
      3. Deep dive into the off-time detection feature
    3. Model organization best practices
    4. Choosing a good data split between training and evaluation
    5. Evaluating a trained model
      1. Model evaluation dashboard overview
      2. Interpreting the model performance dashboard's overview
      3. Using the events diagnostics dashboard
    6. Summary
  18. Chapter 11: Scheduling Regular Inferences
    1. Technical requirements
    2. Using a trained model
    3. Configuring a scheduler
      1. Preparing your Amazon S3 bucket
      2. Configuring your scheduler
    4. Preparing a dataset for inference
      1. Understanding the scheduled inference process
      2. Preparing the inference data
    5. Extracting the inference results
    6. Summary
  19. Chapter 12: Reducing Time to Insights for Anomaly Detections
    1. Technical requirements
    2. Improving your model's accuracy
      1. Reducing the number of signals
      2. Using the off-time conditions
      3. Selecting the best signals
    3. Processing the model diagnostics
      1. Deploying a CloudWatch-based dashboard
      2. Using the Lookout for Equipment dashboards
      3. Post-processing detected events results in building deeper insights
    4. Monitoring your models
    5. Orchestrating each step of the process with a serverless architecture
      1. Assembling and configuring the AWS components
    6. Summary
  20. Section 3: Detecting Anomalies in Business Metrics with Amazon Lookout for Metrics
  21. Chapter 13: An Overview of Amazon Lookout for Metrics
    1. Technical requirements
    2. Recognizing different types of anomalies
    3. What is Amazon Lookout for Metrics?
    4. How does Amazon Lookout for Metrics work?
      1. Key concept definitions
      2. Amazon Lookout for Metrics workflow overview
      3. Pricing
    5. Identifying suitable metrics for monitoring
      1. Dataset requirements
      2. Use case requirements
    6. Choosing between Lookout for Equipment and Lookout for Metrics
    7. Summary
  22. Chapter 14: Creating and Activating a Detector
    1. Technical requirements
    2. Preparing a dataset for anomaly detection purposes
      1. Collecting the dataset
      2. Uploading your data to Amazon S3 for storage
      3. Giving access to your data to Amazon Lookout for Metrics
    3. Creating a detector
    4. Adding a dataset and connecting a data source
    5. Understanding the backtesting mode
    6. Configuring alerts
    7. Summary
  23. Chapter 15: Viewing Anomalies and Providing Feedback
    1. Technical requirements
    2. Training a continuous detector
      1. Configuring a detector in continuous mode
      2. Preparing data to feed a continuous detector
    3. Reviewing anomalies from a trained detector
      1. Detector details dashboard
      2. Anomalies dashboard
    4. Interacting with a detector
      1. Delivering readable alerts
      2. Providing feedback to improve a detector
    5. Summary
    6. Why subscribe?
  24. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts

Product information

  • Title: Time Series Analysis on AWS
  • Author(s): Michaël Hoarau
  • Release date: February 2022
  • Publisher(s): Packt Publishing
  • ISBN: 9781801816847