split_input_data: Function to split an input data frame into training and...

Description Usage Arguments Value Author(s) See Also Examples

Description

Use set.seed to ensure the splitting of the training and testing sets is reproducible.

Usage

1
split_input_data(df, fraction = 0.8)

Arguments

df

Data frame containing date and value variables. df will usually be prepared with add_date_variables.

fraction

Fraction of observations to form the training set. Default is 0.8 for an 80/20 % split for training and testing sets.

Value

A named list containing two data frames: training and testing with the class normalweatherr_data.

Author(s)

Stuart K. Grange

See Also

set.seed, add_date_variables, calculate_model, normalise_for_meteorology

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

# Make modelling reproducible
set.seed(123)

# Prepare data for modelling
list_input_data <- split_input_data(data_swiss_daily)


## End(Not run)

skgrange/normalweatherr documentation built on May 23, 2019, 9:34 a.m.