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
-
how to conduct a business interview, including question preparation, possible assessments, and interview etiquette give me solution of this email as soon as possible
-
Mogul Corp is a newlyorganized company planning to produce and sell customized rubber shoes to be used mostly by athletes and students in different school levels. Since the company is new to the...
-
decoded bags Marketing Plan Report i. Title Cover ii. Executive Summary iii. Table of Content 1. Current Situation Analysis 1.1. Market Summary 1.1.1. Market Environment and Size 1.1.1.1. Geographics...
-
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...
-
List five ways to cool the human body in case of overheating. What is the best method in an industrial plant?
-
Count The Number Of Words In The Following String. [Hint: You Can Use Str_split With A Well-Designed Pattern To Separate The Words. Str_split(X, Pattern)[[1]] Extracts The Vector Of Words.] 'Dear...
-
Presented below are the financial statements for the Amphlett Corporation, as of year-end 2016 and 2015. The footnotes to the Amphlett Corporations financial statements revealed the following...
-
(EPS Concepts and Effect of Transactions on EPS) Chorkina Corporation, a new audit client of yours, has not reported earnings per share data in its annual reports to stockholders in the past. The...
-
Using the following project information Activity Optimistic Time Estimate(weeks) Most Likely Time Estimates (weeks) Pessimistic Time Estimates (weeks) Immediate Predecessor(s) A 2 3 5 none B 2.3 4 5...
-
In a typical month, the Monk Corporation receives 80 checks totaling $113,000. These are delayed four days on average. What is the average daily float? Assume 30 days in a month.
-
14. Verrett Corporation is a manufacturer that uses job-order costing. The company has supplied the following data for the just completed year: Raw materials purchased on account Raw materials (all...
-
Discuss three ways in which you see application of the financial reporting conceptual framework at Walmart. Through research and ( where appropriate ) visits to a local Walmart location, identify...
-
Brooks Company has the following balances for the current month: Direct materials used Direct labor $24,000 $40,000 Sales salaries $19,200 Indirect labor $4,800 Production manager's salary $9,600...
-
Question: I'm taking managerial accounting and have a quick question about calculating overhead allocation rates. I understand you divide total MOH by the total amounts of units of allocation. What I...
-
You are to write a short report/essay (maximum 3000 words): "Write a report/essay on what you would do as a Business Analyst and Manager of the Analytics Department in developing a set of guidelines...
-
A golf ball is thrown straight up in the air at a velocity of 8.3m/s. 1. Determine the maximum height of the golf ball. 2. How long will it take the ball to reach its maximum height? 3. How long will...
-
Consider the following feedback system, noting that it does not have a unity feedback structure: r Consider the plant P(s) Determine e(t) if w(t) = = wypad C(s) s +1' U W F(s) controller C(s) 1 (a...
-
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...
-
A set of financial statements: a. Is intended to assist users in evaluating the financial position, profitability, and future prospects of an entity. b. Is intended to assist the Internal Revenue...
-
What is the primary characteristic of the form of business organization called the sole proprietorship?
-
What is a business transaction? Give several examples of business transactions and several events that may occur that are not business transactions.
Study smarter with the SolutionInn App