Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Labs

Identifying Iris Plants Using Machine Learning

We are going to replicate a famous experiment performed by Sir Ronald Fisher in his 1936 paper *The use of multiple measurements in taxonomic problems*. Why are we repeating a nearly 100-year-old experiment? Because now we can let a machine learn how to do it instead of doing the math ourselves. Yeah! In this lab, you will see how to load data using TensorFlow's dataset API, visualize it using Pandas, and then train a machine learning model using Keras. You will be using Python in a Jupyter notebook, but all of the code is provided. No experience with any of those is required, but some familiarity with programming will help you get more out of this lab. **NOTE: **Please use the lab's guide for this activity.

Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 45m
Published
Clock icon Aug 28, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Load the Data

    1. TensorFlow provides the training data you need in the TensorFlow Datasets API. Using the Datasets API, download the training data and split it into a NumPy array of features and a NumPy array of labels.

    2. TensorFlow also provides the testing data, but it is not available through the API. Download this test data, load it, and split it into a NumPy array of features and a NumPy array of labels.

    3. Pandas provides a convenient way to visualize the data (the next objective), so combine the features and labels in a Pandas DataFrame for the training data, and a DataFrame for the testing data.

  2. Challenge

    Visualize the Data

    All of these steps will help you understand the data you are working with more fully:

    1. Print counts of the number of samples in the training and test datasets.

    2. View common statistics about the features in each dataset.

    3. View the raw data from 15 examples.

    4. Plot each feature against all other features to see if there are any natural groupings.

    5. Plot the data to show how strongly each feature separates the data.

  3. Challenge

    Teach the Machine About Irises

    Create your model and make predictions!

    1. Create and compile a Keras model for classifying the Iris data. Include accuracy as a model metric for easy evaluation.

    2. Fit the Keras model to the training data.

    3. Evaluate the model's accuracy on the test data set.

    4. Show the model's predictions for the test data.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans