Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
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.

Lab platform
Lab Info
Level
Beginner
Last updated
Sep 06, 2025
Duration
45m

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.

About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

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.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight