
Figure 5.
Project file
The document that you are creating is not a static web page. It is an interactive environment that lets you write
and execute your Python code to implement an LSTM RNN by using the TensorFlow framework.
2.3
Colab notebook setup and package importing
To implement and train an LSTM RNN, install the Tensorflow 2.4.0 framework on your Google Colab notebook by
using the packet index package (PIP) command.
%pip install tensorflow==2.4.0
Note:
PIP is already installed on your Google Colab notebook.
Using the Python commands, import the following packages:
•
Pandas
Open-source software library for data manipulation and analysis.
import pandas as pd
•
Numpy
Open-source software library, adding support for large, multidimensional
, along with a
large collection of
to operate on these arrays.
import numpy as np
•
Tensorflow
Open-source software library for machine learning, which provides optimized modules to implement artificial
intelligence (AI) algorithms.
import tensorflow as tf
•
Sklearn
A package providing several common utility functions and transformer classes to change raw feature vectors
into a representation that is more suitable for the downstream estimators.
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from sklearn.model_selection import train_test_split , StratifiedShuffleSplit
from sklearn.metrics import confusion_matrix
•
OS
The Python language OS module has several useful functions to make the program interact with the
computer operating system.
import os
UM3053
Colab notebook setup and package importing
UM3053
-
Rev 1
page 5/39