Skip to contents

This function combines outcome data (observations) with the prediction values from each base learner.

Usage

attach_pred(
  data,
  pred,
  target_cols = c("site_id", "time", "Event.Type", "lon", "lat"),
  yvar = "Arithmetic.Mean"
)

Arguments

data

data.frame(1). Full data.

pred

list(1). List with base learner prediction values.

target_cols

characters(1). Columns to retain from the full data.frame.

yvar

character(1). Outcome variable name.

Value

a data.frame object, including the target columns from data and the predictions for each base learner.