Question
Task: Classification Model & Model Evaluation Using Titanic train.csv dataset (same as HW1 and 2): [10pt] Use the survived as output, and pclass, fare, age,
Task: Classification Model & Model Evaluation
Using Titanic train.csv dataset (same as HW1 and 2):
[10pt] Use the "survived" as output, and "pclass", "fare", "age", "sex" as input variables. Assuming we are running the analysis on "predicting whether a person will survive". Please do proper cleaning and data transformation (one-hot encoding) on variables if necessary. (we did it in HW2)
[50pt] Use the training/testing method on 3 models - logistic regression,decision tree, and SVM. (You can use 80% for training, and 20% for testing)
[10pt] Train each model
[15pt] Print the accuracy score for each model
[5pt] Pick the best model based on accuray score of the testing dataset.
[15pt] Print the confusion matrix for each model, and get the Type I error (from the confusion matrix)
[5pt] Pick the best model based on confusion matrix.
[30pt] Use cross validation with 6 folds on 3 models - logistic regression,decision tree, and SVM.
[10pt] Train each model using cross validation.
[15pt] Get the accuracy score for each model
[5pt] Pick the best model
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started