We proceed with the recipe as follows:
- We start by loading the necessary libraries. This will include the scikit-learn dataset library for access to the iris dataset. Use the following code:
import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from sklearn import datasets
- Next, we start a graph session and load the data as we need it. Remember that we are loading the first and fourth variable in the iris dataset as they are the sepal length and sepal width. We are loading the target variable, which will take on the value 1 for I. setosa and -1 otherwise. ...