Skip to contents

Takes two validated dataframes, aligns by time, computes metrics, and returns a results table with a plot.

Usage

run_benchmark(
  model_df,
  obs_df,
  metrics = c("RMSE", "MAE"),
  tolerance_secs = 3600,
  method = "nearest"
)

Arguments

model_df

data.frame with columns: time (POSIXct), value (numeric)

obs_df

data.frame with columns: time (POSIXct), value (numeric)

metrics

character vector of metrics to compute. Options: "RMSE", "MAE"

tolerance_secs

nearest-neighbor time tolerance in seconds (default 1 hour)

method

alignment method: "nearest" or "interpolate"

Value

list with: metrics (data.frame), aligned (data.frame), plot (ggplot)

Author

Anshul Jain