Developing a digital twin
In this section, we will develop a digital twin with Python, PyTorch, and pandas. Let’s begin with the first step.
Preparing the development environment
Let’s prepare the development environment. From the command line, install the required packages:
$ pip3 install seaborn scikit-learn pandas matplotlib notebook $ pip3 install torch torchvision torchaudio --index-url https:// download.pytorch.org/whl/cpu
Then, start the notebook. From the command line, run the following command:
$ jupyter lab --allow-root --NotebookApp.token='' --NotebookApp. password=''
Finally, connect to http://localhost:8888
.
Alternatively, you can simply start Jupyter Notebook using the Docker image released with the official repository of this book. The code for this chapter is available in the official repository at https://github.com/PacktPublishing/Hands-On-Industrial-Internet-of-Things-Second-Edition.
From the Chapter 14 directory...