Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MIn import numpy as np import sklearn.datasets iris_observations sklearn.datasets.load iris() data iris_observations.data In print( Shape:, data.shape) In : sepal_length, sepal_width, pedal_length, pedal_width - 0, 1.

image text in transcribedimage text in transcribedimage text in transcribed

MIn import numpy as np import sklearn.datasets iris_observations sklearn.datasets.load iris() data iris_observations.data In print( Shape:", data.shape) In : sepal_length, sepal_width, pedal_length, pedal_width - 0, 1. 2,3 print( "The first flower has measurements:") print ( "I sepal length X width: %.2f cm X %.2f cm" % (data[O, sepal-length], data[O, sepal-width))) print( "I pedal length X width: %.2f cm X 8.2f cm" % (datato, pedal length, datato, pedal width)) Q1 Which flower has the longest pedal (in terms of length)? Save your answer as the row index of the observation In longest_pedal_index -None # YOUR CODE HERE raise NotImplementedError) In assert (longest_pedal_index is not None) assert(type (longest_pedal_index) in [int, np.int, np.int64])

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions