Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building Statistical Models in Python

You're reading from  Building Statistical Models in Python

Product type Book
Published in Aug 2023
Publisher Packt
ISBN-13 9781804614280
Pages 420 pages
Edition 1st Edition
Languages
Concepts
Authors (3):
Huy Hoang Nguyen Huy Hoang Nguyen
Profile icon Huy Hoang Nguyen
Paul N Adams Paul N Adams
Profile icon Paul N Adams
Stuart J Miller Stuart J Miller
Profile icon Stuart J Miller
View More author details

Table of Contents (22) Chapters

Preface Part 1:Introduction to Statistics
Chapter 1: Sampling and Generalization Chapter 2: Distributions of Data Chapter 3: Hypothesis Testing Chapter 4: Parametric Tests Chapter 5: Non-Parametric Tests Part 2:Regression Models
Chapter 6: Simple Linear Regression Chapter 7: Multiple Linear Regression Part 3:Classification Models
Chapter 8: Discrete Models Chapter 9: Discriminant Analysis Part 4:Time Series Models
Chapter 10: Introduction to Time Series Chapter 11: ARIMA Models Chapter 12: Multivariate Time Series Part 5:Survival Analysis
Chapter 13: Time-to-Event Variables – An Introduction Chapter 14: Survival Models Index Other Books You May Enjoy

More on model evaluation

In the previous sections, we discussed other methods to prepare data, test and validate models. In this section, we will discuss how to validate time series models and introduce several methods for validating time series models. We will cover the following methods for model evaluation: resampling, shifting, optimized persistence forecasting, and rolling window forecasting.

The real-world dataset considered in this section is Coca Cola stock data collected from Yahoo Finance databases from 01/19/1962 to 12/19/2021 for stock price prediction. This is a time series analysis to forecast the future stock value of a given stock. The reader can download the dataset from the Kaggle platform for this analysis. To motivate the study, we first go to explore the Coco Cola stock dataset:

data = pd.read_csv("COCO COLA.csv", parse_dates=["Date"], index_col="Date")
Figure 11.26 – Coco Cola dataset

Figure 11.26 – Coco Cola dataset

The...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}