Question: You have to devise an Object Oriented solution for this problem, i . e . you MUST create a CLASS, and solve the problem calling
You have to devise an Object Oriented solution for this problem, ie you MUST create a CLASS, and
solve the problem calling the class methods.
The train dataset contains data regarding a train crash. It has ~ records. However, all records are not
complete, ie some have missing data. In this data set, our outcome of interest is the survived column,
on whether an individual survived or died after the Train crash.
Clean the data and remove any unwanted records. How many records do you have now?
points
The train picked most passengers from which station
points
Do some basic data exploration eg using commands as head info describe nunique etc
Which variables will you NOT select?
points
Are there any outliers in the data? If yes, treat them.
points
Partition the data into a training set with of the observations and testing set with of the
observations using the random state of for cross validation. points
On the partitioned data, build the best KNN model. Show the accuracy numbers. Hint: What is the
best value of k How do you decide the best k
points
On the partitioned data, build the best logistic regression model. Show the accuracy numbers.
points
On the partitioned data, build the decision tree. Show the accuracy numbers. What tree depth did
you choose, ie which one is ideal and why? points
Based on the results of knearest neighbor, and logistic regression, what is the best model to classify
the data? Provide explanation to support your argument. points
Show some interesting graphs of the data, ie that can describe the original data survived pclass sex age sibsp parch fare station. By using TrainData excell data bsurvived pclass sex age sibsp parch fare station.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
