Member-only story

How to use Tensorflow’s Long Short Term Memory to make predictions on car sales

Crystal X
5 min readApr 7, 2023

--

In an earlier blog post I reviewed a YouTube video created by Krish Naik, where he coded a long short term memory model to make predictions on univariate time series data. In this post I intend to elaborate on that review by further analysing the code. One thing that I did do was to make some modifications to the code that Krish wrote so that any number of univariate datasets can be used with the model.

I have written the program in Google Colab, which is a free online Jupyter Notebook hosted by Google. This is a great platform to use because it can be accessed from any computer that has internet access, but its one drawback is that it does not have a sufficient undo function. Care needs to be taken, therefore, not to accidentally overwrite or delete valuable code.

When I created the program, I imported the libraries that would be needed to execute the program, being:-

  1. Numpy to create numpy arrays and carry out mathematical computations,
  2. Pandas to create dataframes and process data,
  3. Tensorflow to create the neural network, and
  4. Matplotlib to visualise the data.
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow.keras.models import…

--

--

Crystal X
Crystal X

Written by Crystal X

I have over five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.

No responses yet