Learn R Programming

TrafficBDE (version 0.1.2)

loadTrainTest: Load Train and Test Data

Description

This function returns a list with the train and test data.

Usage

loadTrainTest(Data, datetime, predict)

Value

A list with the following components:

  • trainsData The trainData for the model

  • testsData The testData to be predict

Arguments

Data

The historical data

datetime

The date time the user wants to predict

predict

The value he user wants to predict must be a column name of the data set

Author

Aikaterini Chatzopoulou, Kleanthis Koupidis, Charalampos Bratsas

Details

This function returns a list with the train and test data that will be used for train and prediction.

Examples

Run this code
if (FALSE) {
SpecLink <- loadDataSpecLink("163204843","1", X163204843_1)
x <- fillMissingValues(SpecLink)
datetime <- "2017-01-27 14:00:00" 
newData <- fillMissingDates (x, datetime)
DataList <- loadTrainTest (newData, datetime, "Mean_speed")}

Run the code above in your browser using DataLab