11/21/2021

My_Shiny_App

The purpose of this app is to allow a user to change some predictor values and see how their choices affect the Miles Per Gallon of a car.
The prediction model takes advantage of the caret and parsnip packages in R. The model uses a Random Forest as a predictor algorithm.

Why Have a Prediction App?

MPG is important!

  • Gas Price Inflation
  • Owner Cost
  • Environmental Impact
  • Informed Purchasing Decisions
  • Another Reason
  • Yet Another Reason

What Does the Dataset Look Like?

Displayed is the names of the predictors along with mpg:

 [1] "mpg"  "cyl"  "disp" "hp"   "drat" "wt"   "qsec" "vs"   "am"   "gear"
[11] "carb"

cyl = # of cylinders; disp = displacement; hp = horsepower; drat = rear axle ratio; wt = weight (in 1000lbs); qsec = 1/4 mile time (in seconds); vs = shape of the engine (V-Shaped or Straight-Line); am = transmission (Automatic or Manual); gear = # of gears; carb = # of carburetors

Plot of MPG v. Displacement

plot(randf)