Learn practical skills, build real-world projects, and advance your career

Simple sequential model

  • Data - Random Numbers
  • Framework - Tensorflow 2.2

The notebook demonstrates how to create a very basic sequential model with random data.
The data generated has the following characteristics

  1. Seasonality
  2. Trend
  3. Noise

The method implemeted also showcases the use of shuffled, windowed batches for training the model.
If you find this notebook useful, connect with me on github for more data science and ML engineering content.

try:
  %tensorflow_version 2.x
except Exception:
  pass
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
print(tf.__version__)
2.2.0
def plot_series(time, series, format="-", start=0, end=None):
  """For plotting a simple time series"""
  plt.plot(time[start:end], series[start:end], format)
  plt.xlabel("Time")
  plt.ylabel("Value")
  plt.grid(True)

Functions for generating random time series data