O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Practical Time Series Analysis

Book Description

Step by Step guide filled with real world practical examples.

About This Book

  • Get your first experience with data analysis with one of the most powerful types of analysis—time-series.
  • Find patterns in your data and predict the future pattern based on historical data.
  • Learn the statistics, theory, and implementation of Time-series methods using this example-rich guide

Who This Book Is For

This book is for anyone who wants to analyze data over time and/or frequency. A statistical background is necessary to quickly learn the analysis methods.

What You Will Learn

  • Understand the basic concepts of Time Series Analysis and appreciate its importance for the success of a data science project
  • Develop an understanding of loading, exploring, and visualizing time-series data
  • Explore auto-correlation and gain knowledge of statistical techniques to deal with non-stationarity time series
  • Take advantage of exponential smoothing to tackle noise in time series data
  • Learn how to use auto-regressive models to make predictions using time-series data
  • Build predictive models on time series using techniques based on auto-regressive moving averages
  • Discover recent advancements in deep learning to build accurate forecasting models for time series
  • Gain familiarity with the basics of Python as a powerful yet simple to write programming language

In Detail

Time Series Analysis allows us to analyze data which is generated over a period of time and has sequential interdependencies between the observations. This book describes special mathematical tricks and techniques which are geared towards exploring the internal structures of time series data and generating powerful descriptive and predictive insights. Also, the book is full of real-life examples of time series and their analyses using cutting-edge solutions developed in Python.

The book starts with descriptive analysis to create insightful visualizations of internal structures such as trend, seasonality and autocorrelation. Next, the statistical methods of dealing with autocorrelation and non-stationary time series are described. This is followed by exponential smoothing to produce meaningful insights from noisy time series data. At this point, we shift focus towards predictive analysis and introduce autoregressive models such as ARMA and ARIMA for time series forecasting. Later, powerful deep learning methods are presented, to develop accurate forecasting models for complex time series, and under the availability of little domain knowledge. All the topics are illustrated with real-life problem scenarios and their solutions by best-practice implementations in Python.

The book concludes with the Appendix, with a brief discussion of programming and solving data science problems using Python.

Style and approach

This book takes the readers from the basic to advance level of Time series analysis in a very practical and real world use cases.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

Table of Contents

  1. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Conventions
    5. Reader feedback
    6. Customer support
      1. Downloading the example code
      2. Errata
      3. Piracy
      4. Questions
  2. Introduction to Time Series
    1. Different types of data
      1. Cross-sectional data
      2. Time series data
      3. Panel data
    2. Internal structures of time series
      1. General trend
      2. Seasonality
        1. Run sequence plot
        2. Seasonal sub series plot
        3. Multiple box plots
      3. Cyclical changes
      4. Unexpected variations
    3. Models for time series analysis
      1. Zero mean models
      2. Random walk
      3. Trend models
      4. Seasonality models
    4. Autocorrelation and Partial autocorrelation
    5. Summary
  3. Understanding Time Series Data
    1. Advanced processing and visualization of time series data
    2. Resampling time series data
      1. Group wise aggregation
      2. Moving statistics
    3. Stationary processes
      1. Differencing
        1. First-order differencing
        2. Second-order differencing
        3. Seasonal differencing
      2. Augmented Dickey-Fuller test
    4. Time series decomposition
      1. Moving averages
        1. Moving averages and their smoothing effect
        2. Seasonal adjustment using moving average
        3. Weighted moving average
      2. Time series decomposition using moving averages
      3. Time series decomposition using statsmodels.tsa
    5. Summary
  4. Exponential Smoothing based Methods
    1. Introduction to time series smoothing
    2. First order exponential smoothing
    3. Second order exponential smoothing
    4. Modeling higher-order exponential smoothing
    5. Summary
  5. Auto-Regressive Models
    1. Auto-regressive models
    2. Moving average models
      1. Building datasets with ARMA
      2. ARIMA
      3. Confidence interval
    3. Summary
  6. Deep Learning for Time Series Forecasting
    1. Multi-layer perceptrons
      1. Training MLPs
      2. MLPs for time series forecasting
    2. Recurrent neural networks
      1. Bi-directional recurrent neural networks
      2. Deep recurrent neural networks
      3. Training recurrent neural networks
      4. Solving the long-range dependency problem
        1. Long Short Term Memory
        2. Gated Recurrent Units
        3. Which one to use - LSTM or GRU?
      5. Recurrent neural networks for time series forecasting
    3. Convolutional neural networks
      1. 2D convolutions
      2. 1D convolution
      3. 1D convolution for time series forecasting
    4. Summary
  7. Getting Started with Python
    1. Installation
      1. Python installers
      2. Running the examples
    2. Basic data types
      1. List, tuple, and set
      2. Strings
      3. Maps
    3. Keywords and functions
    4. Iterators, iterables, and generators
      1. Iterators
      2. Iterables
      3. Generators
    5. Classes and objects
    6. Summary