CalculateTrainPredictYearPattern: Determining which years of training data will be used

Description Usage Arguments Details Value Examples

View source: R/std_analysis_list.R

Description

For a year to be "predicted" (i.e. have outbreaks detected) it must use 5 years of training data. This function calculates which years of training data are assigned to detect outbreaks.

Usage

1
CalculateTrainPredictYearPattern(yearMin, yearMax, numPerYear1 = 1)

Arguments

yearMin

The first year of data

yearMax

The last year of data

numPerYear1

5 years of training data should only be used for 1 subsequent year of outbreak detection for the last numPerYear1 years

Details

For reasons of efficiency, we change the training data set on January 1st. That is, an entire year (or more) of outbreaks are detected off a fixed set of training data.

The current algorithm that we use sets the first 5 years of data as training data for the first 6 years of outbreak detection. We then fix our 5 years of training data and use it for sequences of 2 years of outbreak detection.

When it approaches the current year, we want better calculations, so we can specify that 5 years of training data should only be used for 1 subsequent year of outbreak detection through the numPerYear1 parameter.

Value

A list containing a sequence of training years and prediction years

Examples

1
2
3
sykdomspuls::CalculateTrainPredictYearPattern(2000, 2015, 1)

sykdomspuls::CalculateTrainPredictYearPattern(2000, 2015, 3)

raubreywhite/dashboards_sykdomspuls documentation built on April 27, 2020, 6:11 p.m.