predict.traveltimeHMM.no_dependence: Predict the travel time for a trip using a 'traveltimeHMM'...

View source: R/predict.R

predict.traveltimeHMM.no_dependenceR Documentation

Predict the travel time for a trip using a traveltimeHMM model object that is not of the HMM family

Description

Predict the travel time for a trip using a traveltimeHMM model object that is not of the HMM family

Usage

## S3 method for class 'traveltimeHMM.no_dependence'
predict(
  object,
  tripdata,
  starttime,
  n = 1000,
  logE = NULL,
  time_bins = time_bins,
  ...
)

Arguments

object

A model object (a list) provided through the execution of function timetravelHMM for a trip or no-dependence model type. The list includes information on model as well as estimates for its parameters. See timetravelHMM man page.

tripdata

A data frame of road links with information on each link's traversal. Columns minimally includes objects 'linkID' and 'length', and the latter must have the same length. Rows must be in chronological order.

starttime

The start date and time for the very first link of the trip, in POSIXct format.

n

Number of samples. Default is 1000.

logE

Point estimate of trip effects, in the form of a numerical vector of size n.

time_bins

a functional map between real time and time bins, see '?rules2timebins'.

...

not used.

Value

predict.traveltimeHMM.no_dependence returns a vector of size n of representing the point prediction of total travel time, in seconds, for each run.

References

Woodard, D., Nogin, G., Koch, P., Racz, D., Goldszmidt, M., Horvitz, E., 2017. Predicting travel time reliability using mobile phone GPS data. Transportation Research Part C, 75, 30-44.


melmasri/traveltimeHMM documentation built on Jan. 6, 2023, 10:30 p.m.