Question: Please answer the question in python according to the template so the format matches exactly please. The file Invistico _ Airline _ LR . csv

Please answer the question in python according to the template so the format matches exactly please.
The file Invistico_Airline_LR.csv contains information from an airline using the alias Invistico Airline on customer satisfaction, as well as
details on each customer. The columns of interest are Gender, Age, Class, Flight_Distance, Departure_Delay_in_Minutes,
Arrival_Delay_in_Minutes, and satisfaction.
Read the file Invistico_Airline_LR.csv into a data frame.
Re-code the categorical variables Gender, Class, and satisfaction in to dummy variables.
Create a new data frame X from the predictor variables Gender_female, Age, Class_Eco, Flight_Distance, Departure_Delay_in_Minutes,
and Arrival_Delay_in_Minutes, in that order.
Create a response variable Y from the dummy variable satisfaction_satisfied.
Perform logistic regression on x and Y.
Print the parameters of the logistic regression model.
Ex: If only the variables Gender_female, Age, Class_Eco, Flight_Distance, and Departure_Delay_in_Minutes are used as predictors, the output
is:
const -1.681250
Gender_Female 2.868598
Age 0.000368
Class_Eco 0.350065
Flight_Distance -0.000354
Departure_Delay_in_Minutes -0.009452
dtype: float64
 Please answer the question in python according to the template so

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!