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

computer science

Description

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?

 

 

1.    The following code is relevant to this question:


Related Questions in computer science category