Answered step by step
Verified Expert Solution
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.
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started