simulator: Predict the variant from a training set

View source: R/simulator.R

simulatorR Documentation

Predict the variant from a training set

Description

Predict the variant from a training set with a column time and a column variant to a testset with a column time The trainset and the testset must have the columns geolocation, time, count. You define the name of these columns in input and the columns must have the same name in the 2 data sets. The trainset must have in addition an outcome column that you also define in input.

Usage

simulator(
  trainset,
  testset,
  var_names_time,
  var_names_geolocalisation,
  var_names_outcome,
  var_names_count,
  factor,
  bymonth = T
)

Arguments

trainset

the dataset used to train the classifier

testset

the dataset to which we will add a metadata

var_names_time

the name of the column where the dates are found format = "%Y-%m-%d"

var_names_geolocalisation

the name of the column where the different regions are located

var_names_outcome

the name of the trainset column where the metadata to be added to the testset is located

var_names_count

the name of the column used to desaggregate the data

factor

The number of sequence used by time for the trainset to reduce the execution time

bymonth

if you want to split the trainset by month

Value

The function returns the testset dataset with an outcome column based on the trainset. The output dataset is well aggregated.


maous1/Pandem2simulator documentation built on Feb. 11, 2023, 11:04 p.m.