We will proceed with the recipe as follows:
- We will start by loading the necessary libraries:
import random import string import numpy as np import tensorflow as tf
- We will now create the reference dataset. To show succinct output, we will only make each dataset be comprised of 10 addresses (but it can be run with many more):
n = 10 street_names = ['abbey', 'baker', 'canal', 'donner', 'elm']street_types = ['rd', 'st', 'ln', 'pass', 'ave'] rand_zips = [random.randint(65000,65999) for i in range(5)] numbers = [random.randint(1, 9999) for i in range(n)] streets = [random.choice(street_names) for i in range(n)] street_suffs = [random.choice(street_types) for i in range(n)] zips = [random.choice(rand_zips) for i in range(n)] ...