Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

What actions would you take to preform Disk Management

Answered: 1 week ago

Question

WHAT IS AUTOMATION TESTING?

Answered: 1 week ago

Question

What is Selenium? What are the advantages of Selenium?

Answered: 1 week ago

Question

Explain the various collection policies in receivables management.

Answered: 1 week ago

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago