Challenge The objective of this exercise is to discriminating between three species of Iris from the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Challenge The objective of this exercise is to discriminating between three species of Iris from the measurements of their petals and sepals. Your challenge will be to write your code in 20 lines or less, not including comment lines. Out [2]: array([[1., 5.1, 3.5, 1.4, 0.2, 1. ], [2., 4.9, 3., 1.4, 0.2, 1. ], [3., 4.7, 3.2, 1.3, 0.2, 1. ], 4.6, 3.1, 1.5, 0.2, 1. 1, 5. 3.6, 1.4, 0.2, 1. ]]) In [ ]: In [ ]: In [ ]: [4. [5. 2 2 # The name of each column is placed in the following list: column_name = ['num', 'sepal length', 'sepal Width', 'petal length', 'petal width', 'species'] # Using a for Loop and the NumPy Library: # print the minimum value of each column # print the maximum value of each column # print the mean of each column # Create a histogram showing the number of flowers for each species # Create a subplot that shows 4 histograms # The first histogram shows the categories of sepal Lengths # The second histogram shows the categories of sepal widths # The third histogram shows the categories of petal Lengths # The fourth histogram shows the categories of petal widths #Label the x-axis of each histogram by the name of the column you are looking at #make sure the the Labels do not overlap with the figures In [ ]: # Create a subplot show two plots on the same row. # for the first subplot, use plt.scatter to graph the sepal width as a function of the sepal Length # for the second subplot, use plt.scatter to graph the petal width as a function of the petal Length # Label the x and y axis Challenge The objective of this exercise is to discriminating between three species of Iris from the measurements of their petals and sepals. Your challenge will be to write your code in 20 lines or less, not including comment lines. Out [2]: array([[1., 5.1, 3.5, 1.4, 0.2, 1. ], [2., 4.9, 3., 1.4, 0.2, 1. ], [3., 4.7, 3.2, 1.3, 0.2, 1. ], 4.6, 3.1, 1.5, 0.2, 1. 1, 5. 3.6, 1.4, 0.2, 1. ]]) In [ ]: In [ ]: In [ ]: [4. [5. 2 2 # The name of each column is placed in the following list: column_name = ['num', 'sepal length', 'sepal Width', 'petal length', 'petal width', 'species'] # Using a for Loop and the NumPy Library: # print the minimum value of each column # print the maximum value of each column # print the mean of each column # Create a histogram showing the number of flowers for each species # Create a subplot that shows 4 histograms # The first histogram shows the categories of sepal Lengths # The second histogram shows the categories of sepal widths # The third histogram shows the categories of petal Lengths # The fourth histogram shows the categories of petal widths #Label the x-axis of each histogram by the name of the column you are looking at #make sure the the Labels do not overlap with the figures In [ ]: # Create a subplot show two plots on the same row. # for the first subplot, use plt.scatter to graph the sepal width as a function of the sepal Length # for the second subplot, use plt.scatter to graph the petal width as a function of the petal Length # Label the x and y axis
Expert Answer:
Answer rating: 100% (QA)
import numpy as np import matplotlibpyplot as plt data nparray1 51 35 14 02 1 2 49 3 14 02 1 3 47 32 ... View the full answer
Related Book For
Practicing Statistics Guided Investigations For The Second Course
ISBN: 9780321586018
1st Edition
Authors: Shonda Kuiper, Jeff Sklar
Posted Date:
Students also viewed these programming questions
-
Inductive Reasoning in Your Life. Give an example of a situation in which you used inductive reasoning in everyday life. Explain the situation, describe the steps in your thinking, and explain why it...
-
The count rate of nuclear radiation coming from a radioactive sample containing 1281 varies with time as follows Time t(minute): Count rate R(x10 s-): The mean life is 25 min 36 min 50 min 30 min 0...
-
As a manager, you must be able to identify the growth and diversification goals your organization hopes to achieve and choose the most successful ways in which to meet them, whether through mergers,...
-
7 8 0 The following data is provided for the Piedmont Corporation. All costs are actual costs. Complete the cost flows diagram attached to this problem and calculate CGM and CGS. Prepare journal...
-
A hot-film probe is mounted on a cone-and-rod system in a sea-level air stream of 45 m/s, as in Fig. P7.93. Estimate the maximum cone vertex angle allowable if the flow-induced bending moment at the...
-
Find each limit. Transform to problems involving a continuous variable x. Assume that a > 0? a. b. c. d. lim Va lim Vn linx n(G-1) lim n(Va 1) lim n(V 1)
-
Suppose that you initially invested \($10,000\) in the Stivers mutual fund and \($5,000\) in the Trippi mutual fund. The value of each investment at the end of each subsequent year is provided in the...
-
Reagan Corporation is a wholesale distributor of truck replacement parts. Initial amounts taken from Reagan's records are as follows: Inventory at December 31 (based on a physical count of goods in...
-
On April 1, 2022, an investor bought 2500 shares of PT Telkom Tbk. With a price of IDR 4550 per share. The investor gets a margin of 65% with a maintenance margin of 30%. Try to determine what the...
-
The bonding strength of an adhesive has been studied as a function of temperature (T) in C and pressure (P) as kg/cm. Data obtained are given. 30 74 Pressure 120 140 Temperature 168 90 30 138 104 90...
-
Use the following theorem to evaluate the given integrals. Theorem: If f is integrable on a closed interval containing the three points a, b, and, c then cb C [ f(x) dx = [ f(x) dx + [ f(x a a no...
-
Mr Heng derived the following Singapore sourced income in the year 2022: (i) (ii) Employment income of $60,000 Interest income of $300 from a loan made to a friend (iii) Dividend income of $800 from...
-
3. A, B and C are partners sharing profits and losses equally. The balance sheet at 31st December 2020 is as follows. Assets Liabilities Amount Amount (RO) (RO) Creditors 5,000 Cash at Bank 3,000...
-
Provide step by step guide on how to solve these financial problems including which formulas to use and why? I am trying to learn which formulas to use in these examples and am confused on what...
-
A 6.0 g ice cube at -10C is in a rigid, sealed container from which all the air has been evacuated (which means you only have to consider the ice cube). Steam has cy = 1500 J/kg. K. . Notice that...
-
Perpetual Inventory Using Weighted Average Beginning inventory, purchases, and sales for WCS12 are as follows: Oct. 1 Inventory 300 units at $8 13 Sale 180 units 22 29 Purchase Sale 380 units at $11...
-
Cycloid whose Cers. A particle slide down the are of a smoth axis is verticle and vertex lowest prove that the time vertick occupied in falling down the first half of the hight is equal to the tired...
-
If there is an unrealized holding gain on available-for-sale investments, it is reported as?
-
To test for equal variances for the whole- plot portion of the model in Question 15, calculate the aver-age for each whole- plot unit. In our study, the whole- plot unit is Subject. Thus, calculate...
-
Compare the sums of squares (SS) in Question 8 to those in Question 15. Since the data set is still based on the 48 test scores, the total SS stays the same. List which SS stayed the same and...
-
Use statistical software to calculate the F-statistic and find the p-value. Use the p-value to draw conclusions from this study.
-
A4-stroke, 4-cylinder, single acting spark ignition petrol engine develops \(20 \mathrm{~kW}\) brake power at \(3000 \mathrm{rpm}\). The following data are given : Bore \(=65 \mathrm{~mm}\), Stroke...
-
A six cylinder four stroke I.C. Engine is to develop \(100 \mathrm{~kW}\) i.p. at 800 RPM. The stroke to bare ratio is 1.25. Assuming Mechanical efficiency of \(80 \%\) and break mean effective...
-
The following data is available for a four stroke petrol engine stroke volume \(=6\) Litres. Mean effective pressure \(=6\) bar. Speed of engine \(=750\) RPM. Calculate i.p. of the engine.
Study smarter with the SolutionInn App