What Does it Do?
Variables which can be modified / passed by the user
raw.githubusercontent.com
Outputs Once the user is happy with the variable values, they press the 'Prediction' button and then
Model Linear model evolved from the Chicago Taxi data set, next slide presents an R code example executed against the prediction model using the predict() function and returning an estimated tips per mile figure.
eg_hour<-'13'
eg_fare <- 90
eg_day <- 'Saturday'
eg_miles <- 18
eg_community <- '24'
eg_payment <- 'Cash'
les_test1<-data.frame(as.factor(eg_hour),as.numeric(eg_fare),as.factor(eg_day),as.factor(eg_payment),as.factor(eg_community),as.numeric(eg_miles))
names(les_test1)<-c('hour','fare','day_of_week','payment_type','pickup_community_area','trip_miles')
predict(model,les_test1)
1
6.638269