simple_workflow: A simple learning and prediction workflow

Description Usage Arguments Value

View source: R/workflows.R

Description

A simple learning and prediction workflow

Usage

1
2
simple_workflow(train, test, form, model = "lm", handleNAs = NULL,
  min_train = 2, nORp = 0.2, time = "time", site_id = "site", ...)

Arguments

train

a data frame for training

test

a data frame for testing

form

a formula describing the model to learn

model

the name of the algorithm to use

handleNAs

string indicating how to deal with NAs. If "centralImput", training observations with at least 80% of non-NA columns, will have their NAs substituted by the mean value and testing observatiosn will have their NAs filled in with mean value regardless.

min_train

a minimum number of observations that must be left to train a model. If there are not enough observations, predictions will be NA. Default is 2.

nORp

a maximum number or fraction of columns with missing values above which a row will be removed from train before learning the model. Only works if handleNAs was set to centralImputation. Default is 0.2.

time

the name of the column in train and test containing time-stamps

site_id

the name of the column in train and test containing location IDs

...

other parameters to feed to model

Value

a data frame containing time-stamps, location IDs, true values and predicted values


mrfoliveira/Evaluation-procedures-for-forecasting-with-spatio-temporal-data documentation built on April 11, 2021, 10:50 a.m.