100% found this document useful (3 votes)
33 views

Time Series Algorithms Recipes: Implement Machine Learning and Deep Learning Techniques with Python Akshay R Kulkarni All Chapters Instant Download

Deep

Uploaded by

veiglketzal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
33 views

Time Series Algorithms Recipes: Implement Machine Learning and Deep Learning Techniques with Python Akshay R Kulkarni All Chapters Instant Download

Deep

Uploaded by

veiglketzal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Download the full version of the ebook at

https://ebookmass.com

Time Series Algorithms Recipes: Implement


Machine Learning and Deep Learning Techniques
with Python Akshay R Kulkarni

https://ebookmass.com/product/time-series-
algorithms-recipes-implement-machine-learning-and-
deep-learning-techniques-with-python-akshay-r-
kulkarni/

Explore and download more ebook at https://ebookmass.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Machine Learning for Time Series Forecasting with Python


Francesca Lazzeri

https://ebookmass.com/product/machine-learning-for-time-series-
forecasting-with-python-francesca-lazzeri/

testbankdeal.com

Machine Learning with Python for Everyone (Addison Wesley


Data & Analytics Series) 1st Edition, (Ebook PDF)

https://ebookmass.com/product/machine-learning-with-python-for-
everyone-addison-wesley-data-analytics-series-1st-edition-ebook-pdf/

testbankdeal.com

Introduction to Prescriptive AI: A Primer for Decision


Intelligence Solutioning with Python Akshay Kulkarni

https://ebookmass.com/product/introduction-to-prescriptive-ai-a-
primer-for-decision-intelligence-solutioning-with-python-akshay-
kulkarni/
testbankdeal.com

Introduction to algorithms for data mining and machine


learning Yang

https://ebookmass.com/product/introduction-to-algorithms-for-data-
mining-and-machine-learning-yang/

testbankdeal.com
Risk Modeling: Practical Applications of Artificial
Intelligence, Machine Learning, and Deep Learning Terisa
Roberts
https://ebookmass.com/product/risk-modeling-practical-applications-of-
artificial-intelligence-machine-learning-and-deep-learning-terisa-
roberts/
testbankdeal.com

Fundamentals of Machine Learning for Predictive Data


Analytics: Algorithms,

https://ebookmass.com/product/fundamentals-of-machine-learning-for-
predictive-data-analytics-algorithms/

testbankdeal.com

Automated Machine Learning for Business R. Larsen

https://ebookmass.com/product/automated-machine-learning-for-business-
r-larsen/

testbankdeal.com

Machine Learning Algorithms for Signal and Image


Processing Suman Lata Tripathi

https://ebookmass.com/product/machine-learning-algorithms-for-signal-
and-image-processing-suman-lata-tripathi/

testbankdeal.com

Financial Machina: Machine Learning For Finance: The


Quintessential Compendium for Python Machine Learning For
2024 & Beyond Sampson
https://ebookmass.com/product/financial-machina-machine-learning-for-
finance-the-quintessential-compendium-for-python-machine-learning-
for-2024-beyond-sampson/
testbankdeal.com
Time Series
Algorithms Recipes
Implement Machine Learning
and Deep Learning Techniques
with Python

Akshay R Kulkarni
Adarsha Shivananda
Anoosh Kulkarni
V Adithya Krishnan
Time Series
Algorithms Recipes
Implement Machine Learning
and Deep Learning Techniques
with Python

Akshay R Kulkarni
Adarsha Shivananda
Anoosh Kulkarni
V Adithya Krishnan
Time Series Algorithms Recipes: Implement Machine Learning and Deep
Learning Techniques with Python
Akshay R Kulkarni Adarsha Shivananda
Bangalore, Karnataka, India Hosanagara, Karnataka, India

Anoosh Kulkarni V Adithya Krishnan


Bangalore, India Navi Mumbai, India

ISBN-13 (pbk): 978-1-4842-8977-8 ISBN-13 (electronic): 978-1-4842-8978-5


https://doi.org/10.1007/978-1-4842-8978-5
Copyright © 2023 by Akshay R Kulkarni, Adarsha Shivananda,
Anoosh Kulkarni, V Adithya Krishnan
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Celestin Suresh John
Development Editor: Laura Berendson
Coordinating Editor: Mark Powers
Cover designed by eStudioCalamar
Cover image by Aron Visuals on Unsplash (www.unsplash.com)
Distributed to the book trade worldwide by Apress Media, LLC, 1 New York Plaza, New York, NY
10004, U.S.A. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com,
or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member
(owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance
Inc is a Delaware corporation.
For information on translations, please e-mail booktranslations@springernature.com; for
reprint, paperback, or audio rights, please e-mail bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is
available to readers on GitHub (https://github.com/Apress). For more detailed information,
please visit http://www.apress.com/source-code.
Printed on acid-free paper
To our families
Table of Contents
About the Authors��������������������������������������������������������������������������������xi

About the Technical Reviewer�����������������������������������������������������������xiii

Preface�����������������������������������������������������������������������������������������������xv

Chapter 1: Getting Started with Time Series����������������������������������������1


Recipe 1-1A. Reading Time Series Objects (Air Passengers)��������������������������������2
Problem�����������������������������������������������������������������������������������������������������������2
Solution�����������������������������������������������������������������������������������������������������������2
How It Works���������������������������������������������������������������������������������������������������2
Recipe 1-1B. Reading Time Series Objects (India GDP Data)��������������������������������4
Problem�����������������������������������������������������������������������������������������������������������4
Solution�����������������������������������������������������������������������������������������������������������4
How It Works���������������������������������������������������������������������������������������������������4
Recipe 1-2. Saving Time Series Objects���������������������������������������������������������������6
Problem�����������������������������������������������������������������������������������������������������������6
Solution�����������������������������������������������������������������������������������������������������������6
How It Works���������������������������������������������������������������������������������������������������6
Recipe 1-3A. Exploring Types of Time Series Data: Univariate������������������������������7
Problem�����������������������������������������������������������������������������������������������������������7
Solution�����������������������������������������������������������������������������������������������������������7
How It Works���������������������������������������������������������������������������������������������������7

v
Table of Contents

Recipe 1-3B. Exploring Types of Time Series Data: Multivariate���������������������������9


Problem�����������������������������������������������������������������������������������������������������������9
Solution�����������������������������������������������������������������������������������������������������������9
How It Works�������������������������������������������������������������������������������������������������10
Recipe 1-4A. Time Series Components: Trends��������������������������������������������������13
Problem���������������������������������������������������������������������������������������������������������13
Solution���������������������������������������������������������������������������������������������������������13
How It Works�������������������������������������������������������������������������������������������������13
Recipe 1-4B. Time Series Components: Seasonality�������������������������������������������15
Problem���������������������������������������������������������������������������������������������������������15
Solution���������������������������������������������������������������������������������������������������������15
How It Works�������������������������������������������������������������������������������������������������15
Recipe 1-4C. Time Series Components: Seasonality (cont’d.)�����������������������������18
Problem���������������������������������������������������������������������������������������������������������18
Solution���������������������������������������������������������������������������������������������������������18
How It Works�������������������������������������������������������������������������������������������������19
Recipe 1-5A. Time Series Decomposition: Additive Model����������������������������������21
Problem���������������������������������������������������������������������������������������������������������21
Solution���������������������������������������������������������������������������������������������������������21
How It Works�������������������������������������������������������������������������������������������������22
Recipe 1-5B. Time Series Decomposition: Multiplicative Model�������������������������24
Problem���������������������������������������������������������������������������������������������������������24
Solution���������������������������������������������������������������������������������������������������������25
How It Works�������������������������������������������������������������������������������������������������25
Recipe 1-6. Visualization of Seasonality�������������������������������������������������������������27
Problem���������������������������������������������������������������������������������������������������������27
Solution���������������������������������������������������������������������������������������������������������28
How It Works�������������������������������������������������������������������������������������������������28

vi
Table of Contents

Chapter 2: Statistical Univariate Modeling�����������������������������������������33


Recipe 2-1. Moving Average (MA) Forecast��������������������������������������������������������34
Problem���������������������������������������������������������������������������������������������������������34
Solution���������������������������������������������������������������������������������������������������������34
How It Works�������������������������������������������������������������������������������������������������34
Recipe 2-2. Autoregressive (AR) Model��������������������������������������������������������������38
Problem���������������������������������������������������������������������������������������������������������38
Solution���������������������������������������������������������������������������������������������������������38
How It Works�������������������������������������������������������������������������������������������������38
Recipe 2-3. Autoregressive Moving Average (ARMA) Model�������������������������������43
Problem���������������������������������������������������������������������������������������������������������43
Solution���������������������������������������������������������������������������������������������������������43
How It Works�������������������������������������������������������������������������������������������������44
Recipe 2-4. Autoregressive Integrated Moving Average (ARIMA) Model�������������49
Problem���������������������������������������������������������������������������������������������������������49
Solution���������������������������������������������������������������������������������������������������������49
How It Works�������������������������������������������������������������������������������������������������49
Recipe 2-5. Grid Search Hyperparameter Tuning for ARIMA Model��������������������54
Problem���������������������������������������������������������������������������������������������������������54
Solution���������������������������������������������������������������������������������������������������������54
How It Works�������������������������������������������������������������������������������������������������54
Recipe 2-6. Seasonal Autoregressive Integrated Moving
Average (SARIMA) Model������������������������������������������������������������������������������������60
Problem���������������������������������������������������������������������������������������������������������60
Solution���������������������������������������������������������������������������������������������������������60
How It Works�������������������������������������������������������������������������������������������������60

vii
Table of Contents

Recipe 2-7. Simple Exponential Smoothing (SES) Model�����������������������������������62


Problem���������������������������������������������������������������������������������������������������������62
Solution���������������������������������������������������������������������������������������������������������63
How It Works�������������������������������������������������������������������������������������������������63
Recipe 2-8. Holt-Winters (HW) Model�����������������������������������������������������������������64
Problem���������������������������������������������������������������������������������������������������������64
Solution���������������������������������������������������������������������������������������������������������65
How It Works�������������������������������������������������������������������������������������������������65

Chapter 3: Advanced Univariate and Statistical Multivariate


Modeling���������������������������������������������������������������������������������������������67
Recipe 3-1. FBProphet Univariate Time Series Modeling�����������������������������������68
Problem���������������������������������������������������������������������������������������������������������68
Solution���������������������������������������������������������������������������������������������������������68
How It Works�������������������������������������������������������������������������������������������������68
Recipe 3-2. FBProphet Modeling by Controlling the Change Points�������������������73
Problem���������������������������������������������������������������������������������������������������������73
Solution���������������������������������������������������������������������������������������������������������73
How It Works�������������������������������������������������������������������������������������������������74
Recipe 3-3. FBProphet Modeling by Adjusting Trends����������������������������������������79
Problem���������������������������������������������������������������������������������������������������������79
Solution���������������������������������������������������������������������������������������������������������79
How It Works�������������������������������������������������������������������������������������������������79
Recipe 3-4. FBProphet Modeling with Holidays��������������������������������������������������82
Problem���������������������������������������������������������������������������������������������������������82
Solution���������������������������������������������������������������������������������������������������������82
How It Works�������������������������������������������������������������������������������������������������82

viii
Table of Contents

Recipe 3-5. FBProphet Modeling with Added Regressors����������������������������������84


Problem���������������������������������������������������������������������������������������������������������84
Solution���������������������������������������������������������������������������������������������������������84
How It Works�������������������������������������������������������������������������������������������������84
Recipe 3-6. Time Series Forecasting Using Auto-ARIMA������������������������������������87
Problem���������������������������������������������������������������������������������������������������������87
Solution���������������������������������������������������������������������������������������������������������87
How It Works�������������������������������������������������������������������������������������������������87
Recipe 3-7. Multivariate Time Series Forecasting Using the VAR Model������������96
Problem���������������������������������������������������������������������������������������������������������96
Solution���������������������������������������������������������������������������������������������������������96
How It Works�������������������������������������������������������������������������������������������������96

Chapter 4: Machine Learning Regression–based Forecasting���������103


Recipe 4-1. Formulating Regression Modeling for Time Series Forecasting����104
Problem�������������������������������������������������������������������������������������������������������104
Solution�������������������������������������������������������������������������������������������������������104
How It Works�����������������������������������������������������������������������������������������������104
Recipe 4-2. Implementing the XGBoost Model�������������������������������������������������112
Problem�������������������������������������������������������������������������������������������������������112
Solution�������������������������������������������������������������������������������������������������������112
How It Works�����������������������������������������������������������������������������������������������112
Recipe 4-3. Implementing the LightGBM Model�����������������������������������������������114
Problem�������������������������������������������������������������������������������������������������������114
Solution�������������������������������������������������������������������������������������������������������114
How It Works�����������������������������������������������������������������������������������������������114

ix
Visit https://ebookmass.com
now to explore a rich
collection of eBooks and enjoy
exciting offers!
Table of Contents

Recipe 4-4. Implementing the Random Forest Model��������������������������������������116


Problem�������������������������������������������������������������������������������������������������������116
Solution�������������������������������������������������������������������������������������������������������116
How It Works�����������������������������������������������������������������������������������������������116
Recipe 4-5. Selecting the Best Model���������������������������������������������������������������118
Problem�������������������������������������������������������������������������������������������������������118
Solution�������������������������������������������������������������������������������������������������������118
How It Works�����������������������������������������������������������������������������������������������119

Chapter 5: Deep Learning–based Time Series Forecasting��������������127


Recipe 5-1. Time Series Forecasting Using LSTM��������������������������������������������128
Problem�������������������������������������������������������������������������������������������������������128
Solution�������������������������������������������������������������������������������������������������������128
How It Works�����������������������������������������������������������������������������������������������128
Recipe 5-2. Multivariate Time Series Forecasting Using the GRU Model����������136
Problem�������������������������������������������������������������������������������������������������������136
Solution�������������������������������������������������������������������������������������������������������136
How It Works�����������������������������������������������������������������������������������������������136
Recipe 5-3. Time Series Forecasting Using NeuralProphet������������������������������158
Problem�������������������������������������������������������������������������������������������������������158
Solution�������������������������������������������������������������������������������������������������������158
How It Works�����������������������������������������������������������������������������������������������158
Recipe 5-4. Time Series Forecasting Using RNN����������������������������������������������164
Problem�������������������������������������������������������������������������������������������������������164
Solution�������������������������������������������������������������������������������������������������������165
How It Works�����������������������������������������������������������������������������������������������165

Index�������������������������������������������������������������������������������������������������169

x
About the Authors
Akshay R Kulkarni is an artificial intelligence (AI) and machine learning (ML)
evangelist and thought leader. He has consulted several Fortune 500 and
global enterprises to drive AI and data science–led strategic
transformations. He is a Google developer, an author, and a regular
speaker at major AI and data science conferences (including the O’Reilly
Strata Data & AI Conference and Great Indian Developer Summit (GIDS)).
He is a visiting faculty member at some of the top graduate institutes in
India. In 2019, he was featured as one of India’s “top 40 under 40” data
scientists. In his spare time, Akshay enjoys reading, writing, coding, and
helping aspiring data scientists. He lives in Bangalore with his family.

Adarsha Shivananda is a data science and MLOps leader. He is working


on creating world-class MLOps capabilities to ensure continuous value
delivery from AI. He aims to build a pool of exceptional data scientists
within and outside organizations to solve problems through training
programs. He always wants to stay ahead of the curve. Adarsha has worked
extensively in the pharma, healthcare, CPG, retail, and marketing domains.
He lives in Bangalore and loves to read and teach data science.

Anoosh Kulkarni is a senior AI consultant. He has worked with global


clients across multiple domains to help them solve their business
problems using machine learning, natural language processing (NLP), and
deep learning. Anoosh is passionate about guiding and mentoring people
in their data science journey. He leads data science/machine learning
meet-ups and helps aspiring data scientists navigate their careers. He
also conducts ML/AI workshops at universities and is actively involved in
conducting webinars, talks, and sessions on AI and data science. He lives
in Bangalore with his family.
xi
About the Authors

V Adithya Krishnan is a data scientist and MLOps engineer. He has


worked with various global clients across ­multiple domains and helped
them to solve their business problems extensively using advanced ML
applications. He has experience across multiple fields of AI-ML, including
time series forecasting, deep learning, NLP, ML operations, image
processing, and data analytics. Presently, he is working on a state-of-the-
art value observability suite for models in production, which includes
continuous model and data monitoring along with the business value
realized. He presented a paper, “Deep Learning Based Approach for
Range Estimation,” written in collaboration with the DRDO, at an IEEE
conference. He lives in Chennai with his family.

xii
About the Technical Reviewer
Krishnendu Dasgupta is a co-founder of DOCONVID AI. He is a computer
science and engineering graduate with a decade of experience building
solutions and platforms on applied machine learning. He has worked
with NTT DATA, PwC, and Thoucentric and is now working on applied
AI research in medical imaging and decentralized privacy-preserving
machine learning in healthcare. Krishnendu is an alumnus of the MIT
Entrepreneurship and Innovation Bootcamp and devotes his free time as
an applied AI and ML research volunteer for various research NGOs and
universities across the world.

xiii
Preface
Before reading this book, you should have a basic knowledge of statistics,
machine learning, and Python programming. If you want to learn how to
build basic to advanced time series forecasting models, then this book
will help by providing recipes for implementation in Python. By the end
of the book, you will have practical knowledge of all the different types of
modeling methods in time series.
The desire to know the unknown and to predict the future has been
part of human culture for ages. This desire has driven mankind toward
the discipline of forecasting. Time series forecasting predicts unknown
future data points based on the data's previous (past) observed pattern. It
can depend not only on the previous target points and time (univariate)
but also on other independent variables (multivariate). This book is a
cookbook containing various recipes to handle time series forecasting.
Data scientists starting a new time series project but don’t have prior
experience in this domain can easily utilize the various recipes in this
book, which are domain agnostic, to kick-start and ease their development
process.
This book is divided into five chapters. Chapter 1 covers recipes for
reading and processing the time series data and basic Exploratory Data
Analysis (EDA). The following three chapters cover various forecasting
modeling techniques for univariate and multivariate datasets. Chapter 2
has recipes for multiple statistical univariate forecasting methods, with
more advanced techniques continued in Chapter 3. Chapter 3 also covers
statistical multivariate methods. Chapter 4 covers time series forecasting
using machine learning (regression-based). Chapter 5 is on advanced time
series modeling methods using deep learning.

xv
Preface

The code for all the implementations in each chapter and the required
datasets is available for download at ­github.com/apress/time-series-­
algorithm-recipes.

xvi
CHAPTER 1

Getting Started
with Time Series
A time series is a sequence of time-dependent data points. For example,
the demand (or sales) for a product in an e-commerce website can be
measured temporally in a time series, where the demand (or sales)
is ordered according to the time. This data can then be analyzed to
find critical temporal insights and forecast future values, which helps
businesses plan and increase revenue.
Time series data is used in every domain where real-time analytics is
essential. Analyzing this data and forecasting its future value has become
essential to these domains.
Time series analysis/forecasting was previously considered a purely
statistical problem. It is now used in many machine learning and deep
learning–based solutions, which perform equally well or even outperform
most other solutions. This book uses various methods and approaches to
analyze and forecast time series.
This chapter uses recipes to read/write time series data and perform
simple preprocessing and Exploratory Data Analysis (EDA).
The following lists the recipes explored in this chapter.

Recipe 1-1. Reading Time Series Objects

Recipe 1-2. Saving Time Series Objects

© Akshay R Kulkarni, Adarsha Shivananda, Anoosh Kulkarni, V Adithya Krishnan 2023 1


A. R. Kulkarni et al., Time Series Algorithms Recipes,
https://doi.org/10.1007/978-1-4842-8978-5_1
Chapter 1 Getting Started with Time Series

Recipe 1-3. Exploring Types of Time Series Data

Recipe 1-4. Time Series Components

Recipe 1-5. Time Series Decomposition

Recipe 1-6. Visualization of Seasonality

 ecipe 1-1A. Reading Time Series Objects


R
(Air Passengers)
Problem
You want to read and load time series data into a dataframe.

Solution
Pandas load the data into a dataframe structure.

How It Works
The following steps read the data.

Step 1A-1. Import the required libraries.


import pandas as pd
import matplotlib.pyplot as plt

 tep 1A-2. Write a parsing function


S
for the datetime column.
Before reading the data, let’s write a parsing function.

date_parser_fn = lambda dates: pd.datetime.strptime(dates,


'%Y-%m')

2
Chapter 1 Getting Started with Time Series

Step 1A-3. Read the data.


Read the air passenger data.

data = pd.read_csv('./data/AirPassenger.csv', parse_dates =


['Month'], index_col = 'Month', date_parser = date_parser_fn)
plt.plot(data)
plt.show()

Figure 1-1 shows the time series plot output.

Figure 1-1. Output

The following are some of the important input arguments for read_csv.

• parse_dates mentions the datetime column in the


dataset that needs to be parsed.

• index_col mentions the column that is a unique


identifier for the pandas dataframe. In most time series
use cases, it’s the datetime column.

• date_parser is a function to parse the dates (i.e., converts


an input string to datetime format/type). pandas reads the
data in YYYY-MM-DD HH:MM:SS format. Convert to this
format when using the parser function.
3
Visit https://ebookmass.com
now to explore a rich
collection of eBooks and enjoy
exciting offers!
Chapter 1 Getting Started with Time Series

 ecipe 1-1B. Reading Time Series Objects


R
(India GDP Data)
Problem
You want to save the loaded time series dataframe in a file.

Solution
Save the dataframe as a comma-separated (CSV) file.

How It Works
The following steps read the data.

Step 1B-1. Import the required libraries.


import pandas as pd
import matplotlib.pyplot as plt
import pickle

Step 1B-2. Read India’s GDP time series data.


indian_gdp_data = pd.read_csv('./data/GDPIndia.csv', header=0)

date_range = pd.date_range(start='1/1/1960', end='31/12/2017',


freq='A')

indian_gdp_data ['TimeIndex'] = pd.DataFrame(date_range,


columns=['Year'])
indian_gdp_data.head(5).T

4
Chapter 1 Getting Started with Time Series

Step 1B-3. Plot the time series.


plt.plot(indian_gdp_data.TimeIndex, indian_gdp_data.
GDPpercapita)
plt.legend(loc='best')
plt.show()

Figure 1-2 shows the output time series.

Figure 1-2. Output

Step 1B-4. Store and retrieve as a pickle.


### Store as a pickle object
import pickle
with open('gdp_india.obj', 'wb') as fp:
        pickle.dump(IndiaGDP, fp)

### Retrieve the pickle object


with open('gdp_india.obj', 'rb') as fp:
     indian_gdp_data1 = pickle.load(fp)
indian_gdp_data1.head(5).T

Figure 1-3 shows the retrieved time series object transposed.

5
Random documents with unrelated
content Scribd suggests to you:
distributing a Project Gutenberg™ electronic work under this
agreement, disclaim all liability to you for damages, costs and
expenses, including legal fees. YOU AGREE THAT YOU HAVE NO
REMEDIES FOR NEGLIGENCE, STRICT LIABILITY, BREACH OF
WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE
FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving it,
you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or entity
that provided you with the defective work may elect to provide a
replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth in
paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and distribution
of Project Gutenberg™ electronic works, harmless from all liability,
costs and expenses, including legal fees, that arise directly or
indirectly from any of the following which you do or cause to occur:
(a) distribution of this or any Project Gutenberg™ work, (b)
alteration, modification, or additions or deletions to any Project
Gutenberg™ work, and (c) any Defect you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.
Section 3. Information about the Project
Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many small
donations ($1 to $5,000) are particularly important to maintaining tax
exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About Project


Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.

Project Gutenberg™ eBooks are often created from several printed


editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.

You might also like