The objective of this project is to test different classification models on their ability to classify whether a car’s gas mileage is above or below the median value of the data set. Gas mileage is measured in miles per gallon (mpg) based on the following car attributes: cylinders, displacement, horsepower, weight, acceleration, model year and origin. This data was retrieved from this website: (https://archive.ics.uci.edu/ml/datasets/Auto+MPG). The data was collected on city-cycle fuel consumption in miles per gallon.
There are 392 observations with 8 variables. Below are the minimum, median, mean, and max of the
variables: cylinders, displacement, horsepower, weight, acceleration, year.
I split the data into approximately 30% testing data and 70% training data by randomly selecting 30% of the data set for testing and 70% of the data set for training. This is a reasonable split because its standard for most of the data (greater or equal to 70%) to be used for training and the remaining (less than or equal to 30%) for testing.
The Naive Bayes model had the least testing error therefore performed the best. Logistic regression performed
second best. KNN performed the worst out of the five models. LDA and QDA had the same testing error.