===== Time series analysis ===== Goal: //How does time series analysis differ from other machine learning models?// ==== Prepare for the lab ==== * Read the [[https://otexts.com/fpp3/graphics.html|Chapter 2. Time series graphics]], [[https://otexts.com/fpp3/regression.html|Chapter 7. Time series regression models]] and [[https://otexts.com/fpp3/arima.html|Chapter 9. ARIMA models]] from [[https://otexts.com/fpp3/|Forecasting: principles and practice]] to get the general idea of core concepts related to time series analysis. * //The textbook contains code in R, so you don't need to pay much attention to it - we'll be doing analogous things in Python during the lab.// ==== Materials ==== - Q&A Session: - How time series data differ from other data? - Explain the terms: trend, seasonal, cyclic - What is the difference between stationary and non-stationary time series data? - What are the AR (Autoregressive) and MA (Moving Average) models? - When we develop a machine learning model, we need some input feature matrix (X) and some vector (y) we want to predict. This is a bit tricky when it comes to time series. Which features can we include for this purpose? - Practice session: - Today's lab is placed in one Jupyter Notebook: [[https://colab.research.google.com/drive/1SffKHLA1fTTOFDQEqtlLXu32H70fBvlJ?usp=sharing|Time series analysis]] - Advanced practice session: - If you want to evaluate more advanced models, go to the optional Advanced section in the notebook. ==== Learn more! ==== * R.J. Hyndman & G. Athanasopoulos, G. -- [[https://otexts.com/fpp3/|Forecasting: principles and practice]] (OTexts, 2021) -- interesting book, full text online, code in R * Brockwell, P.J., Davis, R.A. (Eds.), 2002. Introduction to Time Series and Forecasting, Springer Texts in Statistics. Springer New York, New York, NY. [[https://doi.org/10.1007/b97391|DOI:10.1007/b97391]], [[http://home.iitj.ac.in/~parmod/document/introduction%20time%20series.pdf| full text pdf]] -- a standard reference textbook; old but gold * Aileen Nielsen, tutoriale video: [[https://youtu.be/zmfe2RaX-14|Time Series Analysis – PyCon 2017]], [[https://youtu.be/v5ijNXvlC5A|Modern Time Series Analysis – SciPy 2019]]