Question: # import the necessary modules female = int ( input ( ) ) age = float ( input ( ) ) economy = int (

# import the necessary modules
female = int(input())
age = float(input())
economy = int(input())
delay = float(input())
flights = # read in the file Invistico_Airline_LR.csv
# remove missing data
flights.dropna(axis =0, inplace = True)
flights = # recode the categorical variables Gender, Class, and satisfaction as dummy variables
X = # create a new data frame from the variables Gender_Female, Age, Class_Eco, and Arrival_Delay_in_Minutes, in that order.
X = add_constant(X)
Y = # set Y as the response variable satisfaction_satisfied
model = # perform logistic regression on X and Y
ex = # create an array with 1 for the intercept, and the user input values female, age, economy, and delay
prediction = # find the predicted probablility that a customer with the user input values is satisfied
print(prediction)

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!