万本电子书0元读

万本电子书0元读

顶部广告

Hands-On Time Series Analysis with R电子书

售       价:¥

5人正在读 | 0人评论 9.8

作       者:Rami Krispin

出  版  社:Packt Publishing

出版时间:2019-05-31

字       数:47.4万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Build efficient forecasting models using traditional time series models and machine learning algorithms. Key Features * Perform time series analysis and forecasting using R packages such as Forecast and h2o * Develop models and find patterns to create visualizations using the TSstudio and plotly packages * Master statistics and implement time-series methods using examples mentioned Book Description Time series analysis is the art of extracting meaningful insights from, and revealing patterns in, time series data using statistical and data visualization approaches. These insights and patterns can then be utilized to explore past events and forecast future values in the series. This book explores the basics of time series analysis with R and lays the foundations you need to build forecasting models. You will learn how to preprocess raw time series data and clean and manipulate data with packages such as stats, lubridate, xts, and zoo. You will analyze data and extract meaningful information from it using both descriptive statistics and rich data visualization tools in R such as the TSstudio, plotly, and ggplot2 packages. The later section of the book delves into traditional forecasting models such as time series linear regression, exponential smoothing (Holt, Holt-Winter, and more) and Auto-Regressive Integrated Moving Average (ARIMA) models with the stats and forecast packages. You'll also cover advanced time series regression models with machine learning algorithms such as Random Forest and Gradient Boosting Machine using the h2o package. By the end of this book, you will have the skills needed to explore your data, identify patterns, and build a forecasting model using various traditional and machine learning methods. What you will learn * Visualize time series data and derive better insights * Explore auto-correlation and master statistical techniques * Use time series analysis tools from the stats, TSstudio, and forecast packages * Explore and identify seasonal and correlation patterns * Work with different time series formats in R * Explore time series models such as ARIMA, Holt-Winters, and more * Evaluate high-performance forecasting solutions Who this book is for Hands-On Time Series Analysis with R is ideal for data analysts, data scientists, and all R developers who are looking to perform time series analysis to predict outcomes effectively. A basic knowledge of statistics is required; some knowledge in R is expected, but not mandatory.
目录展开

Dedication

About Packt

Why subscribe?

Packt.com

Contributors

About the author

About the reviewers

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

Introduction to Time Series Analysis and R

Technical requirements

Time series data

Historical background of time series analysis

Time series analysis

Learning with real-life examples

Getting started with R

Installing R

A brief introduction to R

R operators

Assignment operators

Arithmetic operators

Logical operators

Relational operators

The R package

Installation and maintenance of a package

Loading a package in the R working environment

The key packages

Variables

Importing and loading data to R

Flat files

Web API

R datasets

Working and manipulating data

Querying the data

Help and additional resources

Summary

Working with Date and Time Objects

Technical requirements

The date and time formats

Date and time objects in R

Creating date and time objects

Importing date and time objects

Reformatting and converting date objects

Handling numeric date objects

Reformatting and conversion of time objects

Time zone setting

Creating a date or time index

Manipulation of date and time with the lubridate package

Reformatting date and time objects – the lubridate way

Utility functions for date and time objects

Summary

The Time Series Object

Technical requirement

The Natural Gas Consumption dataset

The attributes of the ts class

Multivariate time series objects

Creating a ts object

Creating an mts object

Setting the series frequency

Data manipulation of ts objects

The window function

Aggregating ts objects

Creating lags and leads for ts objects

Visualizing ts and mts objects

The plot.ts function

The dygraphs package

The TSstudio package

Summary

Working with zoo and xts Objects

Technical requirement

The zoo class

The zoo class attributes

The index of the zoo object

Working with date and time objects

Creating a zoo object

Working with multiple time series objects

The xts class

The xts class attributes

The xts functionality

The periodicity function

Manipulating the object index

Subsetting an xts object based on the index properties

Manipulating the zoo and xts objects

Merging time series objects

Rolling windows

Creating lags

Aggregating the zoo and xts objects

Plotting zoo and xts objects

The plot.zoo function

The plot.xts function

xts, zoo, or ts – which one to use?

Summary

Decomposition of Time Series Data

Technical requirement

The moving average function

The rolling window structure

The average method

The MA attributes

The simple moving average

Two-sided MA

A simple MA versus a two-sided MA

The time series components

The cycle component

The trend component

The seasonal component

The seasonal component versus the cycle component

White noise

The irregular component

The additive versus the multiplicative model

Handling multiplicative series

The decomposition of time series

Classical seasonal decomposition

Seasonal adjustment

Summary

Seasonality Analysis

Technical requirement

Seasonality types

Seasonal analysis with descriptive statistics

Summary statistics tables

Seasonal analysis with density plots

Structural tools for seasonal analysis

Seasonal analysis with the forecast package

Seasonal analysis with the TSstudio package

Summary

Correlation Analysis

Technical requirement

Correlation between two variables

Lags analysis

The autocorrelation function

The partial autocorrelation function

Lag plots

Causality analysis

Causality versus correlation

The cross-correlation function

Summary

Forecasting Strategies

Technical requirement

The forecasting workflow

Training approaches

Training with single training and testing partitions

Forecasting with backtesting

Forecast evaluation

Residual analysis

Scoring the forecast

Forecast benchmark

Finalizing the forecast

Handling forecast uncertainty

Confidence interval

Simulation

Horse race approach

Summary

Forecasting with Linear Regression

Technical requirement

The linear regression

Coefficients estimation with the OLS method

The OLS assumptions

Forecasting with linear regression

Forecasting the trend and seasonal components

Features engineering of the series components

Modeling the series trend and seasonal components

The tslm function

Modeling single events and non-seasonal events

Forecasting a series with multiseasonality components – a case study

The UKgrid series

Preprocessing and feature engineering of the UKdaily series

Training and testing the forecasting model

Model selection

Residuals analysis

Finalizing the forecast

Summary

Forecasting with Exponential Smoothing Models

Technical requirement

Forecasting with moving average models

The simple moving average

Weighted moving average

Forecasting with exponential smoothing

Simple exponential smoothing model

Forecasting with the ses function

Model optimization with grid search

Holt method

Forecasting with the holt function

Holt-Winters model

Summary

Forecasting with ARIMA Models

Technical requirement

The stationary process

Transforming a non-stationary series into a stationary series

Differencing time series

Log transformation

The random walk process

The AR process

Identifying the AR process and its characteristics

The moving average process

Identifying the MA process and its characteristics

The ARMA model

Identifying an ARMA process

Manual tuning of the ARMA model

Forecasting AR, MA, and ARMA models

The ARIMA model

Identifying an ARIMA process

Identifying the model degree of differencing

The seasonal ARIMA model

Tuning the SARIMA model

Tuning the non-seasonal parameters

Tuning the seasonal parameters

Forecasting US monthly natural gas consumption with the SARIMA model – a case study

The auto.arima function

Linear regression with ARIMA errors

Violation of white noise assumption

Modeling the residuals with the ARIMA model

Summary

Forecasting with Machine Learning Models

Technical requirement

Why and when should we use machine learning?

Why h2o?

Forecasting monthly vehicle sales in the US – a case study

Exploratory analysis of the USVSales series

The series structure

The series components

Seasonal analysis

Correlation analysis

Exploratory analysis – key findings

Feature engineering

Training, testing, and model evaluation

Model benchmark

Starting a h2o cluster

Training an ML model

Forecasting with the Random Forest model

Forecasting with the GBM model

Forecasting with the AutoML model

Selecting the final model

Summary

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部