In this mini-project you will use logistic regression to determine whether you would have survived the Titanic sinking. To find out, we will use the titanic dataset (titanic.data.csv), containing the following information of 887 passengers: 1) whether they survived or not (1 survived, o deceased), 2) passenger class, 3) gender (0 = rmale, 1 female), 4) age, 5) number of siblings/spouses aboard, 6) nnmber of parents/children aboard, and 7) fare: Passenger 1 Passenger 2Passenger 3 Passenger 887 0 Survived Passenger Class Gender Age Siblings/Spouses Parents/Children Fare 0 0 32 0 0. 0 0 7.25 7.925 71.2833 7.75 Our goal is to construct a classifier that determines/predicts whether an individual would survive or not. Let yn e (0,1 be the label indicating whether the ith individual survived, and let x E R6 denote the feature vector of the ith individual (containing all remaining variables). For example, y0 and x1 3 0 22 1 0 725) Our goal is to construct a claussifier that given x determines y. In this mini-project we will use logistic regression, whose classifier has the form: and is parametrized by the coefficient vector E R6, which we aim to find by maximizing: which is simply the log-likelihood function for N training samples. (a) Create a function that implements (2.1). (b) The gradient of l(8), which is also a vector in R, is given by: (2.2) Create a function that implements (2.2). In this mini-project you will use logistic regression to determine whether you would have survived the Titanic sinking. To find out, we will use the titanic dataset (titanic.data.csv), containing the following information of 887 passengers: 1) whether they survived or not (1 survived, o deceased), 2) passenger class, 3) gender (0 = rmale, 1 female), 4) age, 5) number of siblings/spouses aboard, 6) nnmber of parents/children aboard, and 7) fare: Passenger 1 Passenger 2Passenger 3 Passenger 887 0 Survived Passenger Class Gender Age Siblings/Spouses Parents/Children Fare 0 0 32 0 0. 0 0 7.25 7.925 71.2833 7.75 Our goal is to construct a classifier that determines/predicts whether an individual would survive or not. Let yn e (0,1 be the label indicating whether the ith individual survived, and let x E R6 denote the feature vector of the ith individual (containing all remaining variables). For example, y0 and x1 3 0 22 1 0 725) Our goal is to construct a claussifier that given x determines y. In this mini-project we will use logistic regression, whose classifier has the form: and is parametrized by the coefficient vector E R6, which we aim to find by maximizing: which is simply the log-likelihood function for N training samples. (a) Create a function that implements (2.1). (b) The gradient of l(8), which is also a vector in R, is given by: (2.2) Create a function that implements (2.2)