logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Sahil SachdevaComputer science
(5/5)

845 Answers

Hire Me
expert
Gary BartonAccounting
(5/5)

846 Answers

Hire Me
expert
Connorr EvansEngineering
(5/5)

701 Answers

Hire Me
expert
Johan CornerOthers
(5/5)

870 Answers

Hire Me
Python Programming
(5/5)

What is the overall purpose of this code? What does this code hope to predict?

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

1. The following code is relevant to this question:

Question 1a:

What is the overall purpose of this code?  What does this code hope to predict?  Based on what factors does it form that predictions (i.e. what are the independent/predictor variables of the model)?

Question 1b:

What is the purpose of lines 31 through 36?  Why do apply such code to passenger class and sex, but not other variables such as age and fare paid?

Question 1c:

What does line 38 do?  (Be specific.)

Question 1d:

What is the purpose of lines 39 and 40?  What are we trying to avoid by using lines 39 and 40?

Question 2:

Suppose lines 52, 53, and 55 produce the following results.

Interpret lines 52, 53, and 55 and their output in the context of this question.  Be thorough in your explanation.  What does this imply about survival probabilities?

Question 3:

A data analyst performs a linear regression analysis on a piece of data.  Suppose the analysis computes an r2 value on a randomly selected subset of data that is used as a training set.  The analysis also computes an r2 value on the remainder of the data set which is used as a testing set.  The r2 value on the training data set was 0.7813.  The r2 value on the testing data set was 0.7754.  Assume that both the training data set and testing data set have large sample sizes (i.e., there is no problem with the samples being too small).

(a) What should the analyst conclude about the predictive ability of the model?

(b) If the r2 value on the testing data set was 0.082 (instead of 0.7754), what should the analyst conclude?

Question 4:

Suppose there is a Pandas data frame called weeklyEmployeeInfo.  In a column of the data frame titled “Base Hourly”, the hourly base pay of the employee is listed (e.g. an entry of 12 in this column means $12 per hour).  A column titled “HoursWorked” lists the total number of hours worked by the employee over the past week.  An employee is paid their hourly base pay for up to the first 40 hours of work.  Any work beyond the first 40 hours is paid at a rate of 1.5 times the hourly base pay.  Write code using Numpy and/or Pandas functions to compute the sum total of all wages to be paid to the employees this week.

Question 5:

 

Define a Python function that converts Celsius temperatures to Fahrenheit.  Then use the function to convert each temperature -40.0C, -39.0C, -38.0C, …, 49.0C, 50.0C.  Try to be efficient in the code you write.  Print the converted temperatures to the console window.  (The formula from Celsius (C) to Fahrenheit (F) is F = 1.8 * C + 32.)

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme