Exercise 2 (6 pts): Iris Dataset Iris flower dataset is a multivariate dataset which includes sepal and petal characteri

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Exercise 2 (6 pts): Iris Dataset Iris flower dataset is a multivariate dataset which includes sepal and petal characteri

Post by answerhappygod »

Exercise 2 6 Pts Iris Dataset Iris Flower Dataset Is A Multivariate Dataset Which Includes Sepal And Petal Characteri 1
Exercise 2 6 Pts Iris Dataset Iris Flower Dataset Is A Multivariate Dataset Which Includes Sepal And Petal Characteri 1 (104.36 KiB) Viewed 34 times
Exercise 2 (6 pts): Iris Dataset Iris flower dataset is a multivariate dataset which includes sepal and petal characteristics of three different iris flower species (Iris Setosa, Iris Virginica and Iris Versicolor). It was first introduced by Ronald Fisher in 1936 and since then has been widely used in many statistical classification projects as a test dataset to validate the proposed algorithms. (if you are curious about the dataset, you can read the following paper: The Use of Multiple Measurements in Taxonomic Problems.) Here are the images for these three flower species (images were taken from Wikipedia) Iris Setosa Iris Virginica Iris Versicolor Assume that you are working in a research lab, and you need to perform some analyses on the Iris dataset. You are given a csv file: iris_data.csv and starter code Analyzelris.py. Part A (2 pts): Write a function called read_iris(filename) to read the data from the given csv file into a list of lists. The retum value should be a list of lists such that: • Each list should be in the form: [sepal_length, sepal_width, petal length, petal width, variety • Convert sepal length, sepal_width, petal length, petal_width to float. Variety should be string • Your matrix should not include the header line that exists in the csv file. Partial output when the matrix is printed to console (full matrix is quite large): [[5.1, 3.5, 1.4, 0.2, 'Setosa'), (4.9, 3.0, 1.4, 0.2, 'Setosa'], [4.7, 3.2, 1.3, 0.2, Setosa'), 14.6, 3.1, 1.5, 0.2, Setosa'l. (5.0, 3.6, 1.4, 6.2, Setosa'), (5.4, 3.9, 1.7, 0.4, 'Setosa'l, [4.6, 3.4, 1.4, 0.3, Setosa'i, [5.0, 3.4, 1.5, 0.2, 'Setosa'i, [4.4, 2.9, 1.4, 0.2, 'Setosa'l, [4.9, 3.1, 1.5, 0.1, 'Setosa'), (5.4, 3.7, 1.5, 0.2, 'Setosa'], [4.8, 3.4, 1.6, 0.2. *Setosa'l. (4.8, 3.0, 1.4, 0.1, 'Setosa'], [4.3, 3.0, 1.1, 0.1, 'Setosa'), [5.8, 4.0, 1.2, 0.2, 'Setosa'], [5.7, 4.4, 1.5, 0.4, 'Setosa'), (5.4, 3.9, 1.3, 0.4, 'Setosa'), (5.1, 3.5, 1.4, 0.3, 'Setosa'), (5.7, 3.8, 1.7, 0.3, *Setosa'), (5.1, 3.8, 1.5, 0.3, 'Setosa'l. (5.4, 3.4, 1.7, 0.2, 'Setosa'l.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply