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

Only $11.99/month after trial. Cancel anytime.

Time Series with Python: How to Implement Time Series Analysis and Forecasting Using Python
Time Series with Python: How to Implement Time Series Analysis and Forecasting Using Python
Time Series with Python: How to Implement Time Series Analysis and Forecasting Using Python
Ebook170 pages1 hour

Time Series with Python: How to Implement Time Series Analysis and Forecasting Using Python

Rating: 3 out of 5 stars

3/5

()

Read preview

About this ebook

Are you looking to learn more about Time Series, but struggling to find them in traditional Data Science textbooks?

 

This book is your answer.

 

Time Series is an exciting and important part of Data Analysis. Time Series Data is more readily available than most forms of data and answers questions that cross-sectional data struggle to do. It also has more real world application in the prediction of future events. However it is not generally found in a traditional data science toolkit. There is also limited centralized resources on the applications of Time Series, especially using traditional programming languages such as Python.

 

This book solves all these problems, and more. It starts off with basic concepts in Time Series, and switches to more advanced topics. It shows you how to set up Python from start, and goes through over 20 examples of applying both simple and advanced Time Series concepts with Python code.

 

Here's What's Included In this Book:

 

 

What is a Time Series?

 

4 Different Elements of a Time Series

 

Why Python is the best way to Implement Time Series

 

Step by Step Guide to Installing Python and Importing Time Series Data

 

6 Different Techniques to Analyze Time Series Data

 

3 Advanced Time Series Concepts for Time Series Prediction

 

Time Series Visualization Techniques in Python

 

 

Even if you've never implemented Time Series before, you will still find this book useful.

LanguageEnglish
Release dateApr 17, 2020
ISBN9781393870012
Time Series with Python: How to Implement Time Series Analysis and Forecasting Using Python

Read more from Bob Mather

Related to Time Series with Python

Related ebooks

Mathematics For You

View More

Related articles

Reviews for Time Series with Python

Rating: 3 out of 5 stars
3/5

1 rating0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Time Series with Python - Bob Mather

    Time-Series With Python

    Contents

    Introduction

    Getting Started with the time-series and Its Evolution

    What Elements of a Time-Series Are Interesting?

    Time-Series Properties

    The Behavior of Time-Series

    The Statistical Tools to Interpret a Time-Series

    Time-Series Analysis Based on its Definition and Characteristics

    Techniques for Analyzing Time-Series Data

    Advanced Time-Series Concepts

    Methodology Analysis of Production by Time-Series

    Basics Concepts of Time-Series Analysis With Python

    Why Use Python for Time-Series Data?

    How to Install Python On Your Windows / Linux / MacOS System

    Reading Time-Series Data

    Handling of Time-Series Data

    Autocorrelation Coefficient Estimation

    ARIMA Model Estimation

    SARIMA Model Estimation

    Determination of SARIMA Model Order by Brute Force Method

    Time-Series Prediction With Statsmodels in Python

    Time-Series Visualization in Python

    Clustering and Converting Time-Series Data with Python

    Clustering of Time-Series Data and Distance Function

    Matplotlib and NetworkX

    Graphs – Nodes in Python

    Application to the Visibility Graph

    Data Preprocessing and Time-Series

    Time-Series Analysis

    Analyzing Time-Series with Python

    Conclusion

    Resources

    Disclaimer

    Copyright © 2020

    All Rights Reserved

    No part of this eBook can be transmitted or reproduced in any form including print, electronic, photocopying, scanning, mechanical or recording without prior written permission from the author.

    While the author has taken the utmost effort to ensure the accuracy of the written content, all readers are advised to follow information mentioned herein at their own risk. The author cannot be held responsible for any personal or commercial damage caused by information. All readers are encouraged to seek professional advice when needed.

    Introduction

    The Nature of Data

    Before getting into the world of time history, let’s learn a little bit about data.

    Two things come to our mind when we study data. The first one is that data is a representation of the real world. Consider just one example: every day; we leave our footprint on the web with every click that we make, every like that we make and every comment that we type. All these actions say a lot about our interests, and, from this, it is possible to map our consumption profiles, topics of interest, favorite artists, films and much more. By now, you must have realized that the ads that appear on the screens of our devices are related to our taste. That is why data is a perfect representation of the real world. It can retain a domain by mapping behavior from the data.

    The second core concept is that within a particular characteristic that is always present or absent, data sets can be divided into two major classes:

    Timeless data

    Temporal data

    Timeless data is data that does not depend on time. For example, a dataset containing images, datasets for sentiment analysis, for character recognition, or detection of false profiles, are not temporally organized datasets.

    Some datasets have an attribute of 'time,' but that is not temporal data because it is not data that gets organized over time.

    Temporal data, on the other hand, is organized over time, with a ‘time’ attribute being an index of observation in the dataset. Cool examples of temporal data are population, and social data such as HDI, Gross Domestic Product (GDP), unemployment rate, illiteracy rate, and geographic evolution. Ongoing cases of temporal data include public, meteorological, and financial data.

    What is Time-Series?

    Time-Series can be defined in more than one way. The first is from a book called Computational Intelligence in Time-Series Forecasting, written by Ajoy K. Palit and Dobrivoje Popovic:

    "A time-series is a time-ordered sequence of observation values for a physical or financial variable made at equally spaced time intervals Δt, represented as a set of discrete values x1, x2, x3,..., etc. In practice, the sequence of values is obtained from the sensors by sampling the related continuous signals. Based on measured values and generally corrupted by noise. Time-series values usually contain a deterministic signal component and a stochastic component representing noise interference that causes statistical fluctuations around deterministic values."

    That sounds complicated, and the reason it is such a detailed definition is that the book it comes from is written to address concepts and apply them in Finance and Engineering contexts.

    A simpler definition of a time-series is:

    A time-series is a set of data ordered over time, in a well-defined time interval.

    Much better, easier to understand.

    Great! Now we need to clarify the definition.

    When the second definition says, time-series is sorted over time, in a well-defined time interval, it means that data is grouped sequentially, using two factors:

    The recorded data of occurrence

    The unit of time – daily, weekly, monthly, yearly, etc

    The graph below shows a time-series:

    On the horizontal axis (x-axis), you can see the dates the data were recorded as blue dots. The first definition refers to these blue dots as x1, x2, x3,..., xn.

    On the vertical axis (y-axis), you can see the attribute values for the data, in this case, $ amounts.

    The last part of the first definition states that Based on measured values and generally corrupted by noise, time-series values generally contain a deterministic signal component and a stochastic component representing noise interference that causes statistical fluctuations around the values deterministic. This has a relationship with the less trivial statistical characteristics of the time-series. These characteristics define some of the behaviors exhibited by a time-series but discussing those is outside the scope of this book.

    A Brief Historical Overview of  a Time Series

    Time-series theory was implemented primarily during the interwar period by Yule and Wald.

    During the 1950s, researchers at the Cowles Foundation Group developed econometric models of simultaneous or interdependent equations. These were developed to estimate the maximum likelihood methods used and were applied mostly to macro-economic models.

    During the 1960s, Holt and Winters developed the exponential smoothing technique time-series, mostly used for forecasting.

    During the 1970s, a methodology was developed to create empirical time-series models, providing a boost to applications by Box and Jenkins.  This methodology states that when the information on the design is searched for, it is directed to the available data. That means it is not necessary to rely on pre-existing theories to create models.

    Box-Jenkins model forecasts were often better than large-scale macro models. However, macroeconomists found them inappropriate for a theoretical economic policy because they were empirical and thus lacked a theoretical basis.

    Until the early 1980s, there was a great deal of rivalry (see, for example, Johnston, Econometric Methods, McGraw Hill, 1986). After that came convergence.

    Why is Time-Series Exciting?

    No doubt, you’ve seen graphs showing how the stock market has evolved over the last 12 months. You’ve probably seen graphs showing a country’s economic growth over a set period, or graphs showing the temperatures over 12 months for a country you intend to visit.

    Most of you will not be aware that all of those examples are time-series because they represent numerical variables over time. In this section, we will look at what a time-series is and the important concepts that help you interpret them.

    As mentioned, a time-series is a numerical variable. Time has a scale. And this scale is ordered. It can be in months, days, hours, seconds, years, decades, weeks, quarters, whatever timeframe you want to use. For example, there would be 365 values for the stock market value every day for one year. Place those values into date order, and you have a time-series.

    If you opt for days, you get

    Enjoying the preview?
    Page 1 of 1