Hasmirah Hassan
March 25, 2016
The shiny application allows a user to enter some basic information about their vehicle, and obtain a prediction for its MPG. Input 7 variables to get 1 output, Vehicle MPG.
The application can be viewed at:
The app relies on a simple GLM algorithm and a data set “auto MPG” from the UCI Machine Learning Repository located here.
library(RCurl)
library(caret)
mpg <- getURL("http://robertkevinackerman.com/wp-content/uploads/2014/08/mpg.csv")
mpg <- read.csv(text = mpg)
modFit <- train(mpg ~ cyl + disp + horse + weight + accel + year + origin, method="glm", data=mpg)
*Credit to robertkevinackerman for hosting the dataset
The calculated Vehicle MPG