How to interpret the output?

QuestionsQuestions4 SkillsProDec, 10 2025
094

Great question! You've likely run the script and are now looking at the large array of numbers.

Here's how to interpret the output you're seeing from print(iris.data):

  • Rows are Samples/Flowers: Each line that looks like [5.1 3.5 1.4 0.2] represents a single Iris flower. There are 150 such rows in total, one for each flower in the dataset.
  • Columns are Features/Measurements: Within each row, the numbers correspond to different measurements of that particular flower. For the Iris dataset, these 4 measurements (features) are typically:
    1. Sepal Length (cm)
    2. Sepal Width (cm)
    3. Petal Length (cm)
    4. Petal Width (cm)

So, for example, the first row [5.1 3.5 1.4 0.2] means the first flower sample has a sepal length of 5.1 cm, a sepal width of 3.5 cm, a petal length of 1.4 cm, and a petal width of 0.2 cm.

This data array is the input that machine learning models will use to learn and make predictions.

0 Comments

no data
Be the first to share your comment!