Question

0.3 Question 2 [2 marks] Q2 (i) [ 0.5 marks] Fit a logistic regression model using the relevant features from the training portion of the transactions data. You should use the given variable to store the fitted logistic regression model. You should also use the statsmodels package for logistic regression. [ ]:"""Predefined Variables - Do Not Change their Name; This is a Read-Only cell. Remember to execute this cell once""" logit_1 None []:"""Populate the variables shown above with appropriate values here""" # BEGIN - YOUR CODE GOES HERE pass # END - YOUR CODE GOES HERE []:"""This is a Read-Only cell. Remember to execute this cell once""" logit_1.summary() if logit_1 is not None and hasattr(logit_1, 'summary') and callable (logit_1.summary) else None Q2 (ii) [0.5 marks ] Train a neural network model using the relevant features from the training portion of the transactions data. You should use the given variable to store the fitted model. The neural network should have 1 hidden layer and 8 units. [ ]:"""Predefined Variables - Do Not Change their Name; This is a Read-Only cell. Remember to execute this cell once""" set_seeds (112) # do not change this line nn_1= None []:"""Populate the variables shown above with appropriate values here""" # BEGIN - YOUR CODE GOES HERE pass # END - YOUR CODE GOES HERE 5

Fig: 1