5.8 LAB: Structuring data using scale() and MinMaxScaler() The hmeq_small dataset contains information on 5960 home...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
5.8 LAB: Structuring data using scale() and MinMaxScaler() The hmeq_small dataset contains information on 5960 home equity loans, including 7 features on the characteristics of the loan. Load the hmeq_small.csv data set as a data frame. Standardize the data set as a new data frame. Normalize the data set as a new data frame. Print the means and standard deviations of both the standardized and normalized data. Ex: Using the first 100 rows, found in hmeq_sample.csv, the output is: The means of hmeqStand are LOAN MORT DUE 1.914178e-17 VALUE -1.790682e-18 YOJ -7.235161e-17 CLAGE -4.194176e-17 CLNO -6.033821e-17 6.125368e-17 DEBTINC dtype: float 64 The standard deviations of hmeqStand are LOAN MORT DUE VALUE YOJ CLAGE CLNO MORTDUE VALUE YOJ CLAGE CLNO 1.005797 1.005420 1.005666 DEBTINC dtype: float 64 The means of hmeqNorm are LOAN 1.005602 1.005479 1.017700 MORTDUE VALUE 0.358735 0.299044 0.292135 0.448986 0.346377 0.624927 -4.984675e-17 DEBTINC dtype: float 64 The standard deviations of hmeqNorm are LOAN 0.247183 0.187587 0.671006 1.005141 0.269531 MORTDUE VALUE YOJ CLAGE CLNO DEBTINC dtype: float 64 The standard deviations of hmeqNorm are LOAN MORT DUE VALUE YOJ CLAGE CLNO 0.358735 0.299044 0.292135 0.448986 0.346377 0.624927 511224.3550566.qx3zqy7 DEBTINC dtype: float 64 LAB ACTIVITY 0.247183 0.187587 0.237945 0.226345 0.188681 0.222946 5.8.1: Structuring data using scale() and MinMaxScaler() 1 import pandas as pd 2 from sklearn import preprocessing 3 4 hmeq = # Read in the file hmeq_small.csv 5 6 # Standardize the data 7 standardized = # Your code here 8 9 # Output the standardized data as a data frame 10 hmeqStand = # Your code here 11 12 # Normalize the data 13 normalized = # Your code here 14 15 # Output the normalized data as a data frame 16 hmeqNorm = # Your code here 0.269531 Develop mode Submit mode main.py 17 18 # Print the means and standard deviations of hmeqstand and hmeqNorm 19 print("The means of hmeqStand are ", # Your code here) 0/1 Load default template... Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. DEBTINC dtype: float 64 The standard deviations of hmeqNorm are LOAN MORTDUE VALUE YOJ CLAGE CLNO 0.624927 511224.3550566.qx3zqy7 DEBTINC dtype: float 64 LAB ACTIVITY 0.247183 0.187587 0.237945 0.226345 0.188681 0.222946 5.8.1: Structuring data using scale() and MinMaxScaler() 4 hmeq = # Read in the file hmeq_small.csv 5 6 # Standardize the data 7 standardized = # Your code here 8 9 # Output the standardized data as a data frame 10 hmeqStand = # Your code here 11 12 # Normalize the data 13 normalized = # Your code here 14 15 # Output the normalized data as a data frame 16 hmeqNorm = # Your code here Develop mode 17 18 # Print the means and standard deviations of hmeqstand and hmeqNorm 19 print("The means of hmeqStand are ", # Your code here) 20 print("The standard deviations of hmeqStand are ", # Your code here) 21 print("The means of hmeqNorm are " # Your code here) 22 print("The standard deviations of hmeqNorm are ", # Your code here) Submit mode 0.269531 main.py Enter program input (optional) If your code requires input values, provide them here. 0/1 Load default template... Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. 5.8 LAB: Structuring data using scale() and MinMaxScaler() The hmeq_small dataset contains information on 5960 home equity loans, including 7 features on the characteristics of the loan. Load the hmeq_small.csv data set as a data frame. Standardize the data set as a new data frame. Normalize the data set as a new data frame. Print the means and standard deviations of both the standardized and normalized data. Ex: Using the first 100 rows, found in hmeq_sample.csv, the output is: The means of hmeqStand are LOAN MORT DUE 1.914178e-17 VALUE -1.790682e-18 YOJ -7.235161e-17 CLAGE -4.194176e-17 CLNO -6.033821e-17 6.125368e-17 DEBTINC dtype: float 64 The standard deviations of hmeqStand are LOAN MORT DUE VALUE YOJ CLAGE CLNO MORTDUE VALUE YOJ CLAGE CLNO 1.005797 1.005420 1.005666 DEBTINC dtype: float 64 The means of hmeqNorm are LOAN 1.005602 1.005479 1.017700 MORTDUE VALUE 0.358735 0.299044 0.292135 0.448986 0.346377 0.624927 -4.984675e-17 DEBTINC dtype: float 64 The standard deviations of hmeqNorm are LOAN 0.247183 0.187587 0.671006 1.005141 0.269531 MORTDUE VALUE YOJ CLAGE CLNO DEBTINC dtype: float 64 The standard deviations of hmeqNorm are LOAN MORT DUE VALUE YOJ CLAGE CLNO 0.358735 0.299044 0.292135 0.448986 0.346377 0.624927 511224.3550566.qx3zqy7 DEBTINC dtype: float 64 LAB ACTIVITY 0.247183 0.187587 0.237945 0.226345 0.188681 0.222946 5.8.1: Structuring data using scale() and MinMaxScaler() 1 import pandas as pd 2 from sklearn import preprocessing 3 4 hmeq = # Read in the file hmeq_small.csv 5 6 # Standardize the data 7 standardized = # Your code here 8 9 # Output the standardized data as a data frame 10 hmeqStand = # Your code here 11 12 # Normalize the data 13 normalized = # Your code here 14 15 # Output the normalized data as a data frame 16 hmeqNorm = # Your code here 0.269531 Develop mode Submit mode main.py 17 18 # Print the means and standard deviations of hmeqstand and hmeqNorm 19 print("The means of hmeqStand are ", # Your code here) 0/1 Load default template... Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. DEBTINC dtype: float 64 The standard deviations of hmeqNorm are LOAN MORTDUE VALUE YOJ CLAGE CLNO 0.624927 511224.3550566.qx3zqy7 DEBTINC dtype: float 64 LAB ACTIVITY 0.247183 0.187587 0.237945 0.226345 0.188681 0.222946 5.8.1: Structuring data using scale() and MinMaxScaler() 4 hmeq = # Read in the file hmeq_small.csv 5 6 # Standardize the data 7 standardized = # Your code here 8 9 # Output the standardized data as a data frame 10 hmeqStand = # Your code here 11 12 # Normalize the data 13 normalized = # Your code here 14 15 # Output the normalized data as a data frame 16 hmeqNorm = # Your code here Develop mode 17 18 # Print the means and standard deviations of hmeqstand and hmeqNorm 19 print("The means of hmeqStand are ", # Your code here) 20 print("The standard deviations of hmeqStand are ", # Your code here) 21 print("The means of hmeqNorm are " # Your code here) 22 print("The standard deviations of hmeqNorm are ", # Your code here) Submit mode 0.269531 main.py Enter program input (optional) If your code requires input values, provide them here. 0/1 Load default template... Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
18. Equal volumes of two solutions containing 3.65g of HCl and 4.0 g of NaOH respectively are mixed. The pli of the mixture is 2) <7 3) >7 19. When Imi of 0.IN HCIIS added to 1 litre of a solution of...
-
A flashlight can be made that is powered by the induced current from a magnet moving through a coil of wire. The coil and magnet are inside a plastic tube that can be shaken causing the magnet to...
-
Ann Donnelly is a senior audit manager in a Toronto office of a public accounting firm. Her prospects for promotion to partner are excellent if she continues to perform at the same high-quality level...
-
An effective way to learn how companies respond to the competing pressures to be globally integrated and locally responsive is to study them in action. Referring back to Exhibit 6.3, search online...
-
Derby Company prepares monthly cash budgets. Relevant data from operating budgets for 2014 are: All sales are on account. Collections are expected to be 60% in the month of sale, 25% in the first...
-
Give an Example NoSQL and describes is history and evolution in relation to databases?
-
For the bilinear quadrilateral element specified in the figure below: y 4 3 (0, 1) (2, 1) 1 (0, 0) 2 (2, 0) Compute the element shear stiffness matrix (ke) for the Reissner-Mindlin plate theory using...
-
HiLo, Inc., doesn't face any taxes and has $100 million in assets, currently financed entirely with equity. Equity is worth $50 per share, and book value of equity is equal to market value of equity....
-
How much do you owe in federal income taxes in that year? You are single and earned $85,000 in 2021. You contributed $5,000 to a tax-deferred retirement account. You do not itemize your deductions.
-
John was riding home from work on a bus at 11:00 PM in the evening. At his stop, John exits the Bus and begins to cross the street. John is hit by a car driven by Michael. John is killed, flung...
-
(a) All firms in a perfectly competitive industry face the same long-run average cost curve, AC = 0.05q 5 + 500/q, and the same long-run marginal cost curve given by MC = 0.1q 5. The market demand...
-
Address the following: 1. As someone working on an HIV self-test project among adolescents and young adults conduct a Self-knowledge analysis and find your Arena, your blind spot, and your Facade. ...
-
2. As shown in the figure above a person whose eye level is 5 feet above the ground stands on the top of a hill overlooking a valley. The shape of the valley is modeled by the graph of f(x) = 50...
-
Determine the center and radius of each circle. Sketch each circle. 4x 2 + 4y 2 9 = 16y
-
Larry and Lisa Williams, both 33 years old, have been married for 9 years. They live at 638 Arctic Way, Fairbanks, AK 99701. Lisa's Social Security number is 445- 81-1423 and Larry's is 798-09-8526....
-
For each of the following cases, indicate the filing status for the taxpayer(s) for 2012 using the following legend: A - Single B - Married, filing a joint return C - Married, filing separate returns...
-
Kent Pham, CPA, is a 45-year-old single taxpayer living at 169 Trendie Street, La Jolla, CA 92037. His Social Security number is 865-68-9635. In 2012, Kent's W-2 as the controller of a local...
-
Orvil Companys net profit margin percentage is 4.5%, its total asset turnover is 2.4, and its equity multiplier is 1.5. What is the companys return on equity? a. 2.8% b. 7.2% c. 16.2% d. 10.7%
-
Obtain the most recent annual report or SEC filing 10-K of a publicly traded company that interests you. It may be a local company or it may be a company in an industry that you would like to know...
-
Endless Mountain Company manufactures a single product that is popular with outdoor recreation enthusiasts. The company sells its product to retailers throughout the northeastern quadrant of the...
Study smarter with the SolutionInn App