online_emulate_maize: Perform online prediction for Maize outputs from APSIMX

Description Usage Details Examples

View source: R/online_emulate_maize.R

Description

This function performs online prediction on next generation APSIM data. The 'train' data should be in the same format as the 'test' data and include the standard weather varibles. Currently, this function works best for Maize model outputs, but may be applicable to other outputs. Variables with non-zero outputs during days of the year when the crop is not growing will be predicted to be 0 and likely innaccurate.

Usage

1
online_emulate_maize(train, test, pred_var, pred_type, method, local_dist = 30)

Details

train A data.frame of training data

test A data.frame of data to perform online prediction

pred_var Any Maize model APSIM output variable

pred_type One of "no_update", "online_total_local", "online_total_full", "online_change_local", "online_change_full"

method One of "lm", "ar", "gam", "rf", "nnet"

local_dist Number of sliding window observations for local training

Examples

1
2
3
4
data("training")
data("testing")
on <- online_emulate_maize(training, testing, pred_var = "Maize.AboveGround.Wt", pred_type = "online_total_local", method = "gam")
plot(testing$Date, on, type = "l")

labuzzetta/apsimo documentation built on Jan. 13, 2020, 4 p.m.