- Setting up Python
- Exploring Time Series Data
- Making Univariate Predictions with Temperature Data
- Predictions with SARIMA
- Predictions with Basic Neural Network
- Predictions with LSTM
- Making Multivariate Predictions
To get started you will need git installed on your computer.
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Change to your local user directory.
Let's put our code in a local user directory named 'repo' (You don't have to use the name repo, or any name you like) . Create the directory by using the following commands:
$ cd
mkdir repo
Change to the 'repo' directory that you just created. This is where you will place your code.
cd repo
Inside the code directory, clone the repository for this workshop:
repo$ git clone https://github.com/pyladieshamburg/getting-started-raspberry-pi.git
Change directory, so that you are inside the cloned repository:
repo$ cd getting-started-raspberry-pi
Create a python virtual environment. The name of the virtual environment is 'env'. You may name the environment whatever you like.
getting-started-raspberry-pi$ python3 -m venv env
Activate the newly created virtual environment
getting-started-raspberry-pi$ source env/bin/activate
You have successfully activated your environment when the name of your environment is prefixed at the command line:
(env) getting-started-raspberry-pi$
Now we need to install the required packages to use the code.
(env) getting-started-raspberry-pi$ pip install -r requirements.txt
We must tell Jupyter notebook how to find your python kernel:
(env) getting-started-raspberry-pi$ pip install tornado
(env) getting-started-raspberry-pi$ pip install ipykernel
# Create the kernel (from within the virtual environment that we created above)
(env)$ python -m ipykernel install --user --name env --display-name "PyLadies-Time-Series"
Download data we will use for the workshop:
https://secure.sonnenstein.org/nextcloud/index.php/s/GPB4fg4xcFMcv58
https://secure.sonnenstein.org/nextcloud/index.php/s/Zmp4GnRh7N8S3ov
Let's look at some code. Start your Jupyter notebook:
(env) getting-started-raspberry-pi$ jupyter-lab
In the data-exploration exercise, you create and visualize time series data.
You also examine some important characteristics of time series such as seasonality and trend ad conclude by about learning commons tools for time series analysis.
In these exercises you will experiment with different approaches to making univariate time series with predictions.
Before you build use complex techniques for univariate time series prediction, traditional approaches should also be implemented as a baseline. The predictions-with-sarima you focus on building a SARIMA Model and different ways to select SARIMA hyperparameters.
In the predictions-with-neural-network exercise, you will set up a basic LSTM and experiment with options for training the best model.
In the predictions-with-lstm exercise, you will set up a basic neural network and experiment with options for training the best model.
The prediction-season exercise - for fun - you use both temperature and humidy to predict the season of the year.