This is the exercise of the Data Training Workshop: Introduction to statistic and machine learning with R
Assuming you are acting as a consultant for government transportation department. Transportation department in Sydney would like to learn how to encourage citizens to use the train instead of the car for transportation. The purpose is to facilitate a more environmentally friendly transportation system.
The dataset collects some low-cost data for initial investigation. car time, car cost, train time, train cost are the predictors, and the target variable is choice. Each record is the choice of a citizen after comparing the four predictors.
The task is to develop binary classification on target variable (choice). You should be able to get a confusion matrix for every algorithm you are using after classification. Thanks to the simplicity of the dataset, you are encouraged to use 5 different algorithms to fit the dataset for making a classification. After fitting the dataset, output summary of the fitted models for any information you can derive from the models.