Introduction to Time series

Understand the basics of time series

Importing the dataset and required libraries

Exploratory Data Analysis (EDA)

Plot Q-Q plots

Feature Engineering

Resampling the data with appropriate techniques

Handling the missing data values

Data Transformation using appropriate techniques.

Rolling window calculation

Expanding window calculation

Moving Average Smoothing

Performance metric - RMSE

**Business Objective **

A time series is simply a series of data points ordered in time. In a time series, time is often the independent variable, and the goal is usually to make a forecast for the future.

Time series data can be helpful for many applications in day-to-day activities like:

- Tracking daily, hourly, or weekly weather data
- Monitoring changes in application performance
- Medical devices to visualize vitals in real-time

Moving averages are a simple and common type of smoothing used in time series analysis and forecasting. Calculating a moving average involves creating a new series where the values comprise the average of raw observations in the original time series.

A moving average requires that you specify a window size called the window width. This defines the number of raw observations used to calculate the moving average value. The ‘moving’ part in the moving average refers to the window defined by the window width is slid along the time series to calculate the average values in the new series. Two main types of moving average are used, namely, Centred and Trailing Moving Average.

In the last part of the time series, we have covered Autoregression modeling. In this project we will explore what is Moving Average Smoothing technique.

**Data Description **

The dataset attached in the following CSV showcases the readings of 3 sensors of a chiller installed in North America. For data anonymity, the values have been transformed using a certain algorithm. The file contains data from one chiller which is located in Brazil and the sensors give out 1 value at every hour of the day. The raw data is at second level but as that is not actionable this data has been grouped at an hour level.

The data has 1895 rows and 5 columns. Following are the variables:

- Time: At what time the reading was taken (timestamp)
- IOT_Sensor_Reading: The reading of the sensor at the above-mentioned timestamp
- Error_Present: The error which may or may not be present while taking the reading
- Sensor 2: The reading from the subordinate sensor
- Sensor_Value: The final value to be predicted

**Aim**

** **

This project aims to build a moving average smoothing on the given dataset.

**Tech stack **

- Language - Python
- Libraries - pandas, numpy, matplotlib, seaborn, statsmodels, sklearn

** **

**Approach **

- Import the required libraries and read the dataset
- Perform descriptive analysis
- Exploratory Data Analysis (EDA) -

- Data Visualization (Q-Q plot)

- Feature Engineering
- Perform resampling on data

- Upsampling
- Downsampling

- Handling the missing data (Interpolate)

- Linear Interpolation
- Polynomial / Spline Interpolation

- Perform data transformation

- Square Root Transformation
- Log Transformation
- Box-Cox Transformation

- Rolling window Statistics
- Expanding window Statistics
- Moving Average Smoothing
- Use the Performance Metric

- RMSE

Time series introduction

07m

Time series basics

07m

Read and explore the data

07m

Feature engineering

08m

Exploratory data analysis

06m

Resampling the data

08m

Handling missing data values

07m

Understand data transformation

07m

Window transformation

08m

Moving average smoothing

08m

Modular code overview

07m